Metadata-Version: 2.4
Name: chemdb-common
Version: 0.2.2
Summary: Shared library for chemistry database MCP servers
Project-URL: Homepage, https://github.com/retospect/chemdb-common
Project-URL: Repository, https://github.com/retospect/chemdb-common
Author-email: Reto Stamm <reto@retostamm.com>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Keywords: catalysis,chemistry,database,mcp,mof
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.0
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: typer>=0.12
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.0; extra == 'postgres'
Description-Content-Type: text/markdown

# chemdb-common

Shared library for chemistry database MCP servers. Provides SQLAlchemy models, sync utilities, and CLI tools used by `grandmofty-mcp` and `catapult-mcp`.

## Features

- **Pydantic models** — typed schemas for MOFs, reactions, isotherms
- **SQLAlchemy ORM** — SQLite and PostgreSQL support
- **Sync framework** — pull data from remote APIs (mofdb-client, Zenodo, Materials Project)
- **CLI** — `chemdb` command for database management

## Installation

```bash
uv pip install -e .
# With PostgreSQL support:
uv pip install -e ".[postgres]"
```

## Usage

```bash
chemdb sync          # sync all data sources
chemdb stats         # show database statistics
```

## Dependencies

- **pydantic** — data validation
- **sqlalchemy** — ORM
- **typer** — CLI framework
- **httpx** — HTTP client for API calls

## License

LGPL-3.0-or-later — see [LICENSE](LICENSE).
