{"id":13716494,"url":"https://github.com/StellarCN/py-stellar-base","last_synced_at":"2025-05-07T05:33:20.999Z","repository":{"id":2239596,"uuid":"43143745","full_name":"StellarCN/py-stellar-base","owner":"StellarCN","description":"Stellar client library for the Python language ","archived":false,"fork":false,"pushed_at":"2024-04-12T07:28:22.000Z","size":6645,"stargazers_count":340,"open_issues_count":2,"forks_count":168,"subscribers_count":34,"default_branch":"main","last_synced_at":"2024-04-12T15:09:30.114Z","etag":null,"topics":["blockchain","horizon","lumen","sdk","stellar"],"latest_commit_sha":null,"homepage":"https://stellar-sdk.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StellarCN.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-09-25T13:26:01.000Z","updated_at":"2024-04-15T12:01:21.223Z","dependencies_parsed_at":"2023-12-16T04:58:02.637Z","dependency_job_id":"301260f3-2659-4b0a-92e9-265b1974db1e","html_url":"https://github.com/StellarCN/py-stellar-base","commit_stats":{"total_commits":1103,"total_committers":44,"mean_commits":"25.068181818181817","dds":"0.30281051677243875","last_synced_commit":"bc992a499e05204a58bf3d00c3c749fc896ebabe"},"previous_names":[],"tags_count":159,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StellarCN%2Fpy-stellar-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StellarCN%2Fpy-stellar-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StellarCN%2Fpy-stellar-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StellarCN%2Fpy-stellar-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StellarCN","download_url":"https://codeload.github.com/StellarCN/py-stellar-base/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224564281,"owners_count":17332300,"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":["blockchain","horizon","lumen","sdk","stellar"],"created_at":"2024-08-03T00:01:11.011Z","updated_at":"2025-05-07T05:33:20.991Z","avatar_url":"https://github.com/StellarCN.png","language":"Python","funding_links":[],"categories":["Development","Developer Resources","开发者资源","Python"],"sub_categories":["SDKs"],"readme":"Stellar Python SDK\n==================\n\n.. image:: https://img.shields.io/github/actions/workflow/status/StellarCN/py-stellar-base/continuous-integration-workflow.yml?branch=main\n    :alt: GitHub Workflow Status\n    :target: https://github.com/StellarCN/py-stellar-base/actions\n\n.. image:: https://img.shields.io/readthedocs/stellar-sdk.svg\n    :alt: Read the Docs\n    :target: https://stellar-sdk.readthedocs.io/en/latest/\n\n.. image:: https://static.pepy.tech/personalized-badge/stellar-sdk?period=total\u0026units=abbreviation\u0026left_color=grey\u0026right_color=brightgreen\u0026left_text=Downloads\n    :alt: PyPI - Downloads\n    :target: https://pypi.python.org/pypi/stellar-sdk\n\n.. image:: https://api.codeclimate.com/v1/badges/b82487c7675d823dc0e9/maintainability\n   :target: https://codeclimate.com/github/StellarCN/py-stellar-base/maintainability\n   :alt: Maintainability\n\n.. image:: https://img.shields.io/codecov/c/github/StellarCN/py-stellar-base/v2\n    :alt: Codecov\n    :target: https://codecov.io/gh/StellarCN/py-stellar-base\n\n.. image:: https://img.shields.io/pypi/v/stellar-sdk.svg\n    :alt: PyPI\n    :target: https://pypi.python.org/pypi/stellar-sdk\n\n.. image:: https://img.shields.io/badge/python-%3E%3D3.8-blue\n    :alt: Python - Version\n    :target: https://pypi.python.org/pypi/stellar-sdk\n\n.. image:: https://img.shields.io/badge/implementation-cpython%20%7C%20pypy-blue\n    :alt: PyPI - Implementation\n    :target: https://pypi.python.org/pypi/stellar-sdk\n\n.. image:: https://img.shields.io/badge/Stellar%20Protocol-22-blue\n    :alt: Stellar Protocol\n    :target: https://developers.stellar.org/docs/glossary/scp/\n\npy-stellar-base is a Python library for communicating with\na `Stellar Horizon server`_ and `Soroban-RPC server`_. It is used for building Stellar apps on Python. It supports **Python 3.8+** as\nwell as PyPy 3.8+.\n\nIt provides:\n\n- a networking layer API for Horizon endpoints.\n- a networking layer API for Soroban-RPC server methods.\n- facilities for building and signing transactions, for communicating with a Stellar Horizon and Soroban-RPC instance, and for submitting transactions or querying network history.\n\nDocumentation\n-------------\npy-stellar-base's documentation can be found at https://stellar-sdk.readthedocs.io.\n\nInstalling\n----------\n\n.. code-block:: text\n\n    pip install --upgrade stellar-sdk\n\nIf you need to use asynchronous, please use the following command to install the required dependencies.\n\n.. code-block:: text\n\n    pip install --upgrade stellar-sdk[aiohttp]\n\nWe follow `Semantic Versioning 2.0.0 \u003chttps://semver.org/\u003e`_, and I strongly\nrecommend that you specify its major version number in the dependency\nfile to avoid the unknown effects of breaking changes.\n\nA Simple Example\n----------------\nYou can find more examples `here \u003chttps://github.com/StellarCN/py-stellar-base/tree/main/examples\u003e`__.\n\n.. code-block:: python\n\n    # Alice pay 10.25 XLM to Bob\n    from stellar_sdk import Asset, Server, Keypair, TransactionBuilder, Network\n\n    alice_keypair = Keypair.from_secret(\"SBFZCHU5645DOKRWYBXVOXY2ELGJKFRX6VGGPRYUWHQ7PMXXJNDZFMKD\")\n    bob_address = \"GA7YNBW5CBTJZ3ZZOWX3ZNBKD6OE7A7IHUQVWMY62W2ZBG2SGZVOOPVH\"\n\n    server = Server(\"https://horizon-testnet.stellar.org\")\n    alice_account = server.load_account(alice_keypair.public_key)\n    base_fee = 100\n    transaction = (\n        TransactionBuilder(\n            source_account=alice_account,\n            network_passphrase=Network.TESTNET_NETWORK_PASSPHRASE,\n            base_fee=base_fee,\n        )\n        .add_text_memo(\"Hello, Stellar!\")\n        .append_payment_op(bob_address, Asset.native(), \"10.25\")\n        .set_timeout(30)\n        .build()\n    )\n    transaction.sign(alice_keypair)\n    response = server.submit_transaction(transaction)\n    print(response)\n\nstellar-contract-bindings\n-------------------------\nstellar-contract-bindings allows you to generate Python bindings for Stellar Soroban smart contracts, it makes calling\nStellar Soroban contracts easier. click `here \u003chttps://github.com/lightsail-network/stellar-contract-bindings\u003e`__ for more information.\n\nstellar-model\n-------------\nstellar-model allows you to parse the JSON returned by Stellar Horizon\ninto the Python models, click `here \u003chttps://github.com/StellarCN/stellar-model\u003e`__ for more information.\n\nLinks\n-----\n* Document: https://stellar-sdk.readthedocs.io\n* Code: https://github.com/StellarCN/py-stellar-base\n* Examples: https://github.com/StellarCN/py-stellar-base/tree/main/examples\n* Issue tracker: https://github.com/StellarCN/py-stellar-base/issues\n* License: `Apache License 2.0 \u003chttps://github.com/StellarCN/py-stellar-base/blob/master/LICENSE\u003e`_\n* Releases: https://pypi.org/project/stellar-sdk/\n\nThank you to all the people who have already contributed to py-stellar-base!\n\n.. _Stellar Horizon server: https://github.com/stellar/go/tree/master/services/horizon\n.. _Soroban-RPC server: https://soroban.stellar.org/docs/reference/rpc","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStellarCN%2Fpy-stellar-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStellarCN%2Fpy-stellar-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStellarCN%2Fpy-stellar-base/lists"}