1- # python-arango
1+ ![ Logo ] ( https://user-images.githubusercontent.com/2701938/108583516-c3576680-72ee-11eb-883f-2d9b52e74e45.png )
22
3- Python driver for [ ArangoDB] ( https://www.arangodb.com ) .
3+ [ ![ Build] ( https://github.com/joowani/python-arango/actions/workflows/build.yaml/badge.svg )] ( https://github.com/joowani/python-arango/actions/workflows/build.yaml )
4+ [ ![ CodeQL] ( https://github.com/joowani/python-arango/actions/workflows/codeql.yaml/badge.svg )] ( https://github.com/joowani/python-arango/actions/workflows/codeql.yaml )
5+ [ ![ CodeCov] ( https://codecov.io/gh/joowani/python-arango/branch/main/graph/badge.svg?token=DXg0O4hxnx )] ( https://codecov.io/gh/joowani/python-arango )
6+ [ ![ PyPI version] ( https://badge.fury.io/py/python-arango.svg )] ( https://badge.fury.io/py/python-arango )
7+ [ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-brightgreen )] ( https://github.com/joowani/python-arango/blob/main/LICENSE )
8+ ![ Python version] ( https://img.shields.io/badge/python-3.6%2B-blue )
9+
10+ # Python-Arango
11+
12+ Python driver for [ ArangoDB] ( https://www.arangodb.com ) , a scalable multi-model
13+ database natively supporting documents, graphs and search.
414
515## Requirements
616
7- Python 3.6+ and ArangoDB 3.7+
17+ - ArangoDB version 3.7+
18+ - Python version 3.6+
819
920## Installation
1021
@@ -47,7 +58,7 @@ cursor = db.aql.execute("FOR doc IN students RETURN doc")
4758student_names = [document[" name" ] for document in cursor]
4859```
4960
50- Here is another example with graphs:
61+ Another example with [ graphs] ( https://www.arangodb.com/docs/stable/graphs.html ) :
5162
5263``` python
5364from arango import ArangoClient
@@ -66,7 +77,7 @@ students = graph.create_vertex_collection("students")
6677lectures = graph.create_vertex_collection(" lectures" )
6778
6879# Create an edge definition (relation) for the graph.
69- register = graph.create_edge_definition(
80+ edges = graph.create_edge_definition(
7081 edge_collection = " register" ,
7182 from_vertex_collections = [" students" ],
7283 to_vertex_collections = [" lectures" ]
@@ -83,12 +94,12 @@ lectures.insert({"_key": "STA101", "title": "Statistics"})
8394lectures.insert({" _key" : " CSC101" , " title" : " Algorithms" })
8495
8596# Insert edge documents into "register" edge collection.
86- register .insert({" _from" : " students/01" , " _to" : " lectures/MAT101" })
87- register .insert({" _from" : " students/01" , " _to" : " lectures/STA101" })
88- register .insert({" _from" : " students/01" , " _to" : " lectures/CSC101" })
89- register .insert({" _from" : " students/02" , " _to" : " lectures/MAT101" })
90- register .insert({" _from" : " students/02" , " _to" : " lectures/STA101" })
91- register .insert({" _from" : " students/03" , " _to" : " lectures/CSC101" })
97+ edges .insert({" _from" : " students/01" , " _to" : " lectures/MAT101" })
98+ edges .insert({" _from" : " students/01" , " _to" : " lectures/STA101" })
99+ edges .insert({" _from" : " students/01" , " _to" : " lectures/CSC101" })
100+ edges .insert({" _from" : " students/02" , " _to" : " lectures/MAT101" })
101+ edges .insert({" _from" : " students/02" , " _to" : " lectures/STA101" })
102+ edges .insert({" _from" : " students/03" , " _to" : " lectures/CSC101" })
92103
93104# Traverse the graph in outbound direction, breadth-first.
94105result = graph.traverse(
@@ -98,5 +109,5 @@ result = graph.traverse(
98109)
99110```
100111
101- Please see [ documentation] ( http://python-driver-for-arangodb.readthedocs.io/en/master/index.html )
112+ Please see the [ documentation] ( http://python-driver-for-arangodb.readthedocs.io/en/master/index.html )
102113for more details.
0 commit comments