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
resutls = 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)
Load list of json documents in collection. chunk_size - chunk size for worker.

arango.load_once(doc)
Load one document

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

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.2.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

FerhassioSaver-1.0.2-py3-none-any.whl (4.2 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