djarango
ArangoDB Backend Interface for Django
Installation
$ pip install djarango
$ # check install status
$ djarango status
Configure settings.py (example)
DATABASES_ARANGO = {
'default': {
'ENGINE' : 'django.db.backends.arangodb',# Backend implementation
'NAME' : 'graphdb', # DB name
'HOST' : 'localhost', # Single-mode host; 'localhost' is default.
'PORT' : '8529', # Port 8529 is the default; optional.
'USER' : 'someuser',
'PASSWORD' : 'somepassword',
'TIME_ZONE' : 'UTC',
# 'USE_TZ' : True,
'CONN_MAX_AGE' : 60,
'AUTOCOMMIT' : True,
# Arango supports clustered DB
# If "HOSTS" is provided, it will override "HOST".
# 'HOSTS' : [ '172.28.0.1', '172.28.0.2', '172.28.0.3', '172.28.0.4', ],
# 'HOST_RESOLVER' : 'rounrobin', # Options are 'roundrobin' | 'random'
}
}
Add Edge Fields to a Django model (example)
from django.db.backends.arangodb.fields.edges import EdgeField
# Djarango treats every Django model as an ArangoDB collection.
class ModelA(models.Model):
title = models.CharField(max_length = 50)
description = models.CharField(max_length = 200)
counta = models.IntegerField(default = 0)
# EdgeField creates an edge from ModelA to ModelB
# ModelA and ModelB are ArangoDB nodes, by default.
# graph_name specifies the name of the graph that will be created in
# ArangoDB containing the model (node) collections and edges.
modelb = EdgeField('ModelB', graph_name='ABTest')
class ModelB(models.Model):
title = models.CharField(max_length = 50)
description = models.CharField(max_length = 200)
countb = models.IntegerField(default = 0)
# The EdgeFields are unidirectional. In order to create a bidirectional
# edge, there must be an EdgeField in each direction.
# Specify the same graph_name so that the edges will be in the same graph.
# Otherwise, a graph name will be auto-generated: 'graph_modelb_modela'
# and each edge will be in different graphs.
modela = EdgeField('ModelA', graph_name='ABTest')
Design Notes
Additional information about design and the edge field implementation is in fields.md
Metadata
Release files for djarango 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| djarango-0.0.6.tar.gz | 47.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| djarango-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.7 kB
Release files / djarango-0.0.6.tar.gz
| Download URL | djarango-0.0.6.tar.gz |
|---|---|
| Size | 47.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84cd17bd8808a68f26d999854f2a4767558b5ad10733bc15ec08c5b24732bbec
|
|
BLAKE2b-256 checksum How to use checksums |
421946c4a0a4dea725014f65522b718ff5cb8e7276b3d217ea6bc07e5fa468b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
|
Release files / djarango-0.0.6-py3-none-any.whl
| Download URL | djarango-0.0.6-py3-none-any.whl |
|---|---|
| Size | 45.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d0e4a7a434bb4b30a70de7e4af3f076d75443bd523430b514a92dd044835252
|
|
BLAKE2b-256 checksum How to use checksums |
3093516322c3de57e9e2db3cd34a087c758548d2681216e4287690181b5ba54b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
|
Security for djarango 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.