Name | prompttest JSON |
Version |
0.2.1
JSON |
| download |
home_page | None |
Summary | pytest for LLMs |
upload_time | 2025-08-23 18:52:51 |
maintainer | None |
docs_url | None |
author | Decoding Chris |
requires_python | >=3.11 |
license | MIT License
Copyright (c) 2025 Decoding Chris
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
llm
ai
testing
pytest
prompt
automation
pypi
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# prompttest
[](https://github.com/decodingchris/prompttest/actions)
[](https://pypi.org/project/prompttest/)
[](https://pypi.org/project/prompttest/)
[](https://pypi.org/project/prompttest/)
[](https://github.com/decodingchris/prompttest/blob/main/LICENSE)
pytest for LLMs.
You wouldn't ship code without tests. โ๐ฎ๐ค
Hold your prompts to the same standard. ๐๐๐ฅ

## Features
- **๐ค Test in Plain English:** Write your tests in English, and let an AI grade the response.
- **๐ Write Tests Faster:** Just list your inputs and criteria in a simple fileโno code needed.
- **๐ Avoid Vendor Lock-in:** Test against any LLM with a single, free OpenRouter API key.
## Quick Start
### 1. Install prompttest
```bash
pip install prompttest
```
### 2. Set up prompttest
```bash
prompttest init
```
### 3. Run your tests
```bash
prompttest
```
## How It Works
prompttest is built around 2 types of files:
### Prompt
A `.txt` file for your prompt template with `---[SECTIONS]---` and `{variables}`.
Example: `prompts/customer_service.txt`
```txt
---[SYSTEM]---
You are an expert on the "{product_name}".
Your responses must be helpful and polite.
---[USER]---
Customer tier: {user_tier}
Customer query: {user_query}
```
### Test
A `.yml` file for test cases with `config`, `inputs` and `criteria`.
Example: `prompttests/test_customer_service.yml`
```yaml
config:
prompt: customer_service
tests:
- id: check-simple-greeting
inputs:
product_name: "Chrono-Watch"
user_tier: "Standard"
user_query: "Hello"
criteria: "The response must be a simple, polite greeting."
```
## Advanced Usage
### Run all tests in a folder
```bash
prompttest run folder_name/
```
### Run all tests in a file
```bash
prompttest run file_name.yml
```
### Run specific test
```bash
prompttest run test_id
```
## Contributing
We're building the pytest for LLMsโand we need your help.
Report a bug, propose a feature, or contribute a single line.
Help shape a foundational tool for AI development.
## License
This project is licensed under the MIT License.
Raw data
{
"_id": null,
"home_page": null,
"name": "prompttest",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "llm, ai, testing, pytest, prompt, automation, pypi",
"author": "Decoding Chris",
"author_email": "Decoding Chris <decodingchris@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/a6/c6/17f0c4099573ee90a8c4558357c885d6a3371c65a4e8fdd4fad6895033ca/prompttest-0.2.1.tar.gz",
"platform": null,
"description": "# prompttest\n\n[](https://github.com/decodingchris/prompttest/actions)\n[](https://pypi.org/project/prompttest/)\n[](https://pypi.org/project/prompttest/)\n[](https://pypi.org/project/prompttest/)\n[](https://github.com/decodingchris/prompttest/blob/main/LICENSE)\n\npytest for LLMs.\n\nYou wouldn't ship code without tests. \u270b\ud83d\ude2e\ud83e\udd1a\n\nHold your prompts to the same standard. \ud83d\ude0e\ud83d\udc4c\ud83d\udd25\n\n\n\n## Features\n\n- **\ud83d\udd24 Test in Plain English:** Write your tests in English, and let an AI grade the response.\n\n- **\ud83d\ude80 Write Tests Faster:** Just list your inputs and criteria in a simple file\u2014no code needed.\n\n- **\ud83d\udd13 Avoid Vendor Lock-in:** Test against any LLM with a single, free OpenRouter API key.\n\n## Quick Start\n\n### 1. Install prompttest\n\n```bash\npip install prompttest\n```\n\n### 2. Set up prompttest\n\n```bash\nprompttest init\n```\n\n### 3. Run your tests\n\n```bash\nprompttest\n```\n\n## How It Works\n\nprompttest is built around 2 types of files:\n\n### Prompt\n\nA `.txt` file for your prompt template with `---[SECTIONS]---` and `{variables}`.\n\nExample: `prompts/customer_service.txt`\n\n```txt\n---[SYSTEM]---\nYou are an expert on the \"{product_name}\".\nYour responses must be helpful and polite.\n\n---[USER]---\nCustomer tier: {user_tier}\nCustomer query: {user_query}\n```\n\n### Test\n\nA `.yml` file for test cases with `config`, `inputs` and `criteria`.\n\nExample: `prompttests/test_customer_service.yml`\n\n```yaml\nconfig:\n prompt: customer_service\n\ntests:\n - id: check-simple-greeting\n inputs:\n product_name: \"Chrono-Watch\"\n user_tier: \"Standard\"\n user_query: \"Hello\"\n criteria: \"The response must be a simple, polite greeting.\"\n```\n\n## Advanced Usage\n\n### Run all tests in a folder\n\n```bash\nprompttest run folder_name/\n```\n\n### Run all tests in a file\n\n```bash\nprompttest run file_name.yml\n```\n\n### Run specific test\n\n```bash\nprompttest run test_id\n```\n\n## Contributing\n\nWe're building the pytest for LLMs\u2014and we need your help.\n\nReport a bug, propose a feature, or contribute a single line.\n\nHelp shape a foundational tool for AI development.\n\n## License\n\nThis project is licensed under the MIT License.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Decoding Chris\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "pytest for LLMs",
"version": "0.2.1",
"project_urls": {
"Repository": "https://github.com/decodingchris/prompttest"
},
"split_keywords": [
"llm",
" ai",
" testing",
" pytest",
" prompt",
" automation",
" pypi"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a33ff4bd3ad3f648b5635dd1e65d14563611bf23b0f329f9d25bb383b4a0f2dd",
"md5": "227c9830e508d1ef816707bce6a950c0",
"sha256": "54c7cec26135ec42b3c673b8fba13dc4d71fddce0dd0fcb9498baeb40a9627ca"
},
"downloads": -1,
"filename": "prompttest-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "227c9830e508d1ef816707bce6a950c0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 24644,
"upload_time": "2025-08-23T18:52:50",
"upload_time_iso_8601": "2025-08-23T18:52:50.302329Z",
"url": "https://files.pythonhosted.org/packages/a3/3f/f4bd3ad3f648b5635dd1e65d14563611bf23b0f329f9d25bb383b4a0f2dd/prompttest-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a6c617f0c4099573ee90a8c4558357c885d6a3371c65a4e8fdd4fad6895033ca",
"md5": "de82da426d192a386eefd5df31811c18",
"sha256": "43555181061683734a3363aff4352cdd3df2369e618dac50ef1b5238e7b7422d"
},
"downloads": -1,
"filename": "prompttest-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "de82da426d192a386eefd5df31811c18",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 19649,
"upload_time": "2025-08-23T18:52:51",
"upload_time_iso_8601": "2025-08-23T18:52:51.657245Z",
"url": "https://files.pythonhosted.org/packages/a6/c6/17f0c4099573ee90a8c4558357c885d6a3371c65a4e8fdd4fad6895033ca/prompttest-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-23 18:52:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "decodingchris",
"github_project": "prompttest",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "prompttest"
}