Skip to content

Introduction

CrossContract is a robust Python package designed to bring strict data integrity and frictionless interaction to the CROSS ecosystem. It serves as the foundational layer for defining reliable data schemas and contracts.

The package consists of two main components:

  • CrossContract: The core library for defining high-integrity, validation-ready data contracts and schemas using Pydantic and Frictionless standards.
  • CrossClient: An add-on SDK that leverages these contracts to interact seamlessly with the CrossPlatform.

Requirements

  • Python: 3.11 or higher

Installation

This package is hosted directly on GitHub. We strongly recommend installing it within a virtual environment.

Using pip

python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/MacOS
source .venv/bin/activate

pip install git+https://github.com/sweet-cross/crosscontract.git

Using uv

uv venv
# Windows
.venv\Scripts\activate
# Linux/MacOS
source .venv/bin/activate

uv pip install git+https://github.com/sweet-cross/crosscontract.git

Alternatively, if you use a project-based approach with uv:

uv init
# Windows
.venv\Scripts\activate
# Linux/MacOS
source .venv/bin/activate

uv add git+https://github.com/sweet-cross/crosscontract.git

Using poetry

poetry init
poetry shell

poetry add git+https://github.com/sweet-cross/crosscontract.git

Dependencies

The key libraries powering CrossContract are:

  • Pydantic: For data validation and settings management.
  • Pandas: For powerful data manipulation and analysis.
  • SQLAlchemy: For database abstraction and interaction.
  • httpx: For synchronous and asynchronous HTTP requests (CrossClient).

Development

We follow a structured development workflow to ensure stability:

  • Branch Strategy:
    • main: Main branch released.
  • Contribution Workflow:
    1. Create an Issue to discuss the change.
    2. Clone the repository and branch out from main:
      git clone https://github.com/sweet-cross/crosscontract.git
      cd crosscontract
      git checkout dev
      git checkout -b feature/your-feature-name
      
    3. Implement your changes.
    4. Submit a Pull Request targeting the main branch.

License

This project is licensed under the terms of the MIT license.