All Projects → ArangoDB-Community → python-arango

ArangoDB-Community / python-arango

Licence: MIT license
Python Driver for ArangoDB

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-arango

arangors
Easy to use rust driver for arangoDB
Stars: ✭ 120 (-70.52%)
Mutual labels:  arangodb, arangodb-client
dotnet-arangodb
.NET Driver for ArangoDB
Stars: ✭ 52 (-87.22%)
Mutual labels:  arangodb, arangodb-client
Arangodb View
🥑 fast, simple, easy, 'reduced to the max' alternative webinterface / interface for the web / frontend for ArangoDB
Stars: ✭ 18 (-95.58%)
Mutual labels:  arangodb
java-velocypack
No description or website provided.
Stars: ✭ 17 (-95.82%)
Mutual labels:  arangodb
Arangodb
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
Stars: ✭ 11,880 (+2818.92%)
Mutual labels:  arangodb
Foxxy
foxxy : create your app with ArangoDB Foxx RiotJS UIKIT3 Brunch Yarn
Stars: ✭ 47 (-88.45%)
Mutual labels:  arangodb
Arangodb Java Driver
The official ArangoDB Java driver.
Stars: ✭ 174 (-57.25%)
Mutual labels:  arangodb
Python Arango
Python Driver for ArangoDB
Stars: ✭ 349 (-14.25%)
Mutual labels:  arangodb
arangodb
ArangoDB Starter - starts ArangoDB clusters & single servers with ease.
Stars: ✭ 77 (-81.08%)
Mutual labels:  arangodb
Arango
Golang driver for ArangoDB
Stars: ✭ 125 (-69.29%)
Mutual labels:  arangodb
Orango
ArangoDB Object Modeling for Node.js, Foxx and Modern Web Browsers
Stars: ✭ 103 (-74.69%)
Mutual labels:  arangodb
Arangochair
🥑 arangochair is a Node.js module that adds changefeed capability to ArangoDB and make it realtime push ready
Stars: ✭ 85 (-79.12%)
Mutual labels:  arangodb
Arangodb Php
PHP ODM for ArangoDB
Stars: ✭ 178 (-56.27%)
Mutual labels:  arangodb
Pims
An ORM for document-oriented database systems, written in and for TypeScript.
Stars: ✭ 9 (-97.79%)
Mutual labels:  arangodb
docs
Source code of the ArangoDB online documentation
Stars: ✭ 18 (-95.58%)
Mutual labels:  arangodb
Arangojs
The official ArangoDB JavaScript driver.
Stars: ✭ 503 (+23.59%)
Mutual labels:  arangodb
Cruddl
Create a GraphQL API for your database, using the GraphQL SDL to model your schema.
Stars: ✭ 98 (-75.92%)
Mutual labels:  arangodb
Kube Arangodb
ArangoDB Kubernetes Operator - Start ArangoDB on Kubernetes in 5min
Stars: ✭ 150 (-63.14%)
Mutual labels:  arangodb
type-arango
🥑 TypeArango manages ArangoDB collections, documents, relations and routes by taking advantage of TypeScript typings.
Stars: ✭ 55 (-86.49%)
Mutual labels:  arangodb
PasteServer
PasteServer to upload text or code
Stars: ✭ 29 (-92.87%)
Mutual labels:  arangodb

Logo

Build CodeQL codecov PyPI version GitHub license Python version

Python-Arango

Python driver for ArangoDB, a scalable multi-model database natively supporting documents, graphs and search.

Requirements

  • ArangoDB version 3.7+
  • Python version 3.7+

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 hash index to the collection.
students.add_hash_index(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 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, breadth-first.
result = graph.traverse(
    start_vertex="students/01",
    direction="outbound",
    strategy="breadthfirst"
)

Please see the documentation for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].