Provides IPython cell magic for dgraph remote interaction.
Installation
pip install idgraph
Why is this?
While dgraph provides several useful interfaces, I spend most of my time learning, exploring, and developing in Jupyter. Executable documentation is fantastic! This package abstractly provides cell magic for dgraph query, mutation, and alteration execution. You could do the same with curl or requests. But, the sensible defaults help make things less verbose and tedious. (It’s inspired by my experience with itikz which proved really beneficial.)
Usage
The easiest way to understand how this works is by following (and cloning) the tutorial notebook. It’s a projection dgraph’s Tour of Dgraph: A Bigger Dataset.
Cheat Sheet
Load the extension with,
%load_ext idgraph
Then,
By default, %%dgraph assumes a query.
%%dgraph --alter does an alteration
%%dgraph --mutate does a mutation
By default, %%dgraph assumes localhost:8080
%%dgraph --addr=remote-host:8080 overrides the default
The DGRAPH_ADDR environmental variable overrides default if the --addr flag isn’t set
By default, only the value associated with the data key in the response is shown.
%%dgraph --full-resp shows the full response including metadata.
%%dgraph --jmespath="query" allows you to extract part of the response with a jmespath query.
By default, each cell execution binds the extracted response to _dgraph and the full response to _dgraph_full
%%dgraph --into=name will bind the extracted response to name and the full response to {name}_full
By default, the cell contents are executed.
%%dgraph --skip skips execution.
Useful for mutations that are possibly dangerous on someone else’s computer.
Jinja
technically you can use templates in a directory. you almost certainly shouldnt though.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.0.1 (2019-10-20)
Create initial version of idgraph.
Metadata
Release files for idgraph 0.0.1
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 | Actions |
|---|---|---|---|---|
| idgraph-0.0.1.tar.gz | 11.2 kB | Without provenance | Details for idgraph-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| idgraph-0.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for idgraph-0.0.1-py2.py3-none-any.whl |
Total release size: 17.4 kB
Release files / idgraph-0.0.1.tar.gz
| Download URL | idgraph-0.0.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9ab0f21ffc02f06a5dc5c75b633f5105532f790715dd220601a23b38ece61c2
|
|
BLAKE2b-256 checksum How to use checksums |
2741c596a336f60b509a808cb6cae4353c1de8b855cdf417fcdc0ab994d1a5fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9
|
Release files / idgraph-0.0.1-py2.py3-none-any.whl
| Download URL | idgraph-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
34f1ea486d14242637bfe3ae3a05f5076529108ff727d7e08cbd6b5966903a24
|
|
BLAKE2b-256 checksum How to use checksums |
96a467553dad6214e6fa31f60dca58f0de49923b1b7d0a44e9dd469c3dff229c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9
|
Security for idgraph 0.0.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.