Skip to main content

Python Driver for ArangoDB

Project description

https://cloud.githubusercontent.com/assets/2701938/17761717/892d37c0-64d7-11e6-84a8-665adc9f4cfc.png Travis Build Status Documentation Status Package Version Python Versions Test Coverage Issues Open MIT License

Welcome to the GitHub page for python-arango, a Python driver for ArangoDB’s REST API.

Features

  • Clean, Pythonic interface

  • Lightweight

  • 95%+ ArangoDB REST API coverage

Compatibility

  • Python versions 2.7.x, 3.4.x and 3.5.x are supported

  • Latest version of python-arango (3.x) supports ArangoDB 3.x only

  • Older versions of python-arango support ArangoDB 1.x ~ 2.x only

Installation

To install a stable version from PyPi:

pip install python-arango

To install the latest version directly from GitHub:

git clone https://github.com/joowani/python-arango.git
cd python-arango
python setup.py install

You may need to use sudo depending on your environment setup.

Getting Started

Here is a simple usage example:

from arango import ArangoClient

# Initialize the client for ArangoDB
client = ArangoClient(
    protocol='http',
    host='localhost',
    port=8529,
    username='root',
    password='',
    enable_logging=True
)

# Create a new database named "my_database"
db = client.create_database('my_database')

# 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': 19})
students.insert({'name': 'josh', 'age': 13})
students.insert({'name': 'jake', 'age': 21})

# Execute an AQL query and iterate through the result cursor
cursor = db.aql.execute('FOR s IN students RETURN s')
print(student['name'] for student in cursor)

Please read the full API documentation for more details!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-arango-3.1.0.tar.gz (62.0 kB view details)

Uploaded Source

File details

Details for the file python-arango-3.1.0.tar.gz.

File metadata

  • Download URL: python-arango-3.1.0.tar.gz
  • Upload date:
  • Size: 62.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-arango-3.1.0.tar.gz
Algorithm Hash digest
SHA256 908cea8383e32337b09e131df8b356dc2cabf36b3265de5bc2e8eac0d9ea1b78
MD5 b8b022ac84f3e739807aaec0e0bc3c12
BLAKE2b-256 f11c1f39d3ddd351285d232452d4fca2157902a1749b87c57bb648b8a685c425

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page