Skip to main content

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

FerhassioSaver-1.0.7.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

FerhassioSaver-1.0.7-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page