pysqlsync
Synchronize schema and large volumes of data
Decision gist · record as of 2026-08-14
Yes, if you need async bulk data loading or schema synchronization in Python. The library is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers genuine performance advantages over traditional ORMs for insert/upsert workflows. Install friction is low. Not suitable if you require Python versions below 3.10 or prefer synchronous APIs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; async/await usage requires an event loop (e.g., asyncio).
- Low install friction with only three runtime dependencies.
- Active maintenance with recent releases; last commit 2026-07-24 and latest release 2026-07-06 indicate ongoing development.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-07-06 (39 days) · last repo commit 2026-07-24 · 6 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 107,486 downloads/mo, #12,613 on PyPI
Alternatives
Verify before relying
pip install pysqlsync
import dataclasses
from pysqlsync import get_dialect, ConnectionParameters
@dataclasses.dataclass
class UserTable:
id: int
name: str
engine = get_dialect("postgresql")
params = ConnectionParameters(host="localhost", database="mydb")
async with engine.create_connection(params) as conn:
await conn.create_objects([UserTable])
await conn.insert_data(UserTable, [UserTable(id=1, name="Alice")])- Supported database dialects beyond PostgreSQL, MySQL, and Oracle mentioned in formation section.
- Performance comparison baseline against SQLAlchemy or other ORMs in real-world scenarios.
- Handling of complex nested composite types and collection types in practice.
What it is and what it does
pysqlsync is an async-first Python library for synchronizing database schemas and efficiently loading large volumes of data. It uses Python dataclasses to define table structures and generates CREATE, DROP, INSERT, MERGE, and DELETE SQL statements, then executes them asynchronously against database drivers like asyncpg or aiomysql. The library supports two main workflows: schema synchronization (comparing a source database state to a target Python dataclass definition and emitting transformation SQL) and data synchronization (inserting, upserting, or deleting rows from lists of tuples or dataclass instances).
The package is built around async/await patterns to maximize throughput when working with large datasets. It handles type mapping across SQL dialects, supports enumerations and composite types, and can generate SQL from dataclass definitions or discover existing database schemas via information_schema or pg_catalog. Runtime dependencies are minimal (json_strong_typing, truststore, typing_extensions), and the library targets modern Python versions (3.10+).
Use it for
- Generate CREATE TABLE scripts from Python dataclass definitions for schema initialization across multiple SQL dialects.
- Discover and reflect existing database schemas into Python object hierarchies for programmatic inspection and comparison.
- Synchronize a target database schema to match a desired state defined in Python dataclasses, emitting and executing ALTER/CREATE/DROP statements.
- Bulk-insert or upsert millions of rows from in-memory lists or tuples with minimal CPU overhead using async operations.
- Keep a local database replica in sync with remote data sources by efficiently merging incoming records into existing tables.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need async bulk data loading or schema synchronization in Python.
The library is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers genuine performance advantages over traditional ORMs for insert/upsert workflows. Install friction is low. Not suitable if you require Python versions below 3.10 or prefer synchronous APIs.
Install
pysqlsync on PyPI
Before you install
Low install friction with only three runtime dependencies. Active maintenance with recent releases; last commit 2026-07-24 and latest release 2026-07-06 indicate ongoing development.
Requires Python 3.10 or later; async/await usage requires an event loop (e.g., asyncio).
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install pysqlsync
import dataclasses
from pysqlsync import get_dialect, ConnectionParameters
@dataclasses.dataclass
class UserTable:
id: int
name: str
engine = get_dialect("postgresql")
params = ConnectionParameters(host="localhost", database="mydb")
async with engine.create_connection(params) as conn:
await conn.create_objects([UserTable])
await conn.insert_data(UserTable, [UserTable(id=1, name="Alice")])
Verify before relying
- Supported database dialects beyond PostgreSQL, MySQL, and Oracle mentioned in formation section.
- Performance comparison baseline against SQLAlchemy or other ORMs in real-world scenarios.
- Handling of complex nested composite types and collection types in practice.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesjson_strong_typingtruststoretyping_extensions |
| Maintenance | Actively maintained 39 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 107,486 / month, #12,613 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Database :: Database Engines/ServersTopic :: Software Development :: Code GeneratorsTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: pysqlsync-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “async database schema synchronization”
- pysqlsyncSynchronize database schemas and bulk-load data using Python…
- migramigra compares PostgreSQL database schemas and generates the SQL…
- aiorwlockProvides read-write locks for asyncio programs, allowing multiple…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pgcopy · pangres · databases · mysql-replication · aiosql · asyncmy2 · asyncpg-trek · asyncmy · pgpq · postgrest