PromptLog
A version control tool for prompts, designed to help you manage, track, and compare different versions of your prompts.
Features
- Version Management: Create, save, and load different versions of prompts
- Version Comparison: Compare different versions of prompts to see changes
- Metadata Tracking: Record information about each version (timestamp, author, description, etc.)
- Local Storage: Store prompts and their versions locally on your file system
Installation
pip install promptlog
Usage
Basic Usage
from promptlog import PromptManager
# Initialize prompt manager
pm = PromptManager("my_prompt_project")
# Create and save a new prompt version
pm.save_prompt(
name="welcome_message",
content="Hello, welcome to our service!",
description="Initial welcome message",
author="John Doe"
)
# Update the prompt and save as a new version
pm.save_prompt(
name="welcome_message",
content="Hello, welcome to our improved service!",
description="Updated welcome message with improved wording",
author="John Doe"
)
# List all versions of a prompt
versions = pm.list_versions("welcome_message")
print(versions)
# Load a specific version
prompt_v1 = pm.load_version("welcome_message", version=1)
print(prompt_v1.content)
# Compare two versions
comparison = pm.compare_versions("welcome_message", version1=1, version2=2)
print(comparison)
Advanced Features
# Search prompts by metadata
prompts = pm.search_prompts(author="John Doe")
# Get prompt history
history = pm.get_prompt_history("welcome_message")
# Delete a specific version
pm.delete_version("welcome_message", version=1)
# Delete all versions of a prompt
pm.delete_prompt("welcome_message")
API Reference
PromptManager
__init__(project_name, storage_path=None): Initialize the prompt managersave_prompt(name, content, description="", author="", tags=None): Save a new prompt versionlist_versions(name): List all versions of a promptload_version(name, version): Load a specific version of a promptcompare_versions(name, version1, version2): Compare two versions of a promptsearch_prompts(**kwargs): Search prompts by metadataget_prompt_history(name): Get the full history of a promptdelete_version(name, version): Delete a specific versiondelete_prompt(name): Delete all versions of a prompt
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for promptlog 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| promptlog-0.1.0.tar.gz | 11.0 kB | Without provenance | Details for promptlog-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| promptlog-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for promptlog-0.1.0-py3-none-any.whl |
Total release size: 18.3 kB
Release files / promptlog-0.1.0.tar.gz
| Download URL | promptlog-0.1.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a18cbf3c45a1684e02da9ec8e88aedc4731a47846b6f7b78aabbc66e81b4e9c8
|
|
BLAKE2b-256 checksum How to use checksums |
e5b038b81038e4f38b8c1264ab7c454583ec79639d3a1a826611f215bbe52ebb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Release files / promptlog-0.1.0-py3-none-any.whl
| Download URL | promptlog-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bb443caf3cf53d2cd357de435dcb87a9d809797a59126f814c5bbd3530f363c
|
|
BLAKE2b-256 checksum How to use checksums |
4b88cac4b3e7fa0a01c75536df8c3674ba280fa0760115e032d34159e281ddae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Security for promptlog 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.