colibri-stateless


Namecolibri-stateless JSON
Version 0.7.7 PyPI version JSON
download
home_pagehttps://github.com/corpus-core/colibri-stateless
SummaryPython bindings for Colibri stateless Ethereum proof library
upload_time2025-10-30 22:29:45
maintainerNone
docs_urlNone
authorcorpus.core
requires_python>=3.8
licenseMIT
keywords ethereum blockchain proof verification web3 rpc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <img src="https://github.com/corpus-core/colibri-stateless/raw/dev/c4_logo.png" alt="C4 Logo" width="300"/>

# Colibri Python Bindings (corpus core colibri client)

![ETH2.0_Spec_Version 1.4.0](https://img.shields.io/badge/ETH2.0_Spec_Version-1.4.0-2e86c1.svg)

The colibri client is a stateless and trustless ethereum client, which is optimized for the mobile apps or embedded devices, because it does not hols the state, but verifies on demand. 

## ๐Ÿš€ Quick Start

### Installation

```bash
python3 -m pip install colibri-stateless
```

### Basic Usage

```python
import asyncio
from colibri import Colibri

async def main():
    # Initialize client for Ethereum Mainnet
    client = Colibri(chain_id=1, provers=["https://mainnet.colibri-proof.tech"])
    
    # Make verified RPC call
    result = await client.rpc("eth_blockNumber", [])
    print(f"Current block: {result}")
    
    # Get account balance with proof verification
    balance = await client.rpc("eth_getBalance", [
        "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", 
        "latest"
    ])
    print(f"Balance: {balance}")

# Run async function
asyncio.run(main())
```

## โœจ Key Features

- **๐Ÿ” Cryptographic Verification** - All RPC responses verified with Merkle proofs
- **๐Ÿš€ Async/Await Support** - Modern Python async support for network operations  
- **๐Ÿ’พ Pluggable Storage** - Customizable storage backends for caching
- **๐Ÿงช Comprehensive Testing** - Mock HTTP requests and storage for testing
- **๐ŸŒ Multi-Chain Support** - Ethereum Mainnet, Sepolia, Gnosis Chain, and more
- **๐Ÿ“ฆ Easy Integration** - Simple pip install with pre-built native extensions

## ๐Ÿ“– Documentation

**Full Documentation**: [GitBook Guide](https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/bindings/python)

- **API Reference** - Complete class and method documentation
- **Storage System** - Custom storage implementations
- **Testing Framework** - Mock data and integration tests  
- **Configuration** - Chain setup and advanced options
- **Building from Source** - Development and contribution guide

## ๐Ÿ› ๏ธ Development

### Building from Source

```bash
# Clone repository
git clone https://github.com/corpus-core/colibri-stateless.git
cd colibri-stateless/bindings/python

# Build native extension
./build.sh

# Option 1: Use virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
pip install -e .
pip install -r requirements-dev.txt

# Run tests
pytest tests/ -v

# Deactivate when done
deactivate
```

**Alternative without virtual environment:**

```bash
# Install test dependencies with --user flag
python3 -m pip install --user pytest pytest-asyncio aiohttp

# Run tests directly with PYTHONPATH
PYTHONPATH=src python3 -m pytest tests/ -v
```

### Quick Debug Build

For faster iteration during development:

```bash
# Build in debug mode
./build_debug.sh

# Run tests without installation
PYTHONPATH=src python3 -m pytest tests/ -v
```

### Integration Tests

```python
# Run with real blockchain data (offline)
from colibri.testing import discover_tests, run_test_case

tests = discover_tests()
for test_name, test_config in tests.items():
    result = await run_test_case(test_name, test_config)
    print(f"Test {test_name}: {'PASSED' if result else 'FAILED'}")
```

## ๐Ÿ“‹ System Requirements

- **Python 3.8+**
- **CMake 3.20+** (for building from source)
- **C++17 compiler** (for building from source)

## ๐Ÿ”— Related Projects

- **Core Library**: [colibri-stateless](https://github.com/corpus-core/colibri-stateless)
- **Swift Bindings**: iOS/macOS native integration
- **Kotlin Bindings**: Android/JVM integration
- **JavaScript Bindings**: Web/Node.js integration

## ๐Ÿ“„ License

MIT License - see [LICENSE](../../LICENSE) for details.

## ๐Ÿค Contributing

Contributions welcome! Please read our [Contributing Guide](../../CONTRIBUTING.md) and check the [Development Documentation](https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/bindings/python).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/corpus-core/colibri-stateless",
    "name": "colibri-stateless",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "\"corpus.core\" <contact@corpus.core>",
    "keywords": "ethereum, blockchain, proof, verification, web3, rpc",
    "author": "corpus.core",
    "author_email": "\"corpus.core\" <contact@corpus.core>",
    "download_url": null,
    "platform": null,
    "description": "<img src=\"https://github.com/corpus-core/colibri-stateless/raw/dev/c4_logo.png\" alt=\"C4 Logo\" width=\"300\"/>\n\n# Colibri Python Bindings (corpus core colibri client)\n\n![ETH2.0_Spec_Version 1.4.0](https://img.shields.io/badge/ETH2.0_Spec_Version-1.4.0-2e86c1.svg)\n\nThe colibri client is a stateless and trustless ethereum client, which is optimized for the mobile apps or embedded devices, because it does not hols the state, but verifies on demand. \n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\npython3 -m pip install colibri-stateless\n```\n\n### Basic Usage\n\n```python\nimport asyncio\nfrom colibri import Colibri\n\nasync def main():\n    # Initialize client for Ethereum Mainnet\n    client = Colibri(chain_id=1, provers=[\"https://mainnet.colibri-proof.tech\"])\n    \n    # Make verified RPC call\n    result = await client.rpc(\"eth_blockNumber\", [])\n    print(f\"Current block: {result}\")\n    \n    # Get account balance with proof verification\n    balance = await client.rpc(\"eth_getBalance\", [\n        \"0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5\", \n        \"latest\"\n    ])\n    print(f\"Balance: {balance}\")\n\n# Run async function\nasyncio.run(main())\n```\n\n## \u2728 Key Features\n\n- **\ud83d\udd10 Cryptographic Verification** - All RPC responses verified with Merkle proofs\n- **\ud83d\ude80 Async/Await Support** - Modern Python async support for network operations  \n- **\ud83d\udcbe Pluggable Storage** - Customizable storage backends for caching\n- **\ud83e\uddea Comprehensive Testing** - Mock HTTP requests and storage for testing\n- **\ud83c\udf10 Multi-Chain Support** - Ethereum Mainnet, Sepolia, Gnosis Chain, and more\n- **\ud83d\udce6 Easy Integration** - Simple pip install with pre-built native extensions\n\n## \ud83d\udcd6 Documentation\n\n**Full Documentation**: [GitBook Guide](https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/bindings/python)\n\n- **API Reference** - Complete class and method documentation\n- **Storage System** - Custom storage implementations\n- **Testing Framework** - Mock data and integration tests  \n- **Configuration** - Chain setup and advanced options\n- **Building from Source** - Development and contribution guide\n\n## \ud83d\udee0\ufe0f Development\n\n### Building from Source\n\n```bash\n# Clone repository\ngit clone https://github.com/corpus-core/colibri-stateless.git\ncd colibri-stateless/bindings/python\n\n# Build native extension\n./build.sh\n\n# Option 1: Use virtual environment (recommended)\npython3 -m venv venv\nsource venv/bin/activate\npip install -e .\npip install -r requirements-dev.txt\n\n# Run tests\npytest tests/ -v\n\n# Deactivate when done\ndeactivate\n```\n\n**Alternative without virtual environment:**\n\n```bash\n# Install test dependencies with --user flag\npython3 -m pip install --user pytest pytest-asyncio aiohttp\n\n# Run tests directly with PYTHONPATH\nPYTHONPATH=src python3 -m pytest tests/ -v\n```\n\n### Quick Debug Build\n\nFor faster iteration during development:\n\n```bash\n# Build in debug mode\n./build_debug.sh\n\n# Run tests without installation\nPYTHONPATH=src python3 -m pytest tests/ -v\n```\n\n### Integration Tests\n\n```python\n# Run with real blockchain data (offline)\nfrom colibri.testing import discover_tests, run_test_case\n\ntests = discover_tests()\nfor test_name, test_config in tests.items():\n    result = await run_test_case(test_name, test_config)\n    print(f\"Test {test_name}: {'PASSED' if result else 'FAILED'}\")\n```\n\n## \ud83d\udccb System Requirements\n\n- **Python 3.8+**\n- **CMake 3.20+** (for building from source)\n- **C++17 compiler** (for building from source)\n\n## \ud83d\udd17 Related Projects\n\n- **Core Library**: [colibri-stateless](https://github.com/corpus-core/colibri-stateless)\n- **Swift Bindings**: iOS/macOS native integration\n- **Kotlin Bindings**: Android/JVM integration\n- **JavaScript Bindings**: Web/Node.js integration\n\n## \ud83d\udcc4 License\n\nMIT License - see [LICENSE](../../LICENSE) for details.\n\n## \ud83e\udd1d Contributing\n\nContributions welcome! Please read our [Contributing Guide](../../CONTRIBUTING.md) and check the [Development Documentation](https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/bindings/python).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python bindings for Colibri stateless Ethereum proof library",
    "version": "0.7.7",
    "project_urls": {
        "Bug Tracker": "https://github.com/corpus-core/colibri-stateless/issues",
        "Documentation": "https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/bindings/python",
        "Homepage": "https://github.com/corpus-core/colibri-stateless",
        "Repository": "https://github.com/corpus-core/colibri-stateless"
    },
    "split_keywords": [
        "ethereum",
        " blockchain",
        " proof",
        " verification",
        " web3",
        " rpc"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3de26696909a66e3fe036a54f89eb6484ebd3736290077cc235c8a564d12da6c",
                "md5": "04e5e3cc9b544e5d192b80e3b72e049b",
                "sha256": "90e2ce1865c80a50ba16926b92db56f408fc4e22ef1157e339c2b85b727070d4"
            },
            "downloads": -1,
            "filename": "colibri_stateless-0.7.7-cp312-cp312-macosx_15_0_universal2.whl",
            "has_sig": false,
            "md5_digest": "04e5e3cc9b544e5d192b80e3b72e049b",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 370754,
            "upload_time": "2025-10-30T22:29:45",
            "upload_time_iso_8601": "2025-10-30T22:29:45.559776Z",
            "url": "https://files.pythonhosted.org/packages/3d/e2/6696909a66e3fe036a54f89eb6484ebd3736290077cc235c8a564d12da6c/colibri_stateless-0.7.7-cp312-cp312-macosx_15_0_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9f9c6c2f2b10e4d23caf011e32f1b9a132cfef8aaf3e468ba217d18d380bf8cd",
                "md5": "9097f190d946a824a679966294c56cd1",
                "sha256": "21e6ca6232203903e514b6cca7d2a4b4ff0ab311b54dcb186ecc5cb1eececffe"
            },
            "downloads": -1,
            "filename": "colibri_stateless-0.7.7-cp312-cp312-manylinux_2_17_x86_64.whl",
            "has_sig": false,
            "md5_digest": "9097f190d946a824a679966294c56cd1",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 493991,
            "upload_time": "2025-10-30T22:29:46",
            "upload_time_iso_8601": "2025-10-30T22:29:46.686919Z",
            "url": "https://files.pythonhosted.org/packages/9f/9c/6c2f2b10e4d23caf011e32f1b9a132cfef8aaf3e468ba217d18d380bf8cd/colibri_stateless-0.7.7-cp312-cp312-manylinux_2_17_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "06b32ed7351fe188a12d86c5297cb8b96af3930e6696a6ddd4d05463f96384e0",
                "md5": "8dc9b1616f976800b302eb0bf803263d",
                "sha256": "6c067d0c3b71fe28a23a9e84aeb599b8cfad95e473e44d53d834c2a68093dd5e"
            },
            "downloads": -1,
            "filename": "colibri_stateless-0.7.7-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "8dc9b1616f976800b302eb0bf803263d",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 378066,
            "upload_time": "2025-10-30T22:29:47",
            "upload_time_iso_8601": "2025-10-30T22:29:47.967680Z",
            "url": "https://files.pythonhosted.org/packages/06/b3/2ed7351fe188a12d86c5297cb8b96af3930e6696a6ddd4d05463f96384e0/colibri_stateless-0.7.7-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0bdfd44c3c48740c22e31a61a2f1268b67447a73aa08e15de08da962045ff448",
                "md5": "bb0ff2983c4e48cc733ca03322330059",
                "sha256": "7ec58d17b058e14657dcd469cc049c92f51e6aeabc94746da886124b29709bcd"
            },
            "downloads": -1,
            "filename": "colibri_stateless-0.7.7-cp38-cp38-macosx_15_0_universal2.whl",
            "has_sig": false,
            "md5_digest": "bb0ff2983c4e48cc733ca03322330059",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 369310,
            "upload_time": "2025-10-30T22:29:49",
            "upload_time_iso_8601": "2025-10-30T22:29:49.033991Z",
            "url": "https://files.pythonhosted.org/packages/0b/df/d44c3c48740c22e31a61a2f1268b67447a73aa08e15de08da962045ff448/colibri_stateless-0.7.7-cp38-cp38-macosx_15_0_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ff1df1e17a3a4d8d8b0e0e4d092934bd0c85bf67b4fed3237a695be258e71e40",
                "md5": "f1723999e5d33a6c58cd4ff83da2ab7d",
                "sha256": "abb8ee46b8eceb5f5c0955ae2d5072bc7c8775cb825b3828eef87c9d38f88f57"
            },
            "downloads": -1,
            "filename": "colibri_stateless-0.7.7-cp38-cp38-manylinux_2_17_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f1723999e5d33a6c58cd4ff83da2ab7d",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 491219,
            "upload_time": "2025-10-30T22:29:49",
            "upload_time_iso_8601": "2025-10-30T22:29:49.930250Z",
            "url": "https://files.pythonhosted.org/packages/ff/1d/f1e17a3a4d8d8b0e0e4d092934bd0c85bf67b4fed3237a695be258e71e40/colibri_stateless-0.7.7-cp38-cp38-manylinux_2_17_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "62c535d1343a411a4bd8cdbd97813001b1a847ecb50de8f2b9725443271ad41a",
                "md5": "5396240712d6cb062d48909a70415a57",
                "sha256": "123ae01b59e97d320ac457eda29c0d46d2be490e5418d5c22dde96fa2d58057e"
            },
            "downloads": -1,
            "filename": "colibri_stateless-0.7.7-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "5396240712d6cb062d48909a70415a57",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 376134,
            "upload_time": "2025-10-30T22:29:50",
            "upload_time_iso_8601": "2025-10-30T22:29:50.926540Z",
            "url": "https://files.pythonhosted.org/packages/62/c5/35d1343a411a4bd8cdbd97813001b1a847ecb50de8f2b9725443271ad41a/colibri_stateless-0.7.7-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-30 22:29:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "corpus-core",
    "github_project": "colibri-stateless",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "colibri-stateless"
}
        
Elapsed time: 2.21730s