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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongospawn-0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 248917f2295cdfef517d0d4ad58e697b9e790a75db612c25429ee2bad1168cd6
MD5 75d5b093b011ce0d4aa9f6e92ec03af1
BLAKE2b-256 891e9b39dd56cefff4b10385d06d312189b01e6fd318977403dae18cc87f3497

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mongospawn-0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 34411861de72c9816c62cbdf90cbc17756b0d0bd3509fff4c8893b6b0e9939f3
MD5 49750e45be307cc984b5edfd1a856e19
BLAKE2b-256 0a44fa4f2b281c3c147d1719782c234471cca84e148badf27eef83ef5471f337

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