injective-py


Nameinjective-py JSON
Version 1.8.0 PyPI version JSON
download
home_pagehttps://injectivelabs.org/
SummaryInjective Python SDK, with Exchange API Client
upload_time2024-11-14 12:40:21
maintainerNone
docs_urlNone
authorInjective Labs
requires_python<4.0,>=3.9
licenseApache-2.0
keywords injective blockchain cosmos injectivelabs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 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/18/41/f8b61f922e3accd90a66a4aacb0e789457bd48abe2c63c6510e37da4d9b9/injective_py-1.8.0.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.0",
    "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": "b752b76df9127fd257bd418021668cd70083b79b9dd931521fb236332a7f7e1a",
                "md5": "df4ef3a93cc58f30be98040a897847ca",
                "sha256": "ebf6ef16d1f43f0fbd58cde6eb61c9461fdb9221c0f093ee99ff5188e7029897"
            },
            "downloads": -1,
            "filename": "injective_py-1.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "df4ef3a93cc58f30be98040a897847ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 912804,
            "upload_time": "2024-11-14T12:40:19",
            "upload_time_iso_8601": "2024-11-14T12:40:19.633604Z",
            "url": "https://files.pythonhosted.org/packages/b7/52/b76df9127fd257bd418021668cd70083b79b9dd931521fb236332a7f7e1a/injective_py-1.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1841f8b61f922e3accd90a66a4aacb0e789457bd48abe2c63c6510e37da4d9b9",
                "md5": "58a8e11b81f16119818d59a2449d7d5e",
                "sha256": "6a531c6478afbd080fe5255d4b81af923ebd3407dc77c5ee4db488774446b669"
            },
            "downloads": -1,
            "filename": "injective_py-1.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "58a8e11b81f16119818d59a2449d7d5e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 496998,
            "upload_time": "2024-11-14T12:40:21",
            "upload_time_iso_8601": "2024-11-14T12:40:21.824398Z",
            "url": "https://files.pythonhosted.org/packages/18/41/f8b61f922e3accd90a66a4aacb0e789457bd48abe2c63c6510e37da4d9b9/injective_py-1.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 12:40:21",
    "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"
}
        
Elapsed time: 0.48419s