Skip to main content

Spawn MongoDB resources from JSON Schema

Project description

mongospawn is a tool to help spawn MongoDB resources given JSON Schema specifications.

The primary near-term use case is support for the National Microbiome Data Collaborative (NMDC) pilot project. In particular, given a JSON Schema with all array-types properties and with each array item a $ref reference to one of the JSON Schema definitions (see NMDC example), mongospawn can generate MongoDB $jsonSchema documents to apply as validators for collections in a database that correspond to each of the original JSON Schema's array-typed properties. MongoDB's implementation of JSON Schema does not support $ref, definitions, etc., so mongospawn expands references to generate appropriate per-collection schema documents.

In addition to generating derived schema documents, mongospawn can spawn new databases/collections, with schema validation set, via the pymongo driver, and can also manage access to the spawned resources via mongogrant.

Development

pip install -e .[dev]

Testing

Use pinned dependencies:

make

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

mongospawn-0.0.3.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

mongospawn-0.0.3-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file mongospawn-0.0.3.tar.gz.

File metadata

  • Download URL: mongospawn-0.0.3.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.9

File hashes

Hashes for mongospawn-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4ac479150971ba1234b93d76c3590c662d86351a1b33810e1b08df613bde94e3
MD5 7313a04f9a4c41daa9ebdede6161c25f
BLAKE2b-256 fbcd734d4f37a6e7135765c5eb4dcb4fc3b7e38ec8d4771cfdd85a06418b8777

See more details on using hashes here.

File details

Details for the file mongospawn-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mongospawn-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.9

File hashes

Hashes for mongospawn-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 226c54cfb508630d23f4a5a1fdf94ff6e5bfb88081978bede751cb7e5d91d9e9
MD5 f4421cf7b7c5d7ca8181e49bb8c2562e
BLAKE2b-256 36e17d04d24dbd3e7505860d4f141db0570d8d201a521b1fddb1c1f067104b97

See more details on using hashes here.

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