Analyze and understand data stored in MongoDB from the command line
Project description
Mongo Analyser is a tool for better understanding the structure of MongoDB collections. It helps users infer the schema of a collection by analyzing a sample of documents, identifying field types, and providing insights into the data distribution, etc. It provides a text user interface (TUI) with built-in AI assistance to help users get a better understanding of their data.
Features
- Automatically infers the schema of MongoDB collections
- Identifies the types of fields in the collection
- Provides insights into the distribution of data
- Provides a user-friendly TUI with integrated AI assistance
- Works with MongoDB Atlas and self-hosted MongoDB instances
- Works with models from Ollama, OpenAI, and Google
Installation
pipx install mongo-analyser
Or
uv tool install mongo-analyser
Documentation
Mongo Analyser supports the following field types when inferring the schema of a MongoDB collection:
| Field Type | Python Equivalent | MongoDB Equivalent | Comments |
|---|---|---|---|
int32 |
int |
int32 |
|
int64 |
int |
int64 |
|
double |
float |
double |
|
str |
str |
string |
|
bool |
bool |
bool |
|
datetime |
datetime |
date |
|
dict |
dict |
document |
Equivalent to a BSON document (which is a MongoDB object or subdocument) |
empty |
None or [] |
null or array |
The empty type is used when a field has no value (null) or is an empty array. |
array<type> |
list |
array |
The type of the elements in the array is inferred from the sample of documents and can be any of the supported types except for array<type> |
binary<UUID> |
bytes |
binary (subtype 4) |
The UUID is stored as a 16-byte binary value |
binary<MD5> |
bytes |
binary (subtype 5) |
The MD5 hash is stored as a 16-byte binary value |
binary<ObjectId> |
bytes |
objectId |
The ObjectId is stored as a 12-byte binary value |
Contributing
See CONTRIBUTING.md for details on how to make a contribution.
Logo
The leaf logo is originally from SVG Repo.
License
Mongo Analyser is licensed under the MIT License.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mongo_analyser-0.2.0b2.tar.gz.
File metadata
- Download URL: mongo_analyser-0.2.0b2.tar.gz
- Upload date:
- Size: 59.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.11.0-1014-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701817ad3c10dd3b498f480b1343f17f7b0ec2856161a4c86cfd422e9d802780
|
|
| MD5 |
4a7a2e05eff05761e3b52e1cd2850b41
|
|
| BLAKE2b-256 |
e2b7f07c6b6f962773aafb1a1d3938b510b2ac718cdaaeaa89e8961b5a0d4739
|
File details
Details for the file mongo_analyser-0.2.0b2-py3-none-any.whl.
File metadata
- Download URL: mongo_analyser-0.2.0b2-py3-none-any.whl
- Upload date:
- Size: 74.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.11.0-1014-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1fa24beee6b925c46f2c6dad239c6ec978bfaef8bb0410570025cef30b2b797
|
|
| MD5 |
cc133b6636de79be7a0a47fc18c78b01
|
|
| BLAKE2b-256 |
2b7a7de749de1c78433808c8e8de60c5cd3c55e5ce8ad0afed5195b0406e1c62
|