Skip to main content
https://badge.fury.io/py/pfmongo.svg https://travis-ci.org/FNNDSC/pfmongo.svg?branch=master https://img.shields.io/badge/python-3.5%2B-blue.svg

Quick Overview

pfmongo is a python client/module (CLI and API) for simplifying the interaction with a MongoDB. The module provides some idiosyncratic abstractions that are nonetheless hoped to be logically straightforward. The repository includes a docker-compose.yml that allows for easy instantiation of the MongoDB infrastructure.

Warning, Will Robinson!

If you wish to use pfmongo on your own computer, you do need to note these prerequisites:

docker and docker-compose

Since pfmongo interacts with a MongoDB, the easiest mechanism to deploy this database is via docker-compose and hence docker. Installation of these is beyond the scope of this document, but should be straightforward enough. Google is your friend in that quest.

Overview

pfmongo provides a somewhat opinionated abstraction for interacting with a MongoDB.

Installation

Using PyPI

The best method of installing this script and all of its dependencies is by fetching it from PyPI using a python virtual environment.

pip3 install pfmongo

Using CLI

Alternatively, from a cloned version of the repository:

pip3 install -r requirements.txt -U ./

or for development purposes

pip3 install -r requirements.txt -e ./

Running

Ecosystem

Assuming you have docker and docker-compose on your system, do

docker-compose up -d

Environment

Several environment variables need to be set prior to using pfmongo:

Linux

export MD_URI=mongodb://localhost:27017 && export MD_USERNAME=admin && export MD_PASSWORD=admin && export MD_SESSIONUSER=rudolph

Windows

$env:MD_USERNAME=admin
$env:MD_PASSWORD=admin
$env:MD_URI=mongodb://localhost:27017
$env:MD_SESSIONUER=rudolph

Command line arguments

pfmongo --help

Examples

alias mdb='pfmongo'
mdb database connect PACSDCM
mdb collection connect MRN
mdb document add --file examples/lld.json --id lld.json

-30-

Metadata

Release files for pfmongo 0.9.900

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pfmongo 0.9.900
File Size Uploaded
pfmongo-0.9.900.tar.gz 57.1 kB Details

Release files / pfmongo-0.9.900.tar.gz

Download URL pfmongo-0.9.900.tar.gz
Size 57.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3c2ca1f6e347779e2248e62388784cb0ddd5ab3e84cdeaa535f1541c69b409b3
BLAKE2b-256 checksum
How to use checksums
bc7785ed7e6759df5d5e843fa6dd1a18b1da29ed6970334164be4ce65411729a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.9.900 This release

1 release file

0.9.152

1 release file

0.9.150

1 release file

0.9.148

1 release file

0.9.146

1 release file

0.9.144

1 release file

0.9.142

1 release file

0.9.140

1 release file

0.9.134

1 release file

0.9.132

1 release file

0.9.130

1 release file

0.9.108

1 release file

0.9.102

1 release file

0.9.100

1 release file

0.9.99

1 release file

0.9.98

1 release file

0.9.97

1 release file

0.9.95

1 release file

0.9.94

1 release file

0.9.91

1 release file

0.9.9

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page