Skip to content

Commit

Permalink
(fix) Updated README file
Browse files Browse the repository at this point in the history
  • Loading branch information
abel committed Sep 19, 2023
1 parent 9c3bff0 commit 189c498
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ pip install injective-py
```

### Usage
Requires Python 3.7+
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
$ pipenv shell
$ pipenv install
$ poetry install

# connecting to Injective Exchange API
# and listening for new orders from a specific spot market
$ python examples/exchange_client/spot_exchange_rpc/8_StreamOrders.py
$ 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
$ python examples/chain_client/1_MsgSend.py
$ poetry run python examples/chain_client/1_MsgSend.py
```
Upgrade `pip` to the latest version, if you see these warnings:
```
Expand All @@ -51,16 +51,10 @@ Upgrade `pip` to the latest version, if you see these warnings:
1. Generate proto binding & build
```
make gen
python -m build
poetry build
```

2. Enable dev env
```
pipenv shell
pipenv install --dev
```

3. Install pkg
2. Install pkg
```
# from local build
pip uninstall injective-py
Expand All @@ -71,27 +65,23 @@ Upgrade `pip` to the latest version, if you see these warnings:
pip install injective-py
```

4. Fetch latest denom config
3. Fetch latest denom config
```
python pyinjective/fetch_metadata.py
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)

5. Install the development environment (requires `pipenv`)
```
pipenv install -d
```

6. Run all unit tests in a development environment
4. Run all unit tests in a development environment
```
make tests
poetry run pytest -v
```

### Changelogs
**0.9**
* Replace Pipenv with Poetry
* Add pre-commit validations to the project
* Add a GitHub workflow to run all tests and calculate coverage for each PR

**0.8.5**
* Added NEOK/USDT and ORAI/USDT spot markets to the mainnet .ini file
Expand Down

0 comments on commit 189c498

Please sign in to comment.