{"id":21177289,"url":"https://github.com/codechain-io/codechain-sdk-python","last_synced_at":"2025-07-09T22:30:33.713Z","repository":{"id":50181460,"uuid":"194235612","full_name":"CodeChain-io/codechain-sdk-python","owner":"CodeChain-io","description":"Python Software Development Kit for CodeChain","archived":false,"fork":false,"pushed_at":"2022-12-08T03:15:30.000Z","size":228,"stargazers_count":7,"open_issues_count":11,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-04T21:07:11.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeChain-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-28T08:19:19.000Z","updated_at":"2025-06-01T17:26:07.000Z","dependencies_parsed_at":"2023-01-24T07:15:48.303Z","dependency_job_id":null,"html_url":"https://github.com/CodeChain-io/codechain-sdk-python","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/CodeChain-io/codechain-sdk-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Fcodechain-sdk-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Fcodechain-sdk-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Fcodechain-sdk-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Fcodechain-sdk-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeChain-io","download_url":"https://codeload.github.com/CodeChain-io/codechain-sdk-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeChain-io%2Fcodechain-sdk-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504570,"owners_count":23618824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-20T17:15:26.248Z","updated_at":"2025-07-09T22:30:33.322Z","avatar_url":"https://github.com/CodeChain-io.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeChain SDK for Python\n\nA Python SDK for CodeChain.\n\n## API Documentation (For SDK users)\n\nNot prepared\n\n## Getting Started (For SDK developers)\n\n### Submitting patches\n- Use `Black` to autoformat your code. This should be done for you as a git `pre-commit` hook.\n\n### First time setup\n- Clone your GitHub fork locally:\n- Add the main repository as a remote to update later:\n- Create a virtualenv using pipenv:\n```shell\n$ make init\n```\n- Install the pre-commit hooks:\n```shell\n$ pre-commit install --install-hooks\n```\n### Add dependency\n- Install the dependency using pipenv\n1. In the test environment\n```shell\n$ pipenv install [package] --dev\n```\n2. In the production\n```shell\n$ pip3 install [package]\n```\nand specify it to the `setup.py`\n- lock the dependency\n```shell\n$ pipenv lock\n```\n### Run test cases\n```shell\n$ make test\n```\n\n## Usage\n\n```python\n#!/usr/bin/python3\nfrom codechain import SDK\n\nsdk = SDK(\"http://localhost:8080\", \"tc\")\n\nACCOUNT_SECRET = \"ede1d4ccb4ec9a8bbbae9a13db3f4a7b56ea04189be86ac3a6a439d9a0a1addd\"\nACCOUNT_ADDRESS = \"tccq9h7vnl68frvqapzv3tujrxtxtwqdnxw6yamrrgd\"\nACCOUNT_PASSPHRASE = \"satoshi\"\n\naddress = sdk.rpc.account.import_raw(ACCOUNT_SECRET, ACCOUNT_PASSPHRASE)\naddress = \"tcaqyqckq0zgdxgpck6tjdg4qmp52p2vx3qaexqnegylk\"\n\ntx = sdk.core.create_mint_asset_transaction(\n    address,\n    None,\n    None,\n    None,\n    0,\n    {\"name\": \"Silver Coin\", \"description\": \"...\", \"icon_url\": \"...\"},\n    None,\n    None,\n    None,\n    100000000,\n)\n\ntx_hash = sdk.rpc.chain.send_transaction(tx, ACCOUNT_ADDRESS, ACCOUNT_PASSPHRASE)\n\nresult = sdk.rpc.chain.contains_transaction(tx_hash)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodechain-io%2Fcodechain-sdk-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodechain-io%2Fcodechain-sdk-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodechain-io%2Fcodechain-sdk-python/lists"}