{"id":18777484,"url":"https://github.com/alexvanzyl/python-aioarango","last_synced_at":"2025-12-17T00:30:17.883Z","repository":{"id":42628138,"uuid":"475413483","full_name":"alexvanzyl/python-aioarango","owner":"alexvanzyl","description":"Asynchronous Python Driver for ArangoDB","archived":false,"fork":false,"pushed_at":"2022-03-30T12:01:31.000Z","size":285,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-29T10:12:57.099Z","etag":null,"topics":["arango","arangodb","async","asyncio","python"],"latest_commit_sha":null,"homepage":"https://python-aioarango.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexvanzyl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-29T11:35:08.000Z","updated_at":"2022-03-29T14:52:13.000Z","dependencies_parsed_at":"2022-09-08T03:22:06.958Z","dependency_job_id":null,"html_url":"https://github.com/alexvanzyl/python-aioarango","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexvanzyl%2Fpython-aioarango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexvanzyl%2Fpython-aioarango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexvanzyl%2Fpython-aioarango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexvanzyl%2Fpython-aioarango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexvanzyl","download_url":"https://codeload.github.com/alexvanzyl/python-aioarango/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239687684,"owners_count":19680773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arango","arangodb","async","asyncio","python"],"created_at":"2024-11-07T20:11:19.244Z","updated_at":"2025-12-17T00:30:17.840Z","avatar_url":"https://github.com/alexvanzyl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![python-aioarango](https://user-images.githubusercontent.com/2052390/160789178-9926537e-8660-4398-8461-fc1a9f008654.png)\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen)](https://github.com/alexvanzyl/python-aioarango/blob/main/LICENSE)\n![Python version](https://img.shields.io/badge/python-3.7%2B-blue)\n\n# python-aioarango\n\nAsynchronous python driver for [ArangoDB](https://www.arangodb.com), a scalable multi-model\ndatabase natively supporting documents, graphs and search.\n\nThis project is based off of the orginal work from [python-arango](https://github.com/joowani/python-arango) and [\naioarango](https://github.com/mirrorrim/aioarango). \n\n## Requirements\n\n- ArangoDB version 3.7+\n- Python version 3.7+\n\n## Installation\n\n```shell\npip install python_aioarango\n```\n\n## Getting Started\n\nHere is a simple usage example:\n\n```python\nfrom python_aioarango 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 = await client.db(\"_system\", username=\"root\", password=\"passwd\")\n\n# Create a new database named \"test\".\nawait sys_db.create_database(\"test\")\n\n# Connect to \"test\" database as root user.\ndb = await client.db(\"test\", username=\"root\", password=\"passwd\")\n\n# Create a new collection named \"students\".\nstudents = await db.create_collection(\"students\")\n\n# Add a hash index to the collection.\nawait students.add_hash_index(fields=[\"name\"], unique=True)\n\n# Insert new documents into the collection.\nawait students.insert({\"name\": \"jane\", \"age\": 39})\nawait students.insert({\"name\": \"josh\", \"age\": 18})\nawait students.insert({\"name\": \"judy\", \"age\": 21})\n\n# Execute an AQL query and iterate through the result cursor.\ncursor = await db.aql.execute(\"FOR doc IN students RETURN doc\")\nstudent_names = [document[\"name\"] async for document in cursor]\n```\n\nAnother example with [graphs](https://www.arangodb.com/docs/stable/graphs.html):\n\n```python\nfrom python_aioarango 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 = await client.db(\"test\", username=\"root\", password=\"passwd\")\n\n# Create a new graph named \"school\".\ngraph = await db.create_graph(\"school\")\n\n# Create vertex collections for the graph.\nstudents = await graph.create_vertex_collection(\"students\")\nlectures = await graph.create_vertex_collection(\"lectures\")\n\n# Create an edge definition (relation) for the graph.\nedges = await 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.\nawait students.insert({\"_key\": \"01\", \"full_name\": \"Anna Smith\"})\nawait students.insert({\"_key\": \"02\", \"full_name\": \"Jake Clark\"})\nawait students.insert({\"_key\": \"03\", \"full_name\": \"Lisa Jones\"})\n\n# Insert vertex documents into \"lectures\" (to) vertex collection.\nawait lectures.insert({\"_key\": \"MAT101\", \"title\": \"Calculus\"})\nawait lectures.insert({\"_key\": \"STA101\", \"title\": \"Statistics\"})\nawait lectures.insert({\"_key\": \"CSC101\", \"title\": \"Algorithms\"})\n\n# Insert edge documents into \"register\" edge collection.\nawait edges.insert({\"_from\": \"students/01\", \"_to\": \"lectures/MAT101\"})\nawait edges.insert({\"_from\": \"students/01\", \"_to\": \"lectures/STA101\"})\nawait edges.insert({\"_from\": \"students/01\", \"_to\": \"lectures/CSC101\"})\nawait edges.insert({\"_from\": \"students/02\", \"_to\": \"lectures/MAT101\"})\nawait edges.insert({\"_from\": \"students/02\", \"_to\": \"lectures/STA101\"})\nawait edges.insert({\"_from\": \"students/03\", \"_to\": \"lectures/CSC101\"})\n\n# Traverse the graph in outbound direction, breadth-first.\nresult = await graph.traverse(\n    start_vertex=\"students/01\",\n    direction=\"outbound\",\n    strategy=\"breadthfirst\"\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexvanzyl%2Fpython-aioarango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexvanzyl%2Fpython-aioarango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexvanzyl%2Fpython-aioarango/lists"}