Skip to main content

imongo

A MongoDB kernel for Jupyter. Mainly for educational purposes.

This kernel wraps the Mongo shell using pexpect and was inspired by bash_kernel and ipython_mysql_kernel. It uses Renderjson for JSON pretty-printing.

IMongo in action

IMongo in action

How to install

Major requirements

IMongo requires Jupyter and MongoDB.

Install MongoDB

On macOS, use Homebrew: brew install mongodb

For other platforms, please refer to the MongoDB documentation

Install Jupyter and IMongo Kernel using pip

To install Jupyter, IMongo and all other dependencies, use pip install:

$ pip install imongo-kernel

Install Jupyter and IMongo Kernel using conda

Although the installation with pip works fine , we recommend using the conda package manager to create a virtual environment. You need to have either Anaconda or Miniconda installed.

$ conda create -n imongo jupyter "python>3.6"
$ source activate imongo
$ pip install imongo-kernel

Both methods install the imongo package and configure Jupyter to be used with the new kernel by installing a kernel spec.

Configuration (optional)

MongoDB configuration such as host/port can be passed as a YAML file, located at the Jupyter configuration directory. The default path for UNIX systems is ~/.jupyter/imongo_config.yml. The options available are the same as the ones available for the mongo CLI tool. This configuration is necessary in case your MongoDB instance has authentication enabled, runs at a non-standard port, or runs on a remote (non-localhost) location.

Sample imongo_config.yml:

host: some.host.io
port: 27017
username: username
password: password
authenticationDatabase: admin
quiet: null

If imongo_config.yml doesn’t exist or is empty, IMongo will attempt to connect to the MongoDB instance at localhost:27017, without any user authentication.

Uninstall:

# Remove library:
$ pip uninstall imongo
# Remove kernel spec
$ jupyter kernelspec remove imongo

TODO:

  • Implement code completion functionality

  • Fix long command issue

  • Send Mongo shell Javascript errors/exceptions to stderr

Metadata

Release files for imongo-kernel 0.1.0

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

Source distribution (sdist)

Source distribution for imongo-kernel 0.1.0
File Size Uploaded Provenance
imongo-kernel-0.1.0.tar.gz 8.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for imongo-kernel 0.1.0
File Interpreter ABI Platform
imongo_kernel-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / imongo-kernel-0.1.0.tar.gz

Download URL imongo-kernel-0.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d83cae1e7dca5ebe3cf80ab59cc1b568afb476201778347db42685006364e415
BLAKE2b-256 checksum
How to use checksums
f4ac3b2978895b92a229bf898721a51bf4ecebcfb9cebd087bf92ddef2580133
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / imongo_kernel-0.1.0-py3-none-any.whl

Download URL imongo_kernel-0.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6f2322a19a084a0457984ed4510b4921b621c5355e4c308e8de70ce6b0f90e9
BLAKE2b-256 checksum
How to use checksums
949e3d9acb8e8f948aef6454b066f1a1b8fab02def7b8661b0e9ab544d12e18d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for imongo-kernel 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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