Python Driver for ArangoDB
Project Links
Meta
Author: Joohwan Oh
Maintainer: Joohwan Oh, Alexandru Petenchea, Anthony Mahanna
Requires Python: >=3.9
Classifiers
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Natural Language
- English
Operating System
- OS Independent
Programming Language
- Python :: 3
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
Topic
- Documentation :: Sphinx
Typing
- Typed
Python-Arango
Python driver for ArangoDB, a scalable multi-model database natively supporting documents, graphs and search.
If you're interested in using asyncio, please check python-arango-async.
Requirements
- ArangoDB version 3.11+
- Python version 3.9+
Installation
pip install python-arango --upgrade
Getting Started
Here is a simple usage example:
from arango import ArangoClient
# Initialize the client for ArangoDB.
client = ArangoClient(hosts="http://localhost:8529")
# Connect to "_system" database as root user.
sys_db = client.db("_system", username="root", password="passwd")
# Create a new database named "test".
sys_db.create_database("test")
# Connect to "test" database as root user.
db = client.db("test", username="root", password="passwd")
# Create a new collection named "students".
students = db.create_collection("students")
# Add a persistent index to the collection.
students.add_index({'type': 'persistent', 'fields': ['name'], 'unique': True})
# Insert new documents into the collection.
students.insert({"name": "jane", "age": 39})
students.insert({"name": "josh", "age": 18})
students.insert({"name": "judy", "age": 21})
# Execute an AQL query and iterate through the result cursor.
cursor = db.aql.execute("FOR doc IN students RETURN doc")
student_names = [document["name"] for document in cursor]
Another example with graphs:
from arango import ArangoClient
# Initialize the client for ArangoDB.
client = ArangoClient(hosts="http://localhost:8529")
# Connect to "test" database as root user.
db = client.db("test", username="root", password="passwd")
# Create a new graph named "school".
graph = db.create_graph("school")
# Create a new EnterpriseGraph [Enterprise Edition]
eegraph = db.create_graph(
name="school",
smart=True)
# Create vertex collections for the graph.
students = graph.create_vertex_collection("students")
lectures = graph.create_vertex_collection("lectures")
# Create an edge definition (relation) for the graph.
edges = graph.create_edge_definition(
edge_collection="register",
from_vertex_collections=["students"],
to_vertex_collections=["lectures"]
)
# Insert vertex documents into "students" (from) vertex collection.
students.insert({"_key": "01", "full_name": "Anna Smith"})
students.insert({"_key": "02", "full_name": "Jake Clark"})
students.insert({"_key": "03", "full_name": "Lisa Jones"})
# Insert vertex documents into "lectures" (to) vertex collection.
lectures.insert({"_key": "MAT101", "title": "Calculus"})
lectures.insert({"_key": "STA101", "title": "Statistics"})
lectures.insert({"_key": "CSC101", "title": "Algorithms"})
# Insert edge documents into "register" edge collection.
edges.insert({"_from": "students/01", "_to": "lectures/MAT101"})
edges.insert({"_from": "students/01", "_to": "lectures/STA101"})
edges.insert({"_from": "students/01", "_to": "lectures/CSC101"})
edges.insert({"_from": "students/02", "_to": "lectures/MAT101"})
edges.insert({"_from": "students/02", "_to": "lectures/STA101"})
edges.insert({"_from": "students/03", "_to": "lectures/CSC101"})
# Traverse the graph in outbound direction, breath-first.
query = """
FOR v, e, p IN 1..3 OUTBOUND 'students/01' GRAPH 'school'
OPTIONS { bfs: true, uniqueVertices: 'global' }
RETURN {vertex: v, edge: e, path: p}
"""
cursor = db.aql.execute(query)
Please see the documentation for more details.
Aug 18, 2025
8.2.2
Jul 09, 2025
8.2.1
Jun 04, 2025
8.2.0
May 24, 2025
8.1.7
Feb 28, 2025
8.1.6
Feb 24, 2025
8.1.5
Dec 10, 2024
8.1.4
Nov 28, 2024
8.1.3
Oct 01, 2024
8.1.2
Sep 13, 2024
8.1.1
Aug 12, 2024
8.1.0
May 29, 2024
8.0.0
Jan 18, 2024
7.9.1
Jan 05, 2024
7.9.0
Nov 13, 2023
7.8.1
Nov 07, 2023
7.8.0
Sep 22, 2023
7.7.0
Aug 31, 2023
7.6.2
Aug 25, 2023
7.6.1
Aug 01, 2023
7.6.0
Jul 14, 2023
7.5.9
Jun 02, 2023
7.5.8
Feb 21, 2023
7.5.7
Jan 28, 2023
7.5.6
Jan 09, 2023
7.5.5
Dec 13, 2022
7.5.4
Nov 27, 2022
7.5.3
Oct 13, 2022
7.5.2
Oct 04, 2022
7.5.1
Sep 22, 2022
7.5.0
Jun 28, 2022
7.4.1
Jun 27, 2022
7.4.0
May 08, 2022
7.3.4
Apr 16, 2022
7.3.3
Apr 01, 2022
7.3.2
Feb 01, 2022
7.3.1
Dec 16, 2021
7.3.0
Jun 30, 2021
7.2.0
Feb 25, 2021
7.1.0
Feb 20, 2021
7.0.1
Feb 20, 2021
7.0.0
Nov 15, 2020
6.1.0
Aug 28, 2020
6.0.0
Mar 08, 2020
5.4.0
Feb 28, 2020
5.3.0
Oct 08, 2019
5.2.1
Sep 22, 2019
5.2.0
Aug 25, 2019
5.1.0
Aug 22, 2019
5.0.0
Jan 04, 2019
4.4.0
Dec 11, 2018
4.3.0
Jun 15, 2018
4.2.1
Jun 05, 2018
4.2.0
May 16, 2018
4.1.0
May 09, 2018
4.0.1
May 08, 2018
4.0.0
Nov 01, 2017
3.12.1
Aug 28, 2017
3.11.0
Aug 08, 2017
3.10.1
Jul 31, 2017
3.10.0
Jul 23, 2017
3.9.0
Jun 11, 2017
3.8.0
Jun 04, 2017
3.7.0
Apr 11, 2017
3.6.0
Feb 05, 2017
3.5.0
Dec 10, 2016
3.4.1
Nov 01, 2016
3.4.0
Sep 08, 2016
3.3.0
Aug 26, 2016
3.2.2
Aug 25, 2016
3.2.0
Aug 23, 2016
3.1.0
Aug 17, 2016
3.0.0
Wheel compatibility matrix
Files in release
Extras:
Dependencies:
(>=1.26.0)
urllib3
(>=42)
setuptools
(>=4.7.1)
importlib_metadata
(>=23.1)
packaging