Skip to content

Commit f23e5ba

Browse files
committed
improved readme.rst
1 parent 7d69f11 commit f23e5ba

3 files changed

Lines changed: 64 additions & 17 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,5 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
.vscode/

README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Flask-Python-Arango
2+
===================
3+
4+
**Flask-Python-Arango** is a `python-arango`_ support for Flask applications using ArangoDB_
5+
6+
Installation
7+
------------
8+
9+
To install a stable version from PyPi_:
10+
11+
.. code-block:: bash
12+
13+
~$ pip install Flask-Python-Arango
14+
15+
16+
To install the latest version directly from GitHub_:
17+
18+
.. code-block:: bash
19+
20+
~$ pip install -e git+git@github.com:zvfvrv/flask-python-arango.git@master#egg=flask-python-arango
21+
22+
A Simple Example
23+
----------------
24+
25+
.. code-block:: python
26+
27+
from flask import Flask, render_template
28+
from flask_python_arango import FlaskArango
29+
30+
app = Flask(__name__)
31+
app.config['ARANGODB_HOST'] = 'http://localhost:8529'
32+
app.config['ARANGODB_DB'] = 'test'
33+
app.config['ARANGODB_USERNAME'] = 'root'
34+
app.config['ARANGODB_PSW'] = '12345678'
35+
36+
ArangoDB = FlaskArango(app)
37+
38+
@app.route('/')
39+
def home_page():
40+
# Execute an AQL query and iterate through the result cursor.
41+
cursor = ArangoDB.connection.aql.execute('FOR doc IN nodes RETURN doc')
42+
devices = [document for document in cursor]
43+
return render_template('index.html', devices=devices)
44+
45+
46+
Contributing
47+
------------
48+
49+
Please create an issue on GitHub_.
50+
51+
Links
52+
-----
53+
54+
* `python-arango`_
55+
* Flask Documentation: https://flask.palletsprojects.com/
56+
* ArangoDB_
57+
58+
59+
.. _`GitHub`: https://github.com/zvfvrv/flask-python-arango
60+
.. _ArangoDB: https://www.arangodb.com
61+
.. _`python-arango`: https://github.com/joowani/python-arango/releases
62+
.. _PyPi: https://pypi.org/project/flask-python-arango/

0 commit comments

Comments
 (0)