Python-arango wrapper
Project description
Ferhassio Saver
Arango wrapper for https://github.com/ArangoDB-Community/python-arango
Install requirements
Run:
pip install python-arango
Usage
Create connection
arango = FerhassioSaver(hosts, user, password, dbname, collection)
Create unique index
arango.create_unique_field(field='field')
Fetch data
results = arango.fetch_data(cnt, field)
cnt - data limit (optional), field - specify a field if you need to get only a specific value and not the entire document (optional).
Fetch by field
result = arango.fetch_by(by_field, value)
Fetch data using field and value like (_key, 123456).
Load data
arango.load_data(json_list, chunk_size, on_duplicate)
Load list of json documents in collection. chunk_size - chunk size for worker. On_duplicate: replace(default), update, ignore
arango.load_once(doc, overwrite_mode)
Load one document. Overwrite_mode: update(default), replace
Validate
result = arango.is_valid(doc)
Return true if document in collection.
Delete
result = arango.delete(doc)
Delete selected document (in dev).
Counter
result = arango.collection_count()
Returns documents count in selected collection.
Execute
results = arango.execute(query)
Execute AQL query.
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
Built Distribution
File details
Details for the file FerhassioSaver-1.0.7.tar.gz
.
File metadata
- Download URL: FerhassioSaver-1.0.7.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe30c775971feace3ebce32dd9a53f04d9b53aaec7ed525dfbd8dc5ac9ea78ae |
|
MD5 | 693aeda39be94298e0e674aa93879679 |
|
BLAKE2b-256 | 97234fd36511253aea2feaab167ed95f24428f3acd7f48c4e1729d6367d5914b |
File details
Details for the file FerhassioSaver-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: FerhassioSaver-1.0.7-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18498ef4a347eadcd426ea71ba091a0648a4daba215580ad53235126e06d486e |
|
MD5 | 52561a2e9fec5880e9ef0ecb76d3bb72 |
|
BLAKE2b-256 | 6093378b6de8d2933680584a5c4b821746663a492b94cef3cd1c79ed363165c1 |