Metadata-Version: 2.1
Name: driftpy
Version: 0.7.4
Summary: A Python client for the Drift DEX
Home-page: https://github.com/drift-labs/driftpy
License: MIT
Author: x19
Author-email: https://twitter.com/0xNineteen@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiodns (==3.0.0)
Requires-Dist: aiohttp (==3.8.3)
Requires-Dist: aiosignal (==1.3.1)
Requires-Dist: anchorpy (==0.17.1)
Requires-Dist: anchorpy-core (==0.1.2)
Requires-Dist: anyio (==3.6.2)
Requires-Dist: apischema (==0.17.5)
Requires-Dist: async-timeout (==4.0.2)
Requires-Dist: attrs (==22.1.0)
Requires-Dist: backoff (==2.2.1)
Requires-Dist: base58 (==2.1.1)
Requires-Dist: based58 (==0.1.1)
Requires-Dist: borsh-construct (==0.1.0)
Requires-Dist: cachetools (==4.2.4)
Requires-Dist: certifi (==2022.12.7)
Requires-Dist: cffi (==1.15.1)
Requires-Dist: charset-normalizer (==2.1.1)
Requires-Dist: construct (==2.10.68)
Requires-Dist: construct-typing (==0.5.3)
Requires-Dist: deprecated (>=1.2.14,<2.0.0)
Requires-Dist: dnspython (==2.2.1)
Requires-Dist: events (>=0.5,<0.6)
Requires-Dist: exceptiongroup (==1.0.4)
Requires-Dist: flake8 (==6.0.0)
Requires-Dist: frozenlist (==1.3.3)
Requires-Dist: h11 (==0.14.0)
Requires-Dist: httpcore (==0.16.3)
Requires-Dist: httpx (==0.23.1)
Requires-Dist: idna (==3.4)
Requires-Dist: iniconfig (==1.1.1)
Requires-Dist: jinja2 (<3.1)
Requires-Dist: jsonalias (==0.1.1)
Requires-Dist: jsonrpcclient (==4.0.2)
Requires-Dist: jsonrpcserver (==5.0.9)
Requires-Dist: jsonschema (==4.17.3)
Requires-Dist: loguru (==0.6.0)
Requires-Dist: mccabe (==0.7.0)
Requires-Dist: mkdocs (>=1.3.0,<2.0.0)
Requires-Dist: more-itertools (==8.14.0)
Requires-Dist: multidict (==6.0.3)
Requires-Dist: mypy (>=1.7.0,<2.0.0)
Requires-Dist: oslash (==0.6.3)
Requires-Dist: packaging (==22.0)
Requires-Dist: pluggy (==1.0.0)
Requires-Dist: psutil (==5.9.4)
Requires-Dist: py (==1.11.0)
Requires-Dist: pycares (==4.3.0)
Requires-Dist: pycodestyle (==2.10.0)
Requires-Dist: pycparser (==2.21)
Requires-Dist: pyflakes (==3.0.1)
Requires-Dist: pyheck (==0.1.5)
Requires-Dist: pyrsistent (==0.19.2)
Requires-Dist: pytest (>=7.2.0,<8.0.0)
Requires-Dist: pytest-asyncio (>=0.21.0,<0.22.0)
Requires-Dist: pytest-xprocess (>=0.18.1,<0.19.0)
Requires-Dist: pythclient (==0.1.4)
Requires-Dist: requests (==2.28.1)
Requires-Dist: rfc3986 (==1.5.0)
Requires-Dist: sniffio (==1.3.0)
Requires-Dist: solana (==0.30.1)
Requires-Dist: solders (==0.17.0)
Requires-Dist: sumtypes (==0.1a6)
Requires-Dist: toml (==0.10.2)
Requires-Dist: tomli (==2.0.1)
Requires-Dist: toolz (==0.11.2)
Requires-Dist: types-cachetools (==4.2.10)
Requires-Dist: types-requests (>=2.28.9,<3.0.0)
Requires-Dist: typing-extensions (==4.4.0)
Requires-Dist: urllib3 (==1.26.13)
Requires-Dist: websockets (==10.4)
Requires-Dist: yarl (==1.8.2)
Requires-Dist: zstandard (==0.18.0)
Project-URL: Documentation, https://drift-labs.github.io/driftpy/
Description-Content-Type: text/markdown

# DriftPy

<div align="center">
    <img src="docs/img/drift.png" width="30%" height="30%">
</div>

DriftPy is the Python client for the [Drift](https://www.drift.trade/) protocol. It allows you to trade and fetch data from Drift using Python.

**[Read the full SDK documentation here!](https://drift-labs.github.io/driftpy/)**

## Installation

```
pip install driftpy
```

Note: requires Python >= 3.10.

## SDK Examples

- `examples/` folder includes more examples of how to use the SDK including how to provide liquidity/become an lp, stake in the insurance fund, etc.

## Setting Up Dev Env

`bash setup.sh`


## Building the docs

Local Docs: `mkdocs serve`

Updating public docs: `poetry run mkdocs gh-deploy --force`

## Releasing a new version of the package

- `python new_release.py`
- Create a new release at https://github.com/drift-labs/driftpy/releases.
  - (The CI process will upload a new version of the package to PyPI.)

# Development

Ensure correct python version (using pyenv is recommended):
```
pyenv install 3.10.11
pyenv global 3.10.11
poetry env use $(pyenv which python)
```

Install dependencies:
```
poetry install
```

Run tests:
```
poetry run bash test.sh
```

Run Acceptance Tests
```
poetry run bash acceptance_test.sh
```
