> For the complete documentation index, see [llms.txt](https://drift-2.gitbook.io/driftpy-for-dummies/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://drift-2.gitbook.io/driftpy-for-dummies/driftpy-for-dummies.md).

# DriftPy for Dummies

By frank (<https://twitter.com/soundsonacid>)

DriftPy is the Python SDK for the Drift Protocol.  It's intended to mirror the TypeScript SDK, but is still a WIP and lacking some functionalities.  This is the main source for how-tos in DriftPy and solutions for common pitfalls.\
\
If you're using a free RPC, the author's official recommendation is the free Helius RPC with a verified email.  <https://dev.helius.xyz/>

Find the DriftPy repo here: <https://github.com/drift-labs/driftpy>

Find the Keepyrs repo here: <https://github.com/drift-labs/keepyrs>

Find the PyPi package here: [https://pypi.org/project/driftpy](https://pypi.org/project/driftpy/)

To install DriftPy in your project, run `pip install driftpy` or `poetry add driftpy` .

You'll also need to add the `solana` library to your project, and optionally, the `anchorpy` library.  You can follow similar syntax to add those as you did to add DriftPy.  The `solders` library, which will be used in several examples, is re-exported from `solana` .  You can safely ignore any "Module not found" warnings or errors caused by `solders` imports from code found in this book.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://drift-2.gitbook.io/driftpy-for-dummies/driftpy-for-dummies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
