Skip to main content

Python ArangoDB support for Flask applications

Project description

Flask-Python-Arango is a python-arango support for Flask applications using ArangoDB

Installation

To install a stable version from PyPi:

~$ pip install Flask-Python-Arango

To install the latest version directly from GitHub:

~$ pip install -e git+git@github.com:zvfvrv/flask-python-arango.git@master#egg=flask-python-arango

A Simple Example

from flask import Flask, render_template
from flask_python_arango import FlaskArango

app = Flask(__name__)
app.config['ARANGODB_HOST'] = 'http://localhost:8529'
app.config['ARANGODB_DB'] = 'test'
app.config['ARANGODB_USERNAME'] = 'root'
app.config['ARANGODB_PSW'] = '12345678'

ArangoDB = FlaskArango(app)

@app.route('/')
def home_page():
    # Execute an AQL query and iterate through the result cursor.
    cursor = ArangoDB.connection.aql.execute('FOR doc IN nodes RETURN doc')
    devices = [document for document in cursor]
    return render_template('index.html', devices=devices)

Contributing

Please create an issue on GitHub.

Project details


Download files

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

Source Distribution

Flask-Python-Arango-0.0.2.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

Flask_Python_Arango-0.0.2-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

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