Metadata-Version: 2.4
Name: pray-core
Version: 1.25.0
Summary: Prayfile core library — package manager for the language placed before inference
Author-email: Andrei Makarov <contact@kiskolabs.com>
License-Expression: MIT
Project-URL: Homepage, https://pray.kisko.dev
Project-URL: Documentation, https://github.com/kiskolabs/pray
Project-URL: Repository, https://github.com/amkisko/pray_compat/tree/main/pray.py
Project-URL: Issues, https://github.com/amkisko/pray_compat/issues
Project-URL: Changelog, https://github.com/amkisko/pray_compat/blob/main/pray.py/CHANGELOG.md
Project-URL: Specification, https://github.com/kiskolabs/pray
Project-URL: Reference CLI, https://github.com/kiskolabs/pray
Project-URL: Source, https://github.com/amkisko/pray_compat
Keywords: pray,prayfile,agents,inference,package-manager,compose,lockfile
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
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: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Dynamic: license-file

# pray-core

Python library for [Prayfile](https://pray.kisko.dev): a package manager for the
language placed before inference.

This package implements the path-package and `compose` subset: parse Prayfiles
and prayspecs without evaluating Python or Ruby code, resolve path packages,
render scoped `compose` destinations, build deterministic lockfile text, and
verify rendered files.

**Website:** [pray.kisko.dev](https://pray.kisko.dev)

**Maintainer:** Andrei Makarov ([contact@kiskolabs.com](mailto:contact@kiskolabs.com))

**Repository:** [amkisko/pray_compat](https://github.com/amkisko/pray_compat) (`pray.py/`)

**Specification and reference CLI:** [kiskolabs/pray](https://github.com/kiskolabs/pray)

**Packages:** [pypi.org/project/pray-core](https://pypi.org/project/pray-core)

**Community docs:** [CHANGELOG.md](CHANGELOG.md) · [LICENSE.md](LICENSE.md) · [SECURITY.md](SECURITY.md)

```sh
pip install pray-core
```

```python
from pathlib import Path
from pray import resolve, render, lock, install, verify

manifest = Path("examples/compose/Prayfile")
project = resolve(manifest)       # parse and resolve path packages
files = render(project)           # {relative destination: content}
lockfile_text = lock(project)     # Prayfile.lock text, nothing written

install(manifest)                 # write rendered files and Prayfile.lock
verify(manifest)                  # True, or raises PrayError on drift
```

Public API: `resolve`, `render`, `lock`, `install`, `verify`,
`parse_manifest`, `parse_prayspec`, and `PrayError`.

The Rust workspace owns the reference CLI. Registry, tarball, and
`tree`/`file` materialization are not supported here, so this is not full RFC
0100 level 2 conformance. `PrayError.code` carries the CLI exit status
(unsupported features use 8).

## Command line (secondary)

A thin console script ships for local use. It is not the reference CLI.

```sh
bin/pray version
bin/pray install examples/compose/Prayfile
bin/pray verify examples/compose/Prayfile
```

Commands: `manifest`, `install`, `render`, `verify`, and `version`. Other
commands exit with status 8.

## Development

```sh
make ci
```

Coverage uses Python's standard-library tracer and requires 100% executable
line coverage for `src/pray`. Benchmarks report median parse, resolve, and
render times over deterministic local fixtures. `make ci` also checks text
formatting, Python compilation, maintained mutants, dependency policy, the
runnable example, and the 150-line warning/300-line source limit.

`examples/compose` is a complete path-package project. The example check runs
it in a temporary copy without modifying the directory.

The root `Prayfile` uses the reference Pray CLI to provision shared project
instructions, skills, and community files from `amkisko/prayers`. The local
subset implementation remains exercised by the self-contained example.

## Release

Set the version in `pyproject.toml`, then publish to PyPI as `pray-core`
(`pray` is already taken there). From the monorepo root:

```sh
make release-py-dry-run
make release-py
```

Or from this directory: `make release` / `make release DRY_RUN=1`. The release
script reads the version from `pyproject.toml` when `VERSION` is omitted. It
creates a temporary virtualenv with `build` and `twine`, runs every local gate,
and validates metadata before upload. Credentials stay in Twine's helper or
environment.
