{"id":37076348,"url":"https://github.com/zarbanio/zarban-py","last_synced_at":"2026-01-14T08:58:52.821Z","repository":{"id":266287430,"uuid":"888445479","full_name":"zarbanio/zarban-py","owner":"zarbanio","description":"Zarban Python SDK","archived":false,"fork":false,"pushed_at":"2024-12-17T19:19:16.000Z","size":500,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-29T06:39:43.554Z","etag":null,"topics":["blockchain","defi","python-sdk"],"latest_commit_sha":null,"homepage":"https://zarban.io","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/zarbanio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security-best-practices.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T12:14:12.000Z","updated_at":"2024-12-25T14:49:17.000Z","dependencies_parsed_at":"2024-12-03T14:41:08.707Z","dependency_job_id":"30147185-2a4c-4ada-8ed9-b231cc825cff","html_url":"https://github.com/zarbanio/zarban-py","commit_stats":null,"previous_names":["zarbanio/zarban-py"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/zarbanio/zarban-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarbanio%2Fzarban-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarbanio%2Fzarban-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarbanio%2Fzarban-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarbanio%2Fzarban-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zarbanio","download_url":"https://codeload.github.com/zarbanio/zarban-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarbanio%2Fzarban-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["blockchain","defi","python-sdk"],"created_at":"2026-01-14T08:58:52.331Z","updated_at":"2026-01-14T08:58:52.816Z","avatar_url":"https://github.com/zarbanio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zarban SDK\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://zarban.io/favicon.ico\" width=\"400\" alt=\"Logo\"\u003e\n\u003c/p\u003e\n\n[![PyPI version](https://badge.fury.io/py/zarban.svg)](https://badge.fury.io/py/zarban)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Python Versions](https://img.shields.io/pypi/pyversions/zarban.svg)](https://pypi.org/project/zarban/)\n\nZarban SDK is a Python interface for interacting with the Zarban DeFi protocol, enabling developers to seamlessly integrate lending and borrowing functionalities into their applications. This SDK simplifies complex DeFi operations by providing easy-to-use methods for lending assets, managing collateral, borrowing funds, and monitoring positions in the Zarban protocol.\n\n## Features\n\n- **Automated API Client Generation**: Built using OpenAPI specification, ensuring type safety and up-to-date API compatibility\n- **Lending Operations**: Easily deposit assets, view lending rates, and manage lending positions\n- **Borrowing Management**: Streamlined methods for borrowing assets, managing collateral, and monitoring loan health\n- **Position Tracking**: Real-time access to user positions, including borrowed amounts, collateral ratios, and liquidation thresholds\n- **Market Data**: Simple methods to fetch current interest rates, available liquidity, and market statistics\n- **Type Safety**: Full type hints support for Python static type checking\n- **Error Handling**: Comprehensive error handling with detailed exceptions for DeFi operations\n- **Async Support**: Asynchronous methods for improved performance in high-throughput applications\n\n## Environments\n\nZarban SDK supports two distinct environments:\n\n1. **Mainnet**: The production environment for the Zarban DeFi protocol.\n\n   - Wallet API: `https://wapi.zarban.io`\n   - Service API: `https://api.zarban.io`\n\n2. **Testnet**: A separate testing environment for the Zarban protocol.\n   - Wallet API: `https://testwapi.zarban.io`\n   - Service API: `https://testapi.zarban.io`\n\nBe sure to use the appropriate environment configuration when interacting with the Zarban SDK.\n\n## Installation\n\n```bash\npip install zarban\n```\n\nFor development installation:\n\n```bash\ngit https://github.com/zarbanio/zarban-py.git\ncd zarban-py\npip install -e \".[dev]\"\n```\n\n## Quick Start\n\nZarban SDK provides access to two distinct APIs:\n\n### 1. Wallet API (`zarban.wallet`)\n\nThe Wallet API handles user authentication and wallet management operations.\n\n### 2. Service API(`zarban.service`)\n\nThe Zarban Service API provides access to core DeFi protocol operations.\n\n```python\nimport zarban.wallet.openapi_client as wallet\n\n# Initialize the client\ncfg         = wallet.Configuration()\napi_client  = wallet.ApiClient(cfg)\nauth_api    = wallet.AuthApi(api_client)\n\n# Make a simple API call\nresponse = auth_api.some_method()\nprint(response)\n```\n\n## Usage Examples\n\nFor detailed usage examples, see our [Examples Documentation](docs/examples).\n\n### Advanced Usage\n\nHere's a simple example to sign up and get started with Zarban:\n\n```python\nimport zarban.wallet.openapi_client as wallet\n\n\ndef signup_example():\n    # Create and configure the Configuration object\n    cfg = wallet.Configuration(\n        host=\"https://testwapi.zarban.io\"\n    )\n\n    # Create an instance of the ApiClient with the configuration\n    api_client = wallet.ApiClient(configuration=cfg)\n\n    # Create an instance of the AuthApi using the api_client\n    auth_api = wallet.AuthApi(api_client)\n\n    # Prepare the signup request data\n    signup_request = wallet.SignUpRequest(\n        email=\"user@example.com\",\n        password=\"yourSecuredPassword\",\n    )\n\n    try:\n        # Call the signup API\n        api_response = auth_api.signup_with_email_and_password(signup_request)\n        print(\"Confirmation link sent successfully!\")\n        print(f\"Message: {api_response.messages}\")\n\n    except wallet.ApiException as e:\n        print(f\"Exception when calling auth_api-\u003esignup_with_email_and_password: {e}\")\n        print(f\"Error message: {e.body}\")\n\nif __name__ == \"__main__\":\n    signup_example()\n```\n\n## Configuration\n\nThe SDK can be configured with various options to customize its behavior and authentication methods.\n\n### Basic Configuration\n\n```python\nimport zarban.wallet.openapi_client as wallet\n\n# Basic configuration with just the host URL\ncfg = wallet.Configuration(host=\"https://wapi.zarban.io\")\n```\n\n### Authentication Options\n\nThe SDK supports multiple authentication methods:\n\n1. API Key Authentication:\n\n```python\ncfg = Configuration(\n    host=\"https://wapi.zarban.io\",\n    api_key={\"APIKeyAuth\": \"your-api-key-here\"},\n    # Optional: Add prefix like 'Bearer' for the API key\n    api_key_prefix={\"APIKeyAuth\": \"Bearer\"}\n)\n```\n\n2. Basic Authentication:\n\n```python\ncfg = Configuration(\n    host=\"https://wapi.zarban.io\",\n    username=\"your-username\",\n    password=\"your-password\"\n)\n```\n\n### Advanced Configuration\n\n```python\ncfg = Configuration(\n    host=\"https://wapi.zarban.io\",\n    api_key={\"APIKeyAuth\": \"your-api-key-here\"},\n    # Discard unknown properties from server responses\n    discard_unknown_keys=True\n)\n```\n\n### Configuration Parameters\n\n| Parameter              | Type | Description                                                                           |\n| ---------------------- | ---- | ------------------------------------------------------------------------------------- |\n| `host`                 | str  | Base URL for the API endpoints                                                        |\n| `api_key`              | dict | Dictionary of API keys where key is the security scheme name and value is the API key |\n| `api_key_prefix`       | dict | Dictionary of API key prefixes (e.g., \"Bearer\")                                       |\n| `username`             | str  | Username for HTTP basic authentication                                                |\n| `password`             | str  | Password for HTTP basic authentication                                                |\n| `discard_unknown_keys` | bool | Whether to discard unknown properties from server responses                           |\n\n## Error Handling\n\n```python\nimport zarban.service.openapi_client as service\n\ntry:\n    cfg = service.Configuration(host=\"https://api.zarban.io\")\n    api_client = service.ApiClient(cfg)\n    stable_coin_system_api = service.StableCoinSystemApi(api_client)\n    response = stable_coin_system_api.some_method()\nexcept ApiException as e:\n    print(f\"An error occurred: {e}\")\n```\n\n## Development\n\n### Setting Up Development Environment\n\n```bash\n# Clone the repository\ngit clone https://github.com/zarbanio/zarban-py.git\ncd zarban-py\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: .\\venv\\Scripts\\activate\n\n# Install development dependencies\npip install -e \".[dev]\"\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n1. Fork the repository\n2. Create a new branch\n3. Make your changes\n4. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n- Create an issue on GitHub\n- Email: info@zarban.io\n- Documentation: [https://docs.zarban.io](https://docs.zarban.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzarbanio%2Fzarban-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzarbanio%2Fzarban-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzarbanio%2Fzarban-py/lists"}