Tools for validation and storage of JSON data using the NMDC Schema
Project description
Tools for validation and storage of JSON data using the NMDC Schema.
Getting Started
pip install nmdc-mongo-tools
#
Create a .env
file in your working directory and add the following lines to it:
NMDC_JSON_SCHEMA_URL=https://raw.githubusercontent.com/microbiomedata/nmdc-metadata/master/schema/nmdc.schema.json
NMDC_MONGO_HOST=<host>
NMDC_MONGO_USERNAME=<username>
NMDC_MONGO_PWD=<password>
, setting appropriate values for connecting to a MongoDB instance. As an alternative to NMDC_JSON_SCHEMA_URL
, you may
set NMDC_JSON_SCHEMA_FILE
to be the path to your local copy of the NMDC Schema JSON file. You may also set your
environment variables any other way -- the .env
-file approach is supported but not required.
Then, import from the nmdc_mongo
package, e.g.
from nmdc_mongo import get_db
db = get_db()
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
Built Distribution
File details
Details for the file nmdc-mongo-tools-0.0.3.tar.gz
.
File metadata
- Download URL: nmdc-mongo-tools-0.0.3.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 855fb747f975933938430c58abcd355a3cc00168f7eca6c27d6f0a0186a38754 |
|
MD5 | 72bc5021f5657ae4bd0efb50c0b26c30 |
|
BLAKE2b-256 | 1186200a681e97e01cd9c342ecc58c938cc8eae2e7b3f1fb90e89c8aa8627321 |
File details
Details for the file nmdc_mongo_tools-0.0.3-py2-none-any.whl
.
File metadata
- Download URL: nmdc_mongo_tools-0.0.3-py2-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47d3825fd3eb027a253a517686069a52c565229f75e8f88e676cb509726db794 |
|
MD5 | dc51d089cd6f8bcb3f588d1833a7768c |
|
BLAKE2b-256 | 3f36e8cd40d5377df3de998e7d0b65c849d6841cd8aa5e8a2cc87e8f35d87e00 |