yapl-py


Nameyapl-py JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPython port of YAPL (Yet Another Prompt Language) renderer.
upload_time2025-08-19 18:35:59
maintainerNone
docs_urlNone
authorYAPL Authors
requires_python>=3.8
licenseNone
keywords yapl prompt templating llm renderer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # yapl-py

Python port of YAPL (Yet Another Prompt Language) renderer.

## Installation

- From PyPI (once published):
  pip install yapl-py

- From source (editable):
  pip install -e .

## Usage

See tests in `tests/` for examples of loading and rendering templates programmatically.

Basic example:

```python
from yapl_py import YAPL, YAPLOptions, WhitespaceOptions

yapl = YAPL(YAPLOptions(
    baseDir="/path/to/prompts",
    strictPaths=True,
    whitespace=WhitespaceOptions(trimBlocks=True, lstripBlocks=True, dedentBlocks=True),
))

prompt = yapl.render("prompts/examples/conditional-agent.md.yapl", {
    "user_type": "expert",
    "domain": "TypeScript",
    "include_examples": True,
})
print(prompt.content)
```

## Development

- Run tests:
  pytest -q

- Build the package locally:
  python -m pip install build
  python -m build

Artifacts will be generated under `dist/`.

## Releasing to PyPI

This repository includes a GitHub Actions workflow at `.github/workflows/publish.yml` that builds and publishes the package to PyPI when you push a Git tag that starts with `v` (for example, `v0.1.0`).

Steps:
1) Create a PyPI API token (User settings -> API tokens) with project-wide or scoped permissions.
2) In your GitHub repository settings, add a repository secret named `PYPI_API_TOKEN` and paste the token value.
3) Create and push a tag:
   git tag v0.1.0
   git push origin v0.1.0

The workflow will:
- Check out the repository
- Build sdist and wheel
- Publish to PyPI using `pypa/gh-action-pypi-publish`

## License

Specify your license here, e.g. MIT.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "yapl-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "yapl, prompt, templating, llm, renderer",
    "author": "YAPL Authors",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c1/81/36e9fc5282b50e2a73b518d2c4ba4342c22234fc73e52701380d7bb2a4f4/yapl_py-0.1.0.tar.gz",
    "platform": null,
    "description": "# yapl-py\n\nPython port of YAPL (Yet Another Prompt Language) renderer.\n\n## Installation\n\n- From PyPI (once published):\n  pip install yapl-py\n\n- From source (editable):\n  pip install -e .\n\n## Usage\n\nSee tests in `tests/` for examples of loading and rendering templates programmatically.\n\nBasic example:\n\n```python\nfrom yapl_py import YAPL, YAPLOptions, WhitespaceOptions\n\nyapl = YAPL(YAPLOptions(\n    baseDir=\"/path/to/prompts\",\n    strictPaths=True,\n    whitespace=WhitespaceOptions(trimBlocks=True, lstripBlocks=True, dedentBlocks=True),\n))\n\nprompt = yapl.render(\"prompts/examples/conditional-agent.md.yapl\", {\n    \"user_type\": \"expert\",\n    \"domain\": \"TypeScript\",\n    \"include_examples\": True,\n})\nprint(prompt.content)\n```\n\n## Development\n\n- Run tests:\n  pytest -q\n\n- Build the package locally:\n  python -m pip install build\n  python -m build\n\nArtifacts will be generated under `dist/`.\n\n## Releasing to PyPI\n\nThis repository includes a GitHub Actions workflow at `.github/workflows/publish.yml` that builds and publishes the package to PyPI when you push a Git tag that starts with `v` (for example, `v0.1.0`).\n\nSteps:\n1) Create a PyPI API token (User settings -> API tokens) with project-wide or scoped permissions.\n2) In your GitHub repository settings, add a repository secret named `PYPI_API_TOKEN` and paste the token value.\n3) Create and push a tag:\n   git tag v0.1.0\n   git push origin v0.1.0\n\nThe workflow will:\n- Check out the repository\n- Build sdist and wheel\n- Publish to PyPI using `pypa/gh-action-pypi-publish`\n\n## License\n\nSpecify your license here, e.g. MIT.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python port of YAPL (Yet Another Prompt Language) renderer.",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "yapl",
        " prompt",
        " templating",
        " llm",
        " renderer"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "41fcb057f1929c9cced941e02716b750f5a429ba53b72d847b9db0d3fbcbbaff",
                "md5": "8a198f3c2047ab1250682d90f9c2b9f4",
                "sha256": "ca83b8d0717329f4659198cbc740b72fdf7a4374474243fd557767cd0a8ceb94"
            },
            "downloads": -1,
            "filename": "yapl_py-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a198f3c2047ab1250682d90f9c2b9f4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11085,
            "upload_time": "2025-08-19T18:35:58",
            "upload_time_iso_8601": "2025-08-19T18:35:58.424652Z",
            "url": "https://files.pythonhosted.org/packages/41/fc/b057f1929c9cced941e02716b750f5a429ba53b72d847b9db0d3fbcbbaff/yapl_py-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c18136e9fc5282b50e2a73b518d2c4ba4342c22234fc73e52701380d7bb2a4f4",
                "md5": "625c50ed13c16cb285f4ee5c68d297a4",
                "sha256": "d7b52223fb82374748a9bfcf15d0bc889f030f46028a35f186afb3ba7e43d4d4"
            },
            "downloads": -1,
            "filename": "yapl_py-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "625c50ed13c16cb285f4ee5c68d297a4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11352,
            "upload_time": "2025-08-19T18:35:59",
            "upload_time_iso_8601": "2025-08-19T18:35:59.471132Z",
            "url": "https://files.pythonhosted.org/packages/c1/81/36e9fc5282b50e2a73b518d2c4ba4342c22234fc73e52701380d7bb2a4f4/yapl_py-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-19 18:35:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "yapl-py"
}
        
Elapsed time: 2.01124s