Name | python-arango JSON |
Version |
8.2.1
JSON |
| download |
home_page | None |
Summary | Python Driver for ArangoDB |
upload_time | 2025-07-09 02:07:17 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2016-2021 Joohwan Oh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
arangodb
python
driver
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|

[](https://dl.circleci.com/status-badge/redirect/gh/arangodb/python-arango/tree/main)
[](https://github.com/arangodb/python-arango/actions/workflows/codeql.yaml)
[](https://github.com/arangodb/python-arango/actions/workflows/docs.yaml)
[](https://codecov.io/gh/arangodb/python-arango)
[](https://github.com/arangodb/python-arango/commits/main)
[](https://pypi.org/project/python-arango/)
[](https://pypi.org/project/python-arango/)
[](https://github.com/arangodb/python-arango/blob/main/LICENSE)
[](https://github.com/psf/black)
[](https://pepy.tech/project/python-arango)
# Python-Arango
Python driver for [ArangoDB](https://www.arangodb.com), a scalable multi-model
database natively supporting documents, graphs and search.
If you're interested in using asyncio, please check [python-arango-async](https://github.com/arangodb/python-arango-async).
## Requirements
- ArangoDB version 3.11+
- Python version 3.9+
## Installation
```shell
pip install python-arango --upgrade
```
## Getting Started
Here is a simple usage example:
```python
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](https://docs.arangodb.com/stable/graphs/):
```python
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](https://docs.python-arango.com) for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "python-arango",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Joohwan Oh <joohwan.oh@outlook.com>, Alexandru Petenchea <alex.petenchea@gmail.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>",
"keywords": "arangodb, python, driver",
"author": null,
"author_email": "Joohwan Oh <joohwan.oh@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/4d/91/a2e9d3fcd8a6cb3596434a38fccf5d87b8af8209d78bd50728c9a03846c4/python_arango-8.2.1.tar.gz",
"platform": null,
"description": "\n\n[](https://dl.circleci.com/status-badge/redirect/gh/arangodb/python-arango/tree/main)\n[](https://github.com/arangodb/python-arango/actions/workflows/codeql.yaml)\n[](https://github.com/arangodb/python-arango/actions/workflows/docs.yaml)\n[](https://codecov.io/gh/arangodb/python-arango)\n[](https://github.com/arangodb/python-arango/commits/main)\n\n[](https://pypi.org/project/python-arango/)\n[](https://pypi.org/project/python-arango/)\n\n[](https://github.com/arangodb/python-arango/blob/main/LICENSE)\n[](https://github.com/psf/black)\n[](https://pepy.tech/project/python-arango)\n\n# Python-Arango\n\nPython driver for [ArangoDB](https://www.arangodb.com), a scalable multi-model\ndatabase natively supporting documents, graphs and search.\n\nIf you're interested in using asyncio, please check [python-arango-async](https://github.com/arangodb/python-arango-async).\n\n## Requirements\n\n- ArangoDB version 3.11+\n- Python version 3.9+\n\n## Installation\n\n```shell\npip install python-arango --upgrade\n```\n\n## Getting Started\n\nHere is a simple usage example:\n\n```python\nfrom arango import ArangoClient\n\n# Initialize the client for ArangoDB.\nclient = ArangoClient(hosts=\"http://localhost:8529\")\n\n# Connect to \"_system\" database as root user.\nsys_db = client.db(\"_system\", username=\"root\", password=\"passwd\")\n\n# Create a new database named \"test\".\nsys_db.create_database(\"test\")\n\n# Connect to \"test\" database as root user.\ndb = client.db(\"test\", username=\"root\", password=\"passwd\")\n\n# Create a new collection named \"students\".\nstudents = db.create_collection(\"students\")\n\n# Add a persistent index to the collection.\nstudents.add_index({'type': 'persistent', 'fields': ['name'], 'unique': True})\n\n# Insert new documents into the collection.\nstudents.insert({\"name\": \"jane\", \"age\": 39})\nstudents.insert({\"name\": \"josh\", \"age\": 18})\nstudents.insert({\"name\": \"judy\", \"age\": 21})\n\n# Execute an AQL query and iterate through the result cursor.\ncursor = db.aql.execute(\"FOR doc IN students RETURN doc\")\nstudent_names = [document[\"name\"] for document in cursor]\n```\n\nAnother example with [graphs](https://docs.arangodb.com/stable/graphs/):\n\n```python\nfrom arango import ArangoClient\n\n# Initialize the client for ArangoDB.\nclient = ArangoClient(hosts=\"http://localhost:8529\")\n\n# Connect to \"test\" database as root user.\ndb = client.db(\"test\", username=\"root\", password=\"passwd\")\n\n# Create a new graph named \"school\".\ngraph = db.create_graph(\"school\")\n\n# Create a new EnterpriseGraph [Enterprise Edition]\neegraph = db.create_graph(\n name=\"school\",\n smart=True)\n\n# Create vertex collections for the graph.\nstudents = graph.create_vertex_collection(\"students\")\nlectures = graph.create_vertex_collection(\"lectures\")\n\n# Create an edge definition (relation) for the graph.\nedges = graph.create_edge_definition(\n edge_collection=\"register\",\n from_vertex_collections=[\"students\"],\n to_vertex_collections=[\"lectures\"]\n)\n\n# Insert vertex documents into \"students\" (from) vertex collection.\nstudents.insert({\"_key\": \"01\", \"full_name\": \"Anna Smith\"})\nstudents.insert({\"_key\": \"02\", \"full_name\": \"Jake Clark\"})\nstudents.insert({\"_key\": \"03\", \"full_name\": \"Lisa Jones\"})\n\n# Insert vertex documents into \"lectures\" (to) vertex collection.\nlectures.insert({\"_key\": \"MAT101\", \"title\": \"Calculus\"})\nlectures.insert({\"_key\": \"STA101\", \"title\": \"Statistics\"})\nlectures.insert({\"_key\": \"CSC101\", \"title\": \"Algorithms\"})\n\n# Insert edge documents into \"register\" edge collection.\nedges.insert({\"_from\": \"students/01\", \"_to\": \"lectures/MAT101\"})\nedges.insert({\"_from\": \"students/01\", \"_to\": \"lectures/STA101\"})\nedges.insert({\"_from\": \"students/01\", \"_to\": \"lectures/CSC101\"})\nedges.insert({\"_from\": \"students/02\", \"_to\": \"lectures/MAT101\"})\nedges.insert({\"_from\": \"students/02\", \"_to\": \"lectures/STA101\"})\nedges.insert({\"_from\": \"students/03\", \"_to\": \"lectures/CSC101\"})\n\n# Traverse the graph in outbound direction, breath-first.\nquery = \"\"\"\n FOR v, e, p IN 1..3 OUTBOUND 'students/01' GRAPH 'school'\n OPTIONS { bfs: true, uniqueVertices: 'global' }\n RETURN {vertex: v, edge: e, path: p}\n \"\"\"\ncursor = db.aql.execute(query)\n```\n\nPlease see the [documentation](https://docs.python-arango.com) for more details.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2016-2021 Joohwan Oh\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Python Driver for ArangoDB",
"version": "8.2.1",
"project_urls": {
"homepage": "https://github.com/arangodb/python-arango"
},
"split_keywords": [
"arangodb",
" python",
" driver"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4f3fb5ee47134cf9e53c5a75f896df003c805f034c8e5b4b646b41bb736be537",
"md5": "986abfa95b8766a02a6fa9c4d38f3f12",
"sha256": "4917a7a0ce3ca892dffeffc59b5087282dd70cb0bbc33678b26090183de4e35f"
},
"downloads": -1,
"filename": "python_arango-8.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "986abfa95b8766a02a6fa9c4d38f3f12",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 114870,
"upload_time": "2025-07-09T02:07:16",
"upload_time_iso_8601": "2025-07-09T02:07:16.362500Z",
"url": "https://files.pythonhosted.org/packages/4f/3f/b5ee47134cf9e53c5a75f896df003c805f034c8e5b4b646b41bb736be537/python_arango-8.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4d91a2e9d3fcd8a6cb3596434a38fccf5d87b8af8209d78bd50728c9a03846c4",
"md5": "c4f38f1ec31018933ff70420941fe6ec",
"sha256": "888453033c0c61b4e5ad095679f7547b136d61ba1ad78c2fb8b70232a599b7a4"
},
"downloads": -1,
"filename": "python_arango-8.2.1.tar.gz",
"has_sig": false,
"md5_digest": "c4f38f1ec31018933ff70420941fe6ec",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 153274,
"upload_time": "2025-07-09T02:07:17",
"upload_time_iso_8601": "2025-07-09T02:07:17.618837Z",
"url": "https://files.pythonhosted.org/packages/4d/91/a2e9d3fcd8a6cb3596434a38fccf5d87b8af8209d78bd50728c9a03846c4/python_arango-8.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 02:07:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "arangodb",
"github_project": "python-arango",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"circle": true,
"lcname": "python-arango"
}