eve-arango – Eve ArangoDB data layer
Provides a data layer for ArangoDB to be used with Eve REST API framework.
Features
CRUD operations for using ArangoDB as a document store
Supports the same operations on edge documents for managing relations
Filtering based on AQL syntax
Pagination and sorting
Not supported (yet):
Proper graph queries
Versioning
Projection
Aggregation
Etc.
Installation
$ pip install eve-arango
Usage
from eve import Eve
from eve_arango import ArangoDB
app = Eve(data=ArangoDB)
app.run()
The following settings are processed:
# These are necessary for item lookups to work,
# the regex is for the characters allowed in ArangoDB keys.
ID_FIELD = '_key'
ITEM_LOOKUP_FIELD = ID_FIELD
ITEM_URL = 'regex("[\w\d\-:.@()+,=;$!*\'%]+")'
# If a database named ARANGO_DB's value doesn't exist,
# it will be created when the data layer is initialized.
ARANGO_DB = 'database_name'
ARANGO_HOST = 'localhost'
ARANGO_PORT = 8529
# If the keys in DOMAIN do not exist as collection names,
# they will be created when the data layer is initialized.
# There's no need to add '_id', '_key' or '_rev' fields,
# they are added to the schema automatically.
# If you specifiy 'edge_collection': True as below,
# an edge collection will be created if it does not exist.
DOMAIN = {
'people': {
'schema': {
'name': {
'type': 'string'
}
}
},
'friends_with': {
'edge_collection': True
},
# ...
}
Filtering and sorting
eve-arango uses AQL syntax for filtering via the Eve where parameter. Mongo-style queries are not valid. Here are some examples of valid (url decoded) queries and their resulting AQL:
?where=foo == "bar"
# Spaces are optional.
# FILTER doc.foo == "bar"
?where=numIN[1,2,3],present!=null
# Use , as simple separator between FILTER expressions.
# FILTER doc.num IN [1,2,3]
# FILTER doc.present != null
?where=a=="a"ANDb=="b"ORc=="c"
# AND, OR, NOT can be used to combine expressions.
# FILTER doc.a == "a" AND doc.b == "b" OR doc.c == "c"
Sorting uses the regular Eve syntax. An example is given below:
?sort=name,-age
# SORT doc.name, doc.age DESC
Contributing
Contributions are welcome. Open an issue and send a pull request.
License
Metadata
Release files for eve-arango 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eve-arango-0.3.3.tar.gz | 6.6 kB | Without provenance | Details for eve-arango-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eve_arango-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for eve_arango-0.3.3-py3-none-any.whl |
Total release size: 12.7 kB
Release files / eve-arango-0.3.3.tar.gz
| Download URL | eve-arango-0.3.3.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed9e1c596cfd846aa7d9053a84ed8e87a073cf463ca4a8dfd303dcdf59df78e1
|
|
BLAKE2b-256 checksum How to use checksums |
54747425e6bb4c5e6a889093e82fd770efef2cef5faef2d86db91ac09964ac8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
|
Release files / eve_arango-0.3.3-py3-none-any.whl
| Download URL | eve_arango-0.3.3-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b495f3b6334b029bc8fcb75f9515ffa9ecfccfcd3c4b62cf23148d94ca9af457
|
|
BLAKE2b-256 checksum How to use checksums |
dcb7010b88ac790dabac312e438771eff5cc4055784b19fbd905203631a9b66a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
|
Security for eve-arango 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.