Skip to main content

omnidbm

Universal database-to-database transfer engine with an interactive CLI. Transfer any supported source to any supported destination: MongoDB, PostgreSQL, MySQL, SQLite, Redis, CSV, JSONL.

Install

pip install omnidbm
pip install "omnidbm[mysql]"    # MySQL support
pip install "omnidbm[redis]"    # Redis support
pip install "omnidbm[all]"      # everything

CLI

# Transfer all tables
omnidbm transfer --source mongodb://user:pass@host/db --dest postgresql://user:pass@host/db

# Specific tables, batch size, drop destination first
omnidbm transfer -s mongodb://... -d postgresql://... -t users,orders --batch-size 2000 --drop-first

# Count only, no writes
omnidbm transfer -s csv://./data -d mongodb://... --dry-run

# Interactive guided wizard
omnidbm wizard

# Inspect a source
omnidbm inspect mongodb://user:pass@host/db --sample 3

# Connectivity preflight
omnidbm doctor mongodb://... postgresql://...

Options

Flag Description
-s, --source Source URI (mongodb://, mongodb+srv://, postgresql://, csv://, jsonl://)
-d, --dest Destination URI (same schemes)
-t, --tables Comma-separated table names (default: all)
--batch-size Documents per batch (default 1000)
--drop-first Drop destination table before transfer
--dry-run Count documents only, no writes
--limit Max documents per table
--filter Source-side JSON query filter, e.g. {"status":"active"}
--conflict skip (default), overwrite, or error
--copy-indexes/--no-copy-indexes Copy indexes (MongoDB only)
--copy-options/--no-copy-options Copy collection options (MongoDB only)

URI schemes

  • mongodb://user:pass@host:27017/db or mongodb+srv://...
  • postgresql://user:pass@host:5432/db
  • mysql://user:pass@host:3306/db
  • sqlite://C:/path/db.sqlite or sqlite://:memory:
  • redis://user:pass@host:6379/0 — tables are key prefixes (split on :), (all) for every key
  • csv://C:/path/to/file.csv or csv://C:/data/ (directory = multiple tables)
  • jsonl://C:/path/out.jsonl or jsonl://C:/data/

Redis documents use the shape {"_key": ..., "_value": ..., "_ttl": ...}: strings, hashes (dict), and lists/sets (list) are supported. Keys missing the table prefix get it prepended on write.

Python API

from omnidbm import transfer, TransferConfig, ConnectorConfig, TableSpec

config = TransferConfig(
    source=ConnectorConfig(uri="mongodb://user:pass@host/db"),
    dest=ConnectorConfig(uri="postgresql://user:pass@host/db"),
    tables=[TableSpec(source="users", dest="users")],
    drop_first=True,
)
results = transfer(config)

Custom connectors: subclass BaseConnector, implement connect, list_tables, read_stream, write_stream, close, then register with @register("scheme").

Notes

  • Documents are normalized to JSON-safe values with type tags, so datetime, ObjectId, Binary, and Decimal survive any-to-any transfers losslessly.
  • PostgreSQL/MySQL/SQLite destination tables are created automatically with inferred column types.
  • MySQL and Redis drivers are optional: pip install omnidbm[mysql], pip install omnidbm[redis].
  • CSV destinations require consistent keys across documents; use JSONL for heterogeneous data.
  • --conflict overwrite on files behaves like append (files are immutable).

Release files for omnidbm 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 omnidbm 0.1.0
File Size Uploaded
omnidbm-0.1.0.tar.gz 22.3 kB Details

Built distribution (wheel)

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

Total release size: 48.5 kB

Release files / omnidbm-0.1.0.tar.gz

Download URL omnidbm-0.1.0.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8b192ee90669b86e8d06bb3675e0b5f472dc87a46bda25b807e1ae54563f2bc3
BLAKE2b-256 checksum
How to use checksums
97e7b8ae7d2eb4967b01eefb2c8734018358736d20523bb892b494c19ce430e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

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

Download URL omnidbm-0.1.0-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e990340340cc91bbb9f3095da148f2195a2498e04a86a1ce9de3459f12feb281
BLAKE2b-256 checksum
How to use checksums
6467ee0f787d1406e08d09b112c5e70dc5bc1a75444ad0e66d06f8ce433cb21b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

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