{"id":39090685,"url":"https://github.com/ardriveapp/turbo-python-sdk","last_synced_at":"2026-01-17T18:48:09.449Z","repository":{"id":330151879,"uuid":"1119243673","full_name":"ardriveapp/turbo-python-sdk","owner":"ardriveapp","description":"Python SDK for interacting the Ardrive Turbo Upload and Payment Service","archived":false,"fork":false,"pushed_at":"2026-01-14T15:08:26.000Z","size":121,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"alpha","last_synced_at":"2026-01-14T18:59:14.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ardriveapp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-19T01:20:59.000Z","updated_at":"2026-01-14T15:08:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ardriveapp/turbo-python-sdk","commit_stats":null,"previous_names":["ardriveapp/turbo-python-sdk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ardriveapp/turbo-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardriveapp","download_url":"https://codeload.github.com/ardriveapp/turbo-python-sdk/tar.gz/refs/heads/alpha","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-python-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28516269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:28:00.501Z","status":"ssl_error","status_checked_at":"2026-01-17T18:28:00.150Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T18:48:09.352Z","updated_at":"2026-01-17T18:48:09.431Z","avatar_url":"https://github.com/ardriveapp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turbo Python SDK\n\nA Python SDK for interacting with the [ArDrive Turbo](https://ardrive.io/developers) Upload service, supporting both Ethereum and Arweave signers for permanent data storage on Arweave.\n\n## Get Started\n\n### Installation\n\n```bash\npip install turbo-sdk\n```\n\n### Quick Start\n\n#### Ethereum Usage\n\n```python\nfrom turbo_sdk import Turbo, EthereumSigner\n\n# Create Ethereum signer\nsigner = EthereumSigner(\"0x1234567890abcdef...\")  # Your private key\n\n# Create Turbo client\nturbo = Turbo(signer, network=\"mainnet\")\n\n# Upload data\nresult = turbo.upload(b\"Hello, Turbo!\", tags=[\n    {\"name\": \"Content-Type\", \"value\": \"text/plain\"},\n    {\"name\": \"App-Name\", \"value\": \"MyApp\"}\n])\n\nprint(f\"✅ Uploaded! TX ID: {result.id}\")\nprint(f\"🌐 View at: https://arweave.net/{result.id}\")\n```\n\n#### Arweave Usage\n\n```python\nimport json\nfrom turbo_sdk import Turbo, ArweaveSigner\n\n# Load Arweave wallet (JWK format)\nwith open(\"test-wallet.json\") as f:\n    jwk = json.load(f)\n\n# Create Arweave signer\nsigner = ArweaveSigner(jwk)\n\n# Create Turbo client\nturbo = Turbo(signer, network=\"mainnet\")\n\n# Upload data\nresult = turbo.upload(b\"Hello from Arweave!\", tags=[\n    {\"name\": \"Content-Type\", \"value\": \"text/plain\"}\n])\n\nprint(f\"✅ Uploaded! URI: ar://{result.id}\")\n```\n\n## APIs\n\n### Core Classes\n\n#### `Turbo(signer, network=\"mainnet\")`\n\nMain client for interacting with Turbo services.\n\n**Parameters:**\n- `signer`: Either `EthereumSigner` or `ArweaveSigner` instance\n- `network`: `\"mainnet\"` or `\"testnet\"` (default: `\"mainnet\"`)\n\n**Methods:**\n\n##### `upload(data, tags=None) -\u003e TurboUploadResponse`\n\nUpload data to the Turbo datachain.\n\n```python\nresult = turbo.upload(\n    data=b\"Your data here\",\n    tags=[\n        {\"name\": \"Content-Type\", \"value\": \"application/json\"},\n        {\"name\": \"App-Name\", \"value\": \"MyApp\"}\n    ]\n)\n```\n\n**Returns:** `TurboUploadResponse`\n```python\n@dataclass\nclass TurboUploadResponse:\n    id: str                        # Transaction ID\n    owner: str                     # Owner address\n    data_caches: List[str]         # Cache endpoints\n    fast_finality_indexes: List[str] # Fast finality indexes\n    winc: str                      # Winston credits cost\n```\n\n##### `get_balance(address=None) -\u003e TurboBalanceResponse`\n\nGet winston credit balance. Uses signed request for authenticated balance check when no address specified.\n\n```python\n# Check your own balance (signed request)\nbalance = turbo.get_balance()\nprint(f\"Balance: {balance.winc} winc\")\n\n# Check another address (no signature needed)\nother_balance = turbo.get_balance(\"0x742d35Cc6635C0532925a3b8C17af2e95C5Aca4A\")\nprint(f\"Other balance: {other_balance.winc} winc\")\n```\n\n**Returns:** `TurboBalanceResponse`\n```python\n@dataclass\nclass TurboBalanceResponse:\n    winc: str                      # Available winston credits\n    controlled_winc: str           # Controlled amount\n    effective_balance: str         # Effective balance including shared credits\n```\n\n##### `get_upload_price(byte_count) -\u003e int`\n\nGet the cost to upload data of a specific size.\n\n```python\ncost = turbo.get_upload_price(1024)  # Cost for 1KB\nprint(f\"Upload cost: {cost} winc\")\n```\n\n### Signers\n\n#### `EthereumSigner(private_key)`\n\nEthereum signer using ECDSA signatures.\n\n**Parameters:**\n- `private_key` (str): Hex private key with or without `0x` prefix\n\n```python\nsigner = EthereumSigner(\"0x1234567890abcdef...\")\n```\n\n#### `ArweaveSigner(jwk)`\n\nArweave signer using RSA-PSS signatures.\n\n**Parameters:**\n- `jwk` (dict): Arweave wallet in JWK format\n\n```python\nsigner = ArweaveSigner({\n    \"kty\": \"RSA\",\n    \"n\": \"...\",\n    \"e\": \"AQAB\",\n    \"d\": \"...\",\n    # ... other JWK fields\n})\n```\n\n#### Signer Methods\n\nBoth signers provide:\n\n##### `get_wallet_address() -\u003e str`\n\nGet the wallet address for the signer.\n\n```python\naddress = signer.get_wallet_address()\nprint(f\"Wallet address: {address}\")\n```\n\n##### `create_signed_headers() -\u003e dict`\n\nCreate signed headers for authenticated API requests.\n\n```python\nheaders = signer.create_signed_headers()\n```\n\n\n## Developers\n\n### Setup\n\n1. **Crete a virtual environment:**\n\n```bash\npython -m venv venv\nsource venv/bin/activate \n```\n\n1. **Install dependencies:**\n\n```bash\npip install -e \".[dev]\"\n```\n\n2. **Run tests:**\n\n```bash\npytest\n```\n\nThat's it! The test suite includes comprehensive tests for all components without requiring network access.\n\n## Acknowledgments\n\nThis package leverages implementations from the [Irys Python SDK](https://github.com/Irys-xyz/python-sdk) for ANS-104 DataItem format and cryptographic operations. Special thanks to the Irys team for their work on permanent data storage standards.\n\n## License\n\nMIT License - see [LICENSE](../../LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardriveapp%2Fturbo-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardriveapp%2Fturbo-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardriveapp%2Fturbo-python-sdk/lists"}