Metadata-Version: 2.4
Name: ormdantic
Version: 2.0.0
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Programming Language :: Python :: Implementation :: GraalPy
Classifier: Programming Language :: Rust
Classifier: Framework :: Pydantic
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Typing :: Typed
Requires-Dist: pydantic>=2.0.0
Requires-Dist: tomli>=2.0.0 ; python_full_version < '3.11'
Requires-Dist: typing-extensions>=4.0.0
Requires-Dist: typer>=0.26.7
Provides-Extra: postgresql
Provides-Extra: sqlite
License-File: LICENSE
Summary: Rust-backed async ORM for Python applications that already use Pydantic models as their data boundary.
Keywords: orm,pydantic,asyncio,rust,sql,sqlalchemy
Home-Page: https://ormdantic.yezz.me/
Author-email: Yasser Tahiri <hello@yezz.me>
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://ormdantic.yezz.me/
Project-URL: Funding, https://github.com/sponsors/yezz123
Project-URL: Homepage, https://github.com/yezz123/ormdantic

# ormdantic-py

PyO3 bindings for Ormdantic Rust internals.

`ormdantic-py` builds the Python extension module exposed as `ormdantic._ormdantic`. It is the boundary where Python passes schema metadata, query plans, values, and connection URLs into Rust.

## Python Module Surface

| Export                     | Purpose                                                     |
| -------------------------- | ----------------------------------------------------------- |
| `PyNativeConnection`       | Python wrapper around a persistent native connection.       |
| `hydrate_flat`             | Hydrates flat result rows into Python dictionaries.         |
| `hydrate_joined`           | Hydrates joined result rows into nested dictionaries/lists. |
| `plan_result_shape`        | Returns result-shape metadata for joined hydration.         |
| `validate_schema_tables`   | Registers table metadata and validates relationships.       |
| `compile_select_pk`        | Compiles a primary-key lookup.                              |
| `compile_find_many`        | Compiles a filtered/paginated select.                       |
| `compile_joined_find_many` | Compiles a joined relationship select.                      |
| `compile_count`            | Compiles a count query.                                     |
| `compile_insert`           | Compiles an insert query.                                   |
| `compile_update`           | Compiles an update query.                                   |
| `compile_upsert`           | Compiles an upsert query.                                   |
| `compile_delete_pk`        | Compiles a primary-key delete query.                        |
| `execute_native`           | Executes SQL through a native database URL.                 |
| `snake_case`               | Converts names to Ormdantic's database naming style.        |
| `sql_value`                | Converts Python values into SQL bind values.                |
| `compile_create_table_sql` | Compiles table DDL statements.                              |
| `compile_drop_table_sql`   | Compiles a table drop statement.                            |

## Dependencies

Internal dependencies:

- `ormdantic-core`
- `ormdantic-schema`
- `ormdantic-hydrate`
- `ormdantic-dialects`
- `ormdantic-engine`
- `ormdantic-sql`

External dependencies:

- `pyo3`

## Build

From the repository root:

```bash
cargo build -p ormdantic-py
```

The Python package build uses `maturin` and maps this crate to `ormdantic._ormdantic`.

