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 name as set by ARANGO_DB_NAME doesn't exist,
# it will be created when the data layer is initialized.
ARANGO_DB_NAME = 'database_name'
ARANGO_HOST = 'localhost'
ARANGO_PORT = 8529
# If DOMAIN keys 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.
DOMAIN = {
'people': {
'schema': {
'name': {
'type': 'string'
}
}
}
# ...
}
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.0.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for eve_arango-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb661b21c18a0a1457d501eeb2eac86c3df44d5a07e1dca5de78f893e989e65d |
|
MD5 | 352afbbf1cc6a7495f4a081e4356851e |
|
BLAKE2b-256 | 7455a991882db553fcfd99ef48ca82d91bebb685248047038b8d1e75d845aa80 |