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.2

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.2
File Size Uploaded
omnidbm-0.1.2.tar.gz 23.9 kB Details

Built distribution (wheel)

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

Total release size: 50.9 kB

Release files / omnidbm-0.1.2.tar.gz

Download URL omnidbm-0.1.2.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dc29b340d217ffdb47f94d94295287bb3cf320d1609e1d54c582e53f35015a6d
BLAKE2b-256 checksum
How to use checksums
c91dbc4b308a2bad48896ad342784b4c50a57b2724eecb1819945928b50c66ba
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 17, 2026.

Transparency log

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

Download URL omnidbm-0.1.2-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
638456f29f9066656ffa9ecfa53494a29cfad766ffb06a5e9cecbf5872756f2b
BLAKE2b-256 checksum
How to use checksums
611da974aacf5cd6cce5846944ea03850e8102282b1cd2d3e15d301a04969cb4
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 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

This release

0.1.2 This release

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