Skip to main content

Prompt engineering framework for humans

Project description

Promplate

</Promplate/> = <template> // prompt

Promplate is a prompting framework focusing on developing experience. However, it can also be a super-convenient SDK for simple LLM calls. Promplate progressively enhance your prompting workflow. And it values flexibility as well as perfect conventions. Try online

Installation

pip install promplate

Promplate supports both CPython and PyPy, from 3.8 to 3.12. It even supports running in browsers through wasm implementations of python.

Documentation

You can visit our official docs site at docs.py.promplate.dev.

IDE Support 🌹

Promplate is fully typed, which means static type checker will find bugs correctly (if you use pyright for type checking).

We recommend using VS Code as your IDE when coding with promplate, because it natively uses pyright.

The language design of promplate is similar to Jinja2. So you can use the .j2 file extension for template files for syntax highlight.

Development

  • use poetry to manage dependencies.
  • use isort to sort import statements.
  • use black to format code.
  • use pyright to check type annotations.

Development should be done on dev branch, using >=3.10 language features. The master branch is used for py3.8 compatible releases.

Promplate is well tested with pytest. GitHub Actions are used to run tests and linting. And there are test results continually generated on Vercel(py3.9) and Netlify(py3.8). There is a coverage report too.

Future Features (or TODOs?)

  • more documentation
  • javascript implementation
  • improved error handling
    • display compiled code when error occurs through linecache or tempfile (default)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

promplate-0.3.4.7.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

promplate-0.3.4.7-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file promplate-0.3.4.7.tar.gz.

File metadata

  • Download URL: promplate-0.3.4.7.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for promplate-0.3.4.7.tar.gz
Algorithm Hash digest
SHA256 19e5e9f1228575fe6918ab170ca790550ec885be03345e782b0d683977ab6545
MD5 1bf84ef8c89821c82cab308ad330c45a
BLAKE2b-256 3d4513a68b5a7128286c6920d0d01f76adbc186e29dd478a8343fb0eb8ddddd0

See more details on using hashes here.

File details

Details for the file promplate-0.3.4.7-py3-none-any.whl.

File metadata

  • Download URL: promplate-0.3.4.7-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for promplate-0.3.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 955e824d70de3e987a4126bf99f587a485856f647e2dabc7d5e7906ba0c26db1
MD5 902f43ceea59e3583a2ae44f8021ad7a
BLAKE2b-256 f9f4ed18a0750d3a8eb2e3750d0c8ca44f1f5269c7085ba78811086f8a707d3f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page