injective-py


Nameinjective-py JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://injectivelabs.org/
SummaryInjective Python SDK, with Exchange API Client
upload_time2024-04-19 14:27:25
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
```

### 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/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/5e/1a/2872f635c07b28c339372226b99e9ea3a021bb1d653834b231cd4ff4d703/injective_py-1.5.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\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/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.5.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": "e0086fa2ff7bb4ff9d116b124635adacba292162f658c39706fd53573e69cc9c",
                "md5": "8a86e95835c974bf66ea1d9c571aab2a",
                "sha256": "00a789a3cb897478c1c24e359c2ec95bc69b0559513095d19fe4ee37d6097b81"
            },
            "downloads": -1,
            "filename": "injective_py-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a86e95835c974bf66ea1d9c571aab2a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 774309,
            "upload_time": "2024-04-19T14:27:22",
            "upload_time_iso_8601": "2024-04-19T14:27:22.733680Z",
            "url": "https://files.pythonhosted.org/packages/e0/08/6fa2ff7bb4ff9d116b124635adacba292162f658c39706fd53573e69cc9c/injective_py-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e1a2872f635c07b28c339372226b99e9ea3a021bb1d653834b231cd4ff4d703",
                "md5": "01151e5feb5cab1c712bdff9514431c1",
                "sha256": "bbc72f7d2968feaa8a929f4b200301599a95898650bed12f5798f6437f395295"
            },
            "downloads": -1,
            "filename": "injective_py-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "01151e5feb5cab1c712bdff9514431c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 422373,
            "upload_time": "2024-04-19T14:27:25",
            "upload_time_iso_8601": "2024-04-19T14:27:25.916023Z",
            "url": "https://files.pythonhosted.org/packages/5e/1a/2872f635c07b28c339372226b99e9ea3a021bb1d653834b231cd4ff4d703/injective_py-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-19 14:27: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"
}
        
Elapsed time: 0.24355s