Skip to main content

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

https://github.com/ottozastrow/sample-prompts

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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

promptsdk-0.1.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file promptsdk-0.1.3.tar.gz.

File metadata

  • Download URL: promptsdk-0.1.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for promptsdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 794ae17afcb6bd0adc0273cf0d87db95e40e5983e3536191667e2ecba2f1edf4
MD5 50aa302360bfb53ddd412e9da72a0462
BLAKE2b-256 c07d6d52828c8ffe245697df8e699ac6a6db5ff61998ae806666e4530b77300c

See more details on using hashes here.

File details

Details for the file promptsdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: promptsdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for promptsdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 caa93b70e436c1ce214fe60f5bf9f37910742a548859483eb9b919eaae29a83e
MD5 757d056939363a96855e65dac1b41499
BLAKE2b-256 2b1b1562cc7204fa9ce211e7a341a4e80bd19c4ff9a1c7776048df5f289b18d5

See more details on using hashes here.

Supported by

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