Eve ArangoDB data layer
Project description
Provides a data layer for ArangoDB to be used with Eve REST API framework.
Features
Supports CRUD operations for using ArangoDB as a document store
Supports the same operations on edge documents for managing relations
Not supported (yet):
Proper graph queries
Sorting
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 with 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,
}
# ...
}
Contributing
Contributions are welcome. Open an issue and send a pull request.
License
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
eve-arango-0.1.1.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for eve_arango-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3e26d755843b8ded2a47868c3bb64774f246571faf28947832fe8cf8f76716f |
|
MD5 | 4c7f04e5bd2ffc5a0969ebc7363ff397 |
|
BLAKE2b-256 | aad830baec327c9b232329727edd18198c640f71bbdfb9b92c978a3db98ea170 |