Name | promptix JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | A simple library for managing and using prompts locally with Promptix Studio |
upload_time | 2025-01-21 18:44:30 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
prompt
management
llm
ai
studio
templates
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Promptix
[](https://badge.fury.io/py/promptix)
[](https://opensource.org/licenses/MIT)
[](https://pypi.org/project/promptix/)
A Python library for managing and using prompts with Promptix Studio integration. Promptix makes it easy to manage, version, and use prompts in your applications with a built-in web interface.
## Features
- 🎯 **Built-in Promptix Studio** - Visual prompt management interface (access via `promptix studio`)
- 🔄 **Version Control** - Track changes with live/draft states for each prompt
- 🔌 **Simple Integration** - Easy-to-use Python interface
- 📝 **Variable Substitution** - Dynamic prompts using `{{variable_name}}` syntax
- 🏃 **Local First** - No external API dependencies
- 🎨 **Web Interface** - Edit and manage prompts through a modern UI
## Installation
```bash
# Install from PyPI
pip install promptix
```
## Quick Start
1. Launch Promptix Studio to manage your prompts:
```bash
promptix studio
```
This opens Promptix Studio in your default browser at `localhost:8501`.
2. Use prompts in your code:
```python
from promptix import Promptix
# Simple prompt with variables
prompt = Promptix.get_prompt(
prompt_template="Greeting",
user_name="John Doe"
)
print(prompt) # Output: Hello John Doe! How can I help you today?
# Advanced prompt with multiple variables
support_prompt = Promptix.get_prompt(
prompt_template="CustomerSupport",
user_name="Jane Smith",
issue_type="password reset",
technical_level="intermediate",
interaction_history="2 previous tickets about 2FA setup"
)
```
## Advanced Usage
### Version Control
```python
# Get specific version of a prompt
prompt_v1 = Promptix.get_prompt(
prompt_template="CustomerSupport",
version="v1",
user_name="John"
)
# Get latest live version (default behavior)
prompt_latest = Promptix.get_prompt(
prompt_template="CustomerSupport",
user_name="John"
)
```
### Error Handling
```python
try:
prompt = Promptix.get_prompt(
prompt_template="NonExistentTemplate",
user_name="John"
)
except ValueError as e:
print(f"Error: {str(e)}")
```
## Development
### Setup
1. Clone the repository:
```bash
git clone https://github.com/promptix/promptix-python.git
cd promptix-python
```
2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install development dependencies:
```bash
pip install -e ".[dev]"
```
### Running Tests
```bash
pytest
```
### Code Style
We use `black` for code formatting and `isort` for import sorting:
```bash
black .
isort .
```
## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "promptix",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "prompt, management, llm, ai, studio, templates",
"author": null,
"author_email": "Promptix Contributors <contact@promptix.io>",
"download_url": "https://files.pythonhosted.org/packages/28/40/5230639e9bfbf6c9c4daaf6700936c8cdedddf610037faea771d5a77a242/promptix-0.1.2.tar.gz",
"platform": null,
"description": "# Promptix\n\n[](https://badge.fury.io/py/promptix)\n[](https://opensource.org/licenses/MIT)\n[](https://pypi.org/project/promptix/)\n\nA Python library for managing and using prompts with Promptix Studio integration. Promptix makes it easy to manage, version, and use prompts in your applications with a built-in web interface.\n\n## Features\n\n- \ud83c\udfaf **Built-in Promptix Studio** - Visual prompt management interface (access via `promptix studio`)\n- \ud83d\udd04 **Version Control** - Track changes with live/draft states for each prompt\n- \ud83d\udd0c **Simple Integration** - Easy-to-use Python interface\n- \ud83d\udcdd **Variable Substitution** - Dynamic prompts using `{{variable_name}}` syntax\n- \ud83c\udfc3 **Local First** - No external API dependencies\n- \ud83c\udfa8 **Web Interface** - Edit and manage prompts through a modern UI\n\n## Installation\n\n```bash\n# Install from PyPI\npip install promptix\n```\n\n## Quick Start\n\n1. Launch Promptix Studio to manage your prompts:\n\n```bash\npromptix studio\n```\n\nThis opens Promptix Studio in your default browser at `localhost:8501`.\n\n2. Use prompts in your code:\n\n```python\nfrom promptix import Promptix\n\n# Simple prompt with variables\nprompt = Promptix.get_prompt(\n prompt_template=\"Greeting\",\n user_name=\"John Doe\"\n)\nprint(prompt) # Output: Hello John Doe! How can I help you today?\n\n# Advanced prompt with multiple variables\nsupport_prompt = Promptix.get_prompt(\n prompt_template=\"CustomerSupport\",\n user_name=\"Jane Smith\",\n issue_type=\"password reset\",\n technical_level=\"intermediate\",\n interaction_history=\"2 previous tickets about 2FA setup\"\n)\n```\n\n## Advanced Usage\n\n### Version Control\n\n```python\n# Get specific version of a prompt\nprompt_v1 = Promptix.get_prompt(\n prompt_template=\"CustomerSupport\",\n version=\"v1\",\n user_name=\"John\"\n)\n\n# Get latest live version (default behavior)\nprompt_latest = Promptix.get_prompt(\n prompt_template=\"CustomerSupport\",\n user_name=\"John\"\n)\n```\n\n### Error Handling\n\n```python\ntry:\n prompt = Promptix.get_prompt(\n prompt_template=\"NonExistentTemplate\",\n user_name=\"John\"\n )\nexcept ValueError as e:\n print(f\"Error: {str(e)}\")\n```\n\n## Development\n\n### Setup\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/promptix/promptix-python.git\ncd promptix-python\n```\n\n2. Create a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate # On Windows: venv\\Scripts\\activate\n```\n\n3. Install development dependencies:\n```bash\npip install -e \".[dev]\"\n```\n\n### Running Tests\n\n```bash\npytest\n```\n\n### Code Style\n\nWe use `black` for code formatting and `isort` for import sorting:\n\n```bash\nblack .\nisort .\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. \n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple library for managing and using prompts locally with Promptix Studio",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"prompt",
" management",
" llm",
" ai",
" studio",
" templates"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "728d33c59e3be2614ffaf7333340e3bbb5788621f6b440b3c75fea112b9a3278",
"md5": "106c37829e5b782ac9458918455467c4",
"sha256": "fc96f86c8909018aaa83d01f8295036c35c60450d57dbcea437944c005d2815c"
},
"downloads": -1,
"filename": "promptix-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "106c37829e5b782ac9458918455467c4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 18889,
"upload_time": "2025-01-21T18:44:29",
"upload_time_iso_8601": "2025-01-21T18:44:29.727813Z",
"url": "https://files.pythonhosted.org/packages/72/8d/33c59e3be2614ffaf7333340e3bbb5788621f6b440b3c75fea112b9a3278/promptix-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "28405230639e9bfbf6c9c4daaf6700936c8cdedddf610037faea771d5a77a242",
"md5": "b827a9357cecebe82a609f6e8eaded3e",
"sha256": "8676a01ce8a96a83465b1cedaa1c3f4e812c83ea6ed549070fcb2e3c19968a9d"
},
"downloads": -1,
"filename": "promptix-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "b827a9357cecebe82a609f6e8eaded3e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 17417,
"upload_time": "2025-01-21T18:44:30",
"upload_time_iso_8601": "2025-01-21T18:44:30.911075Z",
"url": "https://files.pythonhosted.org/packages/28/40/5230639e9bfbf6c9c4daaf6700936c8cdedddf610037faea771d5a77a242/promptix-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-21 18:44:30",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "promptix"
}