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("dwinston_share")
db.list_collection_names()
# ['metagenome_assembly_set', 'omics_processing_set', 'metaproteomics_analysis_activity_set', 'mags_activity_set',
# 'read_QC_analysis_activity_set', 'nom_analysis_activity_set', 'biosample_set', 'read_based_analysis_activity_set',
# 'study_set', 'metabolomics_analysis_activity_set', 'metagenome_annotation_activity_set', 'data_object_set',
# 'raw.functional_annotation_set']
Metadata
Release files for nmdc-mongo-tools 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nmdc-mongo-tools-0.0.7.tar.gz | 20.3 kB | Without provenance | Details for nmdc-mongo-tools-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nmdc_mongo_tools-0.0.7-py2-none-any.whl | Python 2 | none | any | Details for nmdc_mongo_tools-0.0.7-py2-none-any.whl |
Total release size: 27.2 kB
Release files / nmdc-mongo-tools-0.0.7.tar.gz
| Download URL | nmdc-mongo-tools-0.0.7.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
256cfa84475de4b8bd0af1fba3a2d66b51b2d22b56f26d0d1e4f1b57e0a9cfb8
|
|
BLAKE2b-256 checksum How to use checksums |
4c590a8717c5cce902905e64a75fdcc861b415d4732be7785664066b7c17cc12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / nmdc_mongo_tools-0.0.7-py2-none-any.whl
| Download URL | nmdc_mongo_tools-0.0.7-py2-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
4722e28a126d62de76ad6ac424336acbda011f6273072f52f3a3e7bcf4ef4edf
|
|
BLAKE2b-256 checksum How to use checksums |
606587f477cd8892132c3c08c856b1223a8c2d9984e9bd755a7a8dd853c625a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for nmdc-mongo-tools 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.