Skip to main content

Flask extension for ArangoDB using python-arango

Project description

This is Flask extension for integration ArangoDB using python-arango. It’s inspired by Flask-Arango, an extension for the pyArango library.


Install using pip:

pip install flask-arangodb


Typical usage looks like this:

from flask import Flask

from flask_arangodb import ArangoDB

# Configuration
ARANGO_SETTINGS = {'host': 'localhost', 'port': 8529}
ARANGO_DB = 'mydatabase'

app = Flask(__name__)
arango = ArangoDB(app)

def index():
    # refer to python-arango for more information

    # Set up some test data to query against
        {'_key': 'Abby', 'age': 22},
        {'_key': 'John', 'age': 18},
        {'_key': 'Mary', 'age': 21}

    # Execute the query
    cursor = db.aql.execute(
        'FOR s IN students FILTER s.age < @value RETURN s',
        bind_vars={'value': 19}

    # Iterate through the result cursor
    return([student['_key'] for student in cursor])

Project details

Download files

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

Files for Flask-Arangodb, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size Flask_Arangodb-1.0.4-py3-none-any.whl (5.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size Flask-Arangodb-1.0.4.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page