An SDK for managing prompts via github
Project description
Manage prompts via github
Usage
from promptSDK import prompts
print(prompts.my_folder.myprompt)
# this expects a repo with repo/my_folder/myprompt.md
When your code accesses a prompt it fetches that file from your prompt repo. This allows iterating on prompts while your server is running. Prompts are cached, so the SDK does not fetch from the web everytime you accesss a prompt. The default cache lifetime is 10 seconds for dev and 300 for production
Install
pip install promptSDK
Setup
Information on how to generate a token can be found here
If your prompt repo is public just leave the token empty. Required env variables (see env.sample) are
BASE_URL=https://github.com/username/repo
TOKEN=your_github_personal_access_token
Limitations
Currently only supports reading .md files in the prompt repo
Example Prompt Repo
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
promptsdk-0.1.3.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for promptsdk-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | caa93b70e436c1ce214fe60f5bf9f37910742a548859483eb9b919eaae29a83e |
|
MD5 | 757d056939363a96855e65dac1b41499 |
|
BLAKE2b-256 | 2b1b1562cc7204fa9ce211e7a341a4e80bd19c4ff9a1c7776048df5f289b18d5 |