https://github.com/arangodb/python-arango-async
The official ArangoDB async Python driver
https://github.com/arangodb/python-arango-async
arangodb asyncio python
Last synced: about 2 months ago
JSON representation
The official ArangoDB async Python driver
- Host: GitHub
- URL: https://github.com/arangodb/python-arango-async
- Owner: arangodb
- License: mit
- Created: 2024-03-08T13:35:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-24T18:38:40.000Z (about 2 months ago)
- Last Synced: 2025-04-24T19:37:51.628Z (about 2 months ago)
- Topics: arangodb, asyncio, python
- Language: Python
- Homepage: https://python-arango-async.readthedocs.io/en/latest/
- Size: 320 KB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://dl.circleci.com/status-badge/redirect/gh/arangodb/python-arango-async/tree/main)
[](https://github.com/arangodb/python-arango-async/actions/workflows/codeql.yaml)
[](https://github.com/arangodb/python-arango-async/commits/main)[](https://pypi.org/project/python-arango-async/)
[](https://pypi.org/project/python-arango-async/)[](https://github.com/arangodb/python-arango/blob/main/LICENSE)
[](https://github.com/psf/black)
[](https://pepy.tech/project/python-arango-async)# python-arango-async
Python driver for [ArangoDB](https://www.arangodb.com), a scalable multi-model
database natively supporting documents, graphs and search.This is the _asyncio_ alternative of the officially supported [python-arango](https://github.com/arangodb/python-arango)
driver.**Note: This project is still in active development, features might be added or removed.**
## Requirements
- ArangoDB version 3.11+
- Python version 3.9+## Installation
```shell
pip install python-arango-async --upgrade
```## Getting Started
Here is a simple usage example:
```python
from arangoasync import ArangoClient
from arangoasync.auth import Authasync def main():
# Initialize the client for ArangoDB.
async with ArangoClient(hosts="http://localhost:8529") as client:
auth = Auth(username="root", password="passwd")# Connect to "_system" database as root user.
sys_db = await client.db("_system", auth=auth)# Create a new database named "test".
await sys_db.create_database("test")# Connect to "test" database as root user.
db = await client.db("test", auth=auth)# Create a new collection named "students".
students = await db.create_collection("students")# Add a persistent index to the collection.
await students.add_index(type="persistent", fields=["name"], options={"unique": True})# Insert new documents into the collection.
await students.insert({"name": "jane", "age": 39})
await students.insert({"name": "josh", "age": 18})
await students.insert({"name": "judy", "age": 21})# Execute an AQL query and iterate through the result cursor.
cursor = await db.aql.execute("FOR doc IN students RETURN doc")
async with cursor:
student_names = []
async for doc in cursor:
student_names.append(doc["name"])```
Please see the [documentation](https://python-arango-async.readthedocs.io/en/latest/) for more details.