Metadata-Version: 2.4
Name: tinydantic
Version: 0.4.0
Summary: A Pydantic-powered ODM (object-document mapper) for TinyDB
Keywords: odm,pydantic,tinydb
Author: Chris Wilson
Author-email: Chris Wilson <christopher.david.wilson@gmail.com>
License-Expression: Apache-2.0 OR MIT
License-File: LICENSES/Apache-2.0.txt
License-File: LICENSES/CC-BY-4.0.txt
License-File: LICENSES/MIT.txt
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
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: Topic :: Database
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Dist: pyyaml>=6.0
Requires-Dist: pydantic[email]>=2.11
Requires-Dist: tinydb>=4.8
Requires-Python: >=3.10
Project-URL: Changelog, https://github.com/tinydantic/tinydantic/blob/main/CHANGELOG.md
Project-URL: Documentation, https://tinydantic.dev
Project-URL: Issues, https://github.com/tinydantic/tinydantic/issues
Project-URL: Source, https://github.com/tinydantic/tinydantic
Description-Content-Type: text/markdown

# tinydantic

<!-- overview-start -->

[![PyPI - Version](https://img.shields.io/pypi/v/tinydantic.svg)](https://pypi.org/project/tinydantic) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tinydantic.svg)](https://pypi.org/project/tinydantic) [![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)

`tinydantic` is a simple Python object-document mapper (ODM) for the [TinyDB](https://tinydb.readthedocs.io/en/latest/) document database. It uses [Pydantic](https://docs.pydantic.dev/latest/)—the most widely used data validation library—for document model definition and validation.

<!-- prettier-ignore-start -->

> [!NOTE]
> `tinydantic` is an experimental project under active development and should not be considered stable for use in a production environment.
>
> Releases follow the [SemVer versioning spec](https://semver.org):
>
> > Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.
>
> Minor releases may include breaking changes until v1.0 — check the [changelog](https://github.com/tinydantic/tinydantic/blob/main/CHANGELOG.md) when upgrading.
>
> **AI Disclaimer**
>
> I started thinking about the idea for this project after discovering TinyDB a couple years ago. However, I never had the time (or a real use case) to finish the implementation. With the release of [Claude Fable 5](https://www.anthropic.com/claude/fable), it seemed like a good opportunity to revisit this idea and try to get an initial prototype of this working with the help of AI. I'm currently experimenting with the implementation generated by Claude to understand what works well and what needs further improvement.
>
> I am *not* a NoSQL database expert and it's very possible that there are better implementations and/or interfaces than what Claude has produced in this initial prototype. If you find things that are broken, awkward, missing, or don't follow best practices, please feel free to open an issue or a PR to suggest changes. Feedback is welcome!

<!-- prettier-ignore-end -->

<!-- overview-end -->

Full documentation — including a [quickstart](https://tinydantic.dev/latest/usage/quickstart/) that walks through a complete create-read-update-delete example — is available at [tinydantic.dev](https://tinydantic.dev).

## Table of Contents

- [Installation](#installation)
- [Introduction](#introduction)
- [License](#license)

## Introduction

<!-- introduction-start -->

`tinydantic` is a wrapper library around [TinyDB](https://tinydb.readthedocs.io/en/latest/) that enables using [Pydantic](https://docs.pydantic.dev/) models to manage documents stored in a TinyDB database. By specifying Python type annotations for each field in a document model, data validation is handled automatically by Pydantic when instantiating a model from the database.

<!-- introduction-end -->

## Installation

<!-- installation-start -->

`tinydantic` is [available on PyPI](https://pypi.org/project/tinydantic/) and can be installed with [pip](https://github.com/pypa/pip). Easy peasy lemon squeezy 🍋

```sh
pip install tinydantic
```

<!-- installation-end -->

## License

See the [LICENSE](https://github.com/tinydantic/tinydantic/blob/main/LICENSE.md) file for copyright & license information.
