Skip to main content

omnidbm — universal database-to-database transfer engine

CI PyPI version Python versions License Downloads Wheel


omnidbm moves data between any supported database and any other. MongoDB, PostgreSQL, MySQL, SQLite, Redis, CSV, JSONL — pick a source, pick a destination, transfer. One package, one CLI, one lossless data bus.

Features

  • Any-to-any transfers — every connector speaks both directions; no source/destination pairing limits
  • Lossless type bus — datetimes, ObjectIds, Binary, and Decimals survive round trips via JSON-safe type tags
  • Zero hardcoding — everything is configured per-run with CLI flags; nothing is baked in
  • Automatic schema — PostgreSQL, MySQL, and SQLite destinations are created and typed for you
  • Interactive wizard — guided setup for every supported database
  • Preflight checks — doctor verifies connectivity before you start
  • Battle-tested basics — batch size, per-table limits, filters, drop-first, conflict policies, dry runs, index copy

Install

pip install omnidbm

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

Requires Python 3.10+. MongoDB (pymongo) and PostgreSQL (psycopg) drivers are included; MySQL and Redis drivers are optional extras.

Quick start

# Transfer every table, schema included
omnidbm transfer -s mongodb://user:pass@host:27017/db -d postgresql://user:pass@host:5432/db

# Selective: specific tables, bigger batches, wipe the destination first
omnidbm transfer -s mongodb://... -d postgresql://... -t users,orders --batch-size 2000 --drop-first

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

# Guided interactive setup
omnidbm wizard

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

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

Options

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

URI schemes

Scheme Example
MongoDB mongodb://user:pass@host:27017/db · mongodb+srv://...
PostgreSQL postgresql://user:pass@host:5432/db
MySQL mysql://user:pass@host:3306/db
SQLite sqlite://C:/path/db.sqlite · sqlite://:memory:
Redis redis://user:pass@host:6379/0
CSV csv://C:/path/file.csv · csv://C:/data/ (directory = multiple tables)
JSONL jsonl://C:/path/out.jsonl · jsonl://C:/data/

Redis treats key prefixes (split on :) as tables; (all) targets every key. Documents use the shape {"_key", "_value", "_ttl"} and support strings, hashes, lists, and sets.

Python API

from omnidbm import transfer, TransferConfig, ConnectorConfig, TableSpec

config = TransferConfig(
    source=ConnectorConfig(uri="mongodb://user:pass@host:27017/db"),
    dest=ConnectorConfig(uri="postgresql://user:pass@host:5432/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, and close, then register:

from omnidbm.core.connector import BaseConnector, register


@register("myproto")
class MyConnector(BaseConnector): ...

How the type bus works

Every document is normalized to JSON-safe values on the wire, tagged so nothing is lost in transit:

Type Tag
datetime {"$omni:datetime": "2026-08-17T12:00:00+00:00"}
ObjectId {"$omni:objectid": "507f1f77bcf86cd799439011"}
Binary {"$omni:binary": "<base64>"}
Decimal {"$omni:decimal": "99.95"}

Development

git clone https://github.com/Notookk/Omnidbm
pip install -e ".[dev]"

pytest          # run the test suite
ruff check .    # lint
ruff format .   # format

Roadmap

  • Resumable transfers with checkpoints
  • Saved config profiles
  • Parallel table transfers
  • Incremental / delta sync

License

MIT — see LICENSE.

Release files for omnidbm 0.1.4

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.4
File Size Uploaded
omnidbm-0.1.4.tar.gz 24.1 kB Details

Built distribution (wheel)

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

Total release size: 51.3 kB

Release files / omnidbm-0.1.4.tar.gz

Download URL omnidbm-0.1.4.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5b062c0cb7ff146e17e8fcc99c9e71934015e084f9b90a899c17105c804f2940
BLAKE2b-256 checksum
How to use checksums
3c327363319a068fed09b48321c8ffe92a62d8761b466b1e9f7685eb2eb89ba8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

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

Download URL omnidbm-0.1.4-py3-none-any.whl
Size 27.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fdf7fc5fe8bf39dcf7a2c81320c975dca814e8a9ffbe36ac11dad5a6b74099a
BLAKE2b-256 checksum
How to use checksums
c4cf532e4145abf80796c219263d3b3b2778ffae7ac1761c381ecfa97ad14028
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.5

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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