Metadata-Version: 2.4
Name: mainsequence-metatable
Version: 0.1.2
Summary: Main Sequence MetaTables Python client and standalone API
Author-email: Main Sequence GmbH <dev@main-sequence.io>
License-Expression: MIT
Project-URL: Homepage, https://github.com/mainsequence-projects/MetaTables
Project-URL: Issues, https://github.com/mainsequence-projects/MetaTables/issues
Project-URL: Documentation, https://potential-doodle-wn39mnm.pages.github.io/
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mainsequence[server]<9,>=8.1.25
Requires-Dist: alembic<2,>=1.18
Requires-Dist: cachetools
Requires-Dist: cryptography<51,>=46
Requires-Dist: fastapi<1,>=0.110
Requires-Dist: httpx<1,>=0.28
Requires-Dist: keyring<26,>=25
Requires-Dist: numpy
Requires-Dist: opentelemetry-api
Requires-Dist: opentelemetry-exporter-otlp
Requires-Dist: opentelemetry-sdk
Requires-Dist: pandas
Requires-Dist: psutil
Requires-Dist: psycopg2-binary<3,>=2.9
Requires-Dist: pyodbc<6,>=5
Requires-Dist: pydantic<3,>=2.11
Requires-Dist: pyyaml
Requires-Dist: requests>=2.33.0
Requires-Dist: sqlalchemy<3,>=2.1
Requires-Dist: psycopg[binary]<4,>=3.2
Requires-Dist: structlog
Requires-Dist: tqdm<5,>=4.66
Requires-Dist: typer<1,>=0.12
Requires-Dist: urllib3>=2.7.0
Requires-Dist: uvicorn==0.52.4
Provides-Extra: dev
Requires-Dist: pytest<10,>=8; extra == "dev"
Requires-Dist: ruff>=0.14; extra == "dev"
Requires-Dist: build<2,>=1; extra == "dev"
Requires-Dist: packaging>=24.2; extra == "dev"
Requires-Dist: twine<7,>=6; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs<2,>=1.6; extra == "docs"
Provides-Extra: mysql
Requires-Dist: PyMySQL[rsa]<1.2,>=1.1.1; extra == "mysql"
Provides-Extra: mssql
Dynamic: license-file

<p align="center">
  <img src="docs/assets/branding/metatables.svg" alt="MetaTables logo" width="80" height="80" />
</p>
<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/assets/branding/mainsequence-dark.png" />
    <source media="(prefers-color-scheme: light)" srcset="docs/assets/branding/mainsequence-light.png" />
    <img src="docs/assets/branding/mainsequence-light.png" alt="Main Sequence logo" width="280" />
  </picture>
</p>

# MetaTables

MetaTables is a Python client and API for describing, registering, querying, and
updating database tables through a governed catalog.

Its PyPI distribution is `mainsequence-metatable`; imports and the command are
named `metatables`. See [publishing](docs/contributing/releasing.md) for the
release process and the current published SDK prerequisite.

The **Python client** provides SQLAlchemy table definitions, application-table
migrations, query objects, time-index readers and update processes,
and the `metatables` command. The **MetaTables API** stores table identities,
contracts, permissions, and update history, and executes authorized operations on
physical databases.

A catalog record describes a table; the table's rows live in its DataSource.
The Main Sequence SDK supplies platform authentication, identity, repository
context, and platform Secrets. MetaTables owns its table behavior and storage
adapters. Local development runs the same API with one SQLite database for system metadata and table rows. Initialize it explicitly
through Settings; startup never runs Alembic.

## Start here

- [Install and connect](docs/client/installation-and-connection.md), including the current local SDK prerequisite.
- [Understand the concepts](docs/concepts/architecture.md) and [identity and scope](docs/concepts/identity-and-scope.md).
- [Understand the security model](docs/security/index.md): administration, Reader/Writer table ownership, sharing, and implementation status.
- [Follow the market-data tutorial](docs/client/tutorial.md) with its complete examples folder.
- [Define and migrate managed tables](docs/client/define-and-migrate-tables.md).
- [Register existing tables](docs/client/register-existing-tables.md).
- [Manage DataSources](docs/concepts/data-sources.md): PostgreSQL, MySQL and MSSQL configuration, driver setup, examples and current operation limits.
- [Build an updater](docs/client/build-an-updater.md) or [read an existing time-index table](docs/client/read-existing-time-index-tables.md).
- [Run the API locally](docs/operations/local-runtime.md) or [operate a hosted API](docs/operations/hosted-runtime.md).

The [documentation index](docs/index.md) separates client, API, operations, and
contributor guides. The [capability reference](docs/reference/capabilities.md)
records implemented and unavailable operations, including inherited methods and
CLI commands. Runnable guide assets live in [examples](examples/README.md).

## Client skills

Copy the installed client's skills into a consuming application explicitly:

```bash
metatables copy-metatables-skills --path /path/to/application
```

The command uses the Main Sequence SDK helper, writes to
`.agents/skills/metatables/`, and records the client version. It works without
login or an API. Use `--dry-run` to preview the copy, or put global `--json` before
the command for structured output. See [installation](docs/client/installation-and-connection.md#copy-client-skills-into-an-application)
for refresh behavior and the bundled references.

## Development

Python 3.13 or newer is required. After installing the compatible local SDK:

```bash
python -m pip install -e '.[dev,docs]'
python -m metatables.sdk_compat
python -m pytest -q
python -m scripts.check_project
mkdocs build --strict
```

Physical PostgreSQL checks use explicitly configured disposable databases;
see [testing](docs/contributing/testing.md). No separate frontend is needed to
use the Python client or run the API.

## License

MetaTables is licensed under the MIT License. See [LICENSE](LICENSE) for the
complete terms.
