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-typed 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.5.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

mongospawn-0.5.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongospawn-0.5.1.tar.gz
  • Upload date:
  • Size: 17.0 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.5.1.tar.gz
Algorithm Hash digest
SHA256 61b6968c2ab0c49f298041e457a634d59375fad861e52961da5476828902fb1c
MD5 a916eeb6d11edc3f1038bb4b101cf84c
BLAKE2b-256 0e82dd9f0d15f72f5a50d31fd1bb774637aa0ffd1df86740d1bc1ee920b724b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mongospawn-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5fcb523492980a9f434bbb913983edf8a9ac0171efcf2aac372c4e24973421eb
MD5 574af44a46b28b1725fcf49ef98b9f29
BLAKE2b-256 c5466399e0ef54ff8e7463646f43e5dedba0d545c1c5965e142704cc0ab2c03b

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