Skip to main content

Graph-based data exploration tool

Project description

https://travis-ci.org/ginkgobioworks/curious.svg?branch=master

Curious traverses relationships in a relational database. Curious queries allow users to explore relationships among objects, traverse recursive relationships, and jump between loosely connected databases. Curious also provides a JSON interface to the objects. Users and programmers can use Curious queries in analysis scripts and applications.

Curious favors a data centric model of application construction; Curious queries expose normalized, relational data, reducing UI dependency on UI specific API end-points serving denormalized data. Changing what data an UI needs no longer requires changing the UI specific end-points.

Curious works well with deep data models with many relationships. A Curious query can traverse 10s of foreign key like relationships efficiently. Curious queries always operate on sets of objects, and can connect a small number of objects via a relationship to a large number of objects, then via another relationship from the large number of objects to a smaller set again. For example, Book to Authors to Country of Residence. Unlike GraphQL, Curious outputs relationships between objects, rather than an ever growing tree of JSON representations of the objects.

Example

Book.last(10) Book.author_set Author.country(continent__name="North America")

Query Language

avg, sum, max, count. ? modifier for left joins. t modifier for dates.

Configuring Curious

import myapp.models
from curious import model_registry

def register():
  model_registry.register(myapp.models)

Then include register when your Django app boots up.

Using Curious

Turn off CSRF. Deploy it as a Django app.

Writing Customized Relationships

Use filter and deferred to real functions.

Development

Requires Docker. Spin up your container using the provided docker-compose.yml file and Makefile by running make image. This creates an image with a correct git configuration for your user, which makes it easy to release. All of the commands you should need to run are defined the Makefile as targets. All of the targets except for image, are meant to be run inside the Docker container, but can be run from the host machine by having -ext appended to them. For example, to run tests, you could either call make test from inside the container, or make test-ext from the host.

If you are modifying the static assets during development, they can be recompiled with the build_assets make task, or by calling python setup.py build_assets.

./make test-ext

Deployment

Deployment of tagged commits happens to PyPI automatically via Travis CI. To bump and deploy a new version, run make bump/[foo]-ext, where [foo] is major, minor, or patch. Then git push origin --tags master.

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

curious-0.2.2.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

curious-0.2.2-py2-none-any.whl (48.4 kB view details)

Uploaded Python 2

File details

Details for the file curious-0.2.2.tar.gz.

File metadata

  • Download URL: curious-0.2.2.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for curious-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b3be2f8ec5b3a10a1efb8bf05432053fde7bc14549cc96c0d20fb552a8d0da23
MD5 c1a1f7cf8094f7d19efa4d600d8847ed
BLAKE2b-256 5566385462224717b546d2d698de4815b7e066d2c2344def56144c45a11695f1

See more details on using hashes here.

File details

Details for the file curious-0.2.2-py2-none-any.whl.

File metadata

File hashes

Hashes for curious-0.2.2-py2-none-any.whl
Algorithm Hash digest
SHA256 d2ce54152f52ac166cb74d004713bfb5ef2f0451e9f52e00dd34a777cdb094c1
MD5 e7e714bb9b73a8bd86c43f0d5b39229f
BLAKE2b-256 e18e688d7ea8cd779343a10c936eb268d004425d84ceb044e4c9a28dc3d3ef56

See more details on using hashes here.

Supported by

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