Skip to main content

A Tool For Transferring Data, Tables, And Datasets Between Different Databases.

Project description

🚀 Py-Auto-Migrate

The Universal Database Migration Tool
Seamlessly transfer data between any database.

PyPI - Version GitHub Repo Stars License Latest Release


Why Py-Auto-Migrate?

Migrating data between different database systems is often a tedious and error-prone task. Py-Auto-Migrate is here to change that. It's a powerful, flexible, and easy-to-use Python tool that automates the entire process.

  • Universal Connector: Supports a vast range of databases, from SQL to NoSQL.
  • Zero Configuration: Point to your source and target, and let the tool handle schema detection, data type mapping, and destination creation.
  • Blazing Fast: Optimized for performance, even with large datasets.
  • Safe & Reliable: Built-in checks ensure data integrity throughout the migration.

Installation

Get started in seconds with pip.

pip install py-auto-migrate

Prefer a Standalone Shell?

Don't have Python? No problem! Download the dedicated PAM-Shell for your OS from the Releases page. It's a ready-to-run executable with the same powerful features.


Quick Start

Using Py-Auto-Migrate is as simple as running one command.

Basic Command Structure

py-auto-migrate migrate --source <SOURCE_URI> --target <TARGET_URI>
Argument Description
--source Required. Connection URI for the source database.
--target Required. Connection URI for the target database.
--table Optional. Migrate a specific table. If omitted, all data is migrated.
--ai-ask Optional. Natural language query for AI-powered.
--ai-model Optional. OpenAI model (default: gpt-3.5-turbo).

Real-World Examples

1. Migrate an entire database from MongoDB to MySQL:

py-auto-migrate migrate \
  --source "mongodb://user:pass@localhost:27017/source_db" \
  --target "mysql://user:pass@localhost:3306/target_db"

2. Migrate a single PostgreSQL table to a new MongoDB collection:

py-auto-migrate migrate \
  --source "postgresql://user:pass@localhost:5432/mydb" \
  --target "mongodb://user:pass@localhost:27017/mydb" \ --table users

The Magic: If the target database or table doesn't exist, Py-Auto-Migrate automatically creates it for you! It intelligently maps source data types to the appropriate target schema.

3. Query using AI (Target must be a relational database):

export OPENAI_API_KEY="your-api-key"

Before using AI, make sure the OPENAI_API_KEY has been exported.

py-auto-migrate migrate \
  --source "oracle://user:password@host:port/service_name" \
  --target "mssql://user:password@host:port/database" \ 
  --ai-ask "Please select and insert only names that start with 'S', then sort them." /
  --ai-model "gpt-3.5-turbo"

Supported Databases

We support a wide and growing range of databases.

Category Databases
Relational MySQL PostgreSQL Oracle SQL Server MariaDB SQLite
NoSQL MongoDB Redis DynamoDB Elasticsearch
Analysis ClickHouse

Have a feature request? Open an issue and let us know!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_auto_migrate-0.4.6.tar.gz (22.4 kB view details)

Uploaded Source

File details

Details for the file py_auto_migrate-0.4.6.tar.gz.

File metadata

  • Download URL: py_auto_migrate-0.4.6.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for py_auto_migrate-0.4.6.tar.gz
Algorithm Hash digest
SHA256 f8e16837cb96f68ef98d6fe4d711dd3438dd28e56b892598415a3f55177107e7
MD5 a1518f878b7e1b1414a61f8833d3be1c
BLAKE2b-256 909e5d9a623015ebd30aab09c04742dc6c24149cdaada50dbc9bc5c52653080d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page