---
title: PyDo
description: Official Python client for the DigitalOcean API (OpenAPIv3). Install with pip, authenticate with a personal access token, and call API operations via
product: Reference
url: https://docs.digitalocean.com/reference/pydo/
last_updated: "2024-10-02"
---
> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).
# PyDo
PyDo is DigitalOceans official Python client library based on DigitalOceans OpenAPIv3 specification.
## Installation
To use PyDo, you need Python version 3.7.2 or higher.
You can install the latest stable release of PyDo from PyPi:
```shell
pip install pydo
```
You can alternatively install the most recent version of PyDo from the GitHub repository:
```shell
pip install git+https://github.com/digitalocean/pydo.git
```
You can also install from source by [cloning the repository](https://github.com/digitalocean/pydo) and using `make install`.
## Quickstart
You need to initialize PyDo with `pydo.Client()` and pass it [a DigitalOcean API token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md):
```python
import os
from pydo import Client
client = Client(token=os.getenv("DIGITALOCEAN_TOKEN"))
```
Most endpoints in our API have a corresponding PyDo example, which you can view in the API spec and directly in the PyDo library reference.
## More Information
[GitHub - digitalocean/pydo](https://github.com/digitalocean/pydo): The `pydo` GitHub repository.
[DigitalOcean PyDo Python Library Reference](https://docs.digitalocean.com/reference/pydo/reference/index.html.md): PyDo is the official Python client library for the DigitalOcean API. It provides a Python abstraction layer on top of the raw [HTTP API](https://docs.digitalocean.com/reference/api/digitalocean/index.html.md), wrapping a generated client based on the [DigitalOcean OpenAPI Specification](https://github.com/digitalocean/pydo).