## Injective Python SDK
[![codecov](https://codecov.io/gh/InjectiveLabs/sdk-python/graph/badge.svg?token=RBGK98G6F1)](https://codecov.io/gh/InjectiveLabs/sdk-python)
### Dependencies
**Ubuntu**
```bash
sudo apt install python3.X-dev autoconf automake build-essential libffi-dev libtool pkg-config
```
**Fedora**
```bash
sudo dnf install python3-devel autoconf automake gcc gcc-c++ libffi-devel libtool make pkgconfig
```
**macOS**
```bash
brew install autoconf automake libtool bufbuild/buf/buf
```
### Quick Start
Installation
```bash
pip install injective-py
```
### Usage
Requires Python 3.9+
Please install `poetry` following the steps described in the [documentation](https://python-poetry.org/docs/#installation)
[Examples](https://github.com/InjectiveLabs/sdk-python/tree/master/examples)
```bash
$ poetry install
# connecting to Injective Exchange API
# and listening for new orders from a specific spot market
$ poetry run python examples/exchange_client/spot_exchange_rpc/8_StreamOrders.py
# sending a msg with bank transfer
# signs and posts a transaction to the Injective Chain
$ poetry run python examples/chain_client/1_MsgSend.py
```
Upgrade `pip` to the latest version, if you see these warnings:
```
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
WARNING: Additional context: user = True home = None root = None prefix = None
```
### Development
1. Generate proto binding & build
```
make gen
poetry build
```
2. Install pkg
```
# from local build
pip uninstall injective-py
pip install injective-py --no-index --find-links /path/to/injective/sdk-python/dist
# from pypi
pip uninstall injective-py
pip install injective-py
```
3. Fetch latest denom config
```
poetry run python pyinjective/utils/fetch_metadata.py
```
Note that the [sync client](https://github.com/InjectiveLabs/sdk-python/blob/master/pyinjective/client.py) has been deprecated as of April 18, 2022. If you are using the sync client please make sure to transition to the [async client](https://github.com/InjectiveLabs/sdk-python/blob/master/pyinjective/async_client.py), for more information read [here](https://github.com/InjectiveLabs/sdk-python/issues/101)
4. Run all unit tests in a development environment
```
poetry run pytest -v
```
## License
Copyright © 2021 - 2022 Injective Labs Inc. (https://injectivelabs.org/)
<a href="https://drive.google.com/uc?export=view&id=1-fPQRh_D_dnun2yTtSsPW5MypVBOVYJP"><img src="https://drive.google.com/uc?export=view&id=1-fPQRh_D_dnun2yTtSsPW5MypVBOVYJP" style="width: 300px; max-width: 100%; height: auto" />
Originally released by Injective Labs Inc. under: <br />
Apache License <br />
Version 2.0, January 2004 <br />
http://www.apache.org/licenses/
Raw data
{
"_id": null,
"home_page": "https://injectivelabs.org/",
"name": "injective-py",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "injective, blockchain, cosmos, injectivelabs",
"author": "Injective Labs",
"author_email": "contact@injectivelabs.org",
"download_url": "https://files.pythonhosted.org/packages/0b/77/6f15c18c50375e46ba1fcc41af7885bfc5fd4af9b794799528087b1cc374/injective_py-1.8.2.tar.gz",
"platform": null,
"description": "## Injective Python SDK\n\n[![codecov](https://codecov.io/gh/InjectiveLabs/sdk-python/graph/badge.svg?token=RBGK98G6F1)](https://codecov.io/gh/InjectiveLabs/sdk-python)\n\n### Dependencies\n\n**Ubuntu**\n```bash\nsudo apt install python3.X-dev autoconf automake build-essential libffi-dev libtool pkg-config\n```\n**Fedora**\n```bash\nsudo dnf install python3-devel autoconf automake gcc gcc-c++ libffi-devel libtool make pkgconfig\n```\n\n**macOS**\n\n```bash\nbrew install autoconf automake libtool bufbuild/buf/buf\n```\n\n### Quick Start\nInstallation\n```bash\npip install injective-py\n```\n\n### Usage\nRequires Python 3.9+\nPlease install `poetry` following the steps described in the [documentation](https://python-poetry.org/docs/#installation)\n\n[Examples](https://github.com/InjectiveLabs/sdk-python/tree/master/examples)\n```bash\n$ poetry install\n\n# connecting to Injective Exchange API\n# and listening for new orders from a specific spot market\n$ poetry run python examples/exchange_client/spot_exchange_rpc/8_StreamOrders.py\n\n# sending a msg with bank transfer\n# signs and posts a transaction to the Injective Chain\n$ poetry run python examples/chain_client/1_MsgSend.py\n```\nUpgrade `pip` to the latest version, if you see these warnings:\n ```\n WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>\n WARNING: Additional context: user = True home = None root = None prefix = None\n ```\n\n### Development\n1. Generate proto binding & build\n ```\n make gen\n poetry build\n ```\n\n2. Install pkg\n ```\n # from local build\n pip uninstall injective-py\n pip install injective-py --no-index --find-links /path/to/injective/sdk-python/dist\n\n # from pypi\n pip uninstall injective-py\n pip install injective-py\n ```\n\n3. Fetch latest denom config\n```\npoetry run python pyinjective/utils/fetch_metadata.py\n```\n\nNote that the [sync client](https://github.com/InjectiveLabs/sdk-python/blob/master/pyinjective/client.py) has been deprecated as of April 18, 2022. If you are using the sync client please make sure to transition to the [async client](https://github.com/InjectiveLabs/sdk-python/blob/master/pyinjective/async_client.py), for more information read [here](https://github.com/InjectiveLabs/sdk-python/issues/101)\n\n4. Run all unit tests in a development environment\n```\npoetry run pytest -v\n```\n\n## License\n\nCopyright \u00a9 2021 - 2022 Injective Labs Inc. (https://injectivelabs.org/)\n\n<a href=\"https://drive.google.com/uc?export=view&id=1-fPQRh_D_dnun2yTtSsPW5MypVBOVYJP\"><img src=\"https://drive.google.com/uc?export=view&id=1-fPQRh_D_dnun2yTtSsPW5MypVBOVYJP\" style=\"width: 300px; max-width: 100%; height: auto\" />\n\nOriginally released by Injective Labs Inc. under: <br />\nApache License <br />\nVersion 2.0, January 2004 <br />\nhttp://www.apache.org/licenses/\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Injective Python SDK, with Exchange API Client",
"version": "1.8.2",
"project_urls": {
"Documentation": "https://api.injective.exchange/",
"Homepage": "https://injectivelabs.org/",
"Repository": "https://github.com/InjectiveLabs/sdk-python"
},
"split_keywords": [
"injective",
" blockchain",
" cosmos",
" injectivelabs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a466dd00473120f1727a34f3d3089166cf71d4f850f0e8611545cacb3828c1c0",
"md5": "3a4b270971919fe30c9c3202df3e937f",
"sha256": "4a55729b7f98621e9b77b275b0d94423bc2970f5ea427f51ac9b3f131082689b"
},
"downloads": -1,
"filename": "injective_py-1.8.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3a4b270971919fe30c9c3202df3e937f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 912898,
"upload_time": "2024-12-13T15:52:23",
"upload_time_iso_8601": "2024-12-13T15:52:23.405816Z",
"url": "https://files.pythonhosted.org/packages/a4/66/dd00473120f1727a34f3d3089166cf71d4f850f0e8611545cacb3828c1c0/injective_py-1.8.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0b776f15c18c50375e46ba1fcc41af7885bfc5fd4af9b794799528087b1cc374",
"md5": "a0421f431a5d713be9c8681cc2fb91fd",
"sha256": "78fbe7bf71dcae7c13d82423837b7e3a984e12c00b8db81e81a55c93e35c1765"
},
"downloads": -1,
"filename": "injective_py-1.8.2.tar.gz",
"has_sig": false,
"md5_digest": "a0421f431a5d713be9c8681cc2fb91fd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 497355,
"upload_time": "2024-12-13T15:52:25",
"upload_time_iso_8601": "2024-12-13T15:52:25.969952Z",
"url": "https://files.pythonhosted.org/packages/0b/77/6f15c18c50375e46ba1fcc41af7885bfc5fd4af9b794799528087b1cc374/injective_py-1.8.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-13 15:52:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "InjectiveLabs",
"github_project": "sdk-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "injective-py"
}