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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mongospawn-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fcb523492980a9f434bbb913983edf8a9ac0171efcf2aac372c4e24973421eb |
|
MD5 | 574af44a46b28b1725fcf49ef98b9f29 |
|
BLAKE2b-256 | c5466399e0ef54ff8e7463646f43e5dedba0d545c1c5965e142704cc0ab2c03b |