Metadata-Version: 2.5
Name: framework-py
Version: 0.1.0.dev2
Summary: Structured data science projects: a data catalog, integrity tracking, caching, outputs, and AI guardrails
Project-URL: Homepage, https://framework.pub
Project-URL: Source, https://github.com/frameworktools/framework-py
Project-URL: Issues, https://github.com/frameworktools/framework-py/issues
Author-email: Erik Westlund <erik@table1.org>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: jsonschema>=4.18
Requires-Dist: keyring>=25
Requires-Dist: pandas>=2.2
Requires-Dist: pyarrow>=16
Requires-Dist: pyyaml>=6.0
Requires-Dist: secretstorage>=3.2; sys_platform == 'linux'
Provides-Extra: duckdb
Requires-Dist: duckdb>=1.0; extra == 'duckdb'
Provides-Extra: excel
Requires-Dist: openpyxl>=3.1; extra == 'excel'
Provides-Extra: mysql
Requires-Dist: pymysql>=1.1; extra == 'mysql'
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
Provides-Extra: s3
Requires-Dist: boto3>=1.34; extra == 's3'
Provides-Extra: sas
Requires-Dist: pyreadstat>=1.2; extra == 'sas'
Provides-Extra: spss
Requires-Dist: pyreadstat>=1.2; extra == 'spss'
Provides-Extra: sqlserver
Requires-Dist: pyodbc>=5.0; extra == 'sqlserver'
Description-Content-Type: text/markdown

# framework-py

Framework for Python: structured data science projects with a data catalog,
data integrity tracking, caching, saved outputs, and guardrails for AI coding
assistants.

framework-py is the Python implementation of
[Framework](https://framework.table1.org). It reads and writes the same
project files as the R package (`settings.yml`, the data catalog, and
`framework.db`), so either language can work with a project's data. It works
without Framework Cloud and without the `fw` command-line tool.

Status: in development. The plan is in [docs/plan.md](docs/plan.md).

## Install

```sh
uv add framework-py
# or
pip install framework-py
```

Optional extras add database drivers, S3 storage, and more file formats:
`postgres`, `mysql`, `duckdb`, `sqlserver`, `s3`, `excel`, `spss`, and `sas`
(version 8 SAS transport files).

```sh
uv add "framework-py[postgres,s3]"
```

Releases are published from GitHub Actions with signed build provenance. To
check that a downloaded wheel or sdist was built from this repository:

```sh
gh attestation verify framework_py-<version>-py3-none-any.whl --repo frameworktools/framework-py
```

## Use

```python
import framework as fw

fw.settings("directories.notebooks")
info = fw.data_info("inputs.raw.survey")
fw.data_list()
```

After cloning a project, prepare it with:

```sh
uv run python -m framework bootstrap
```

## Development

```sh
uv sync
uv run pytest
uv run ruff check && uv run ruff format --check
uv run mypy
uv run python scripts/check_parity.py
uv run python scripts/sync_assets.py --check
```

Shared files (JSON Schemas, the `framework.db` schema, conformance fixtures,
and the R export list) are copied from the R package with
`scripts/sync_assets.py`. Change them in the R repository, then copy them
again.

`parity.toml` maps every function the R package exports to its Python
equivalent, or gives the reason there is none.
