codeprompt
ultils for prompt engineers e.g. chucking
install
pip install codeprompt
$ codeprompt
Open VSCode and Copy the paths (Shift + Alt + C) of the files you want to include in the prompt.
Press Enter to continue.
read 1 files
total number of tokens: 917
Press Enter to continue (Y, n) [Y/n]:
What do you waht to ask ChatGPT? [Explain this to me.]:
Prompt is ready to be copied to clipboard.
Chunk 1/1 is copied to clipboard.
You act as my tech lead in understanding and working with a Git repository represented as text.
The repository's purpose is to provide context for various software development-related instructions.
The repository structure consists of sections that begin with "----", followed by a single line containing
the file path and file name, followed by a variable amount of lines containing the file contents. The text
representing the repository ends when the symbols "--END--" are encountered. Meanwhile,
Reply with "Aha" to allow me continue providing more context.
Any further text beyond "--END--" should be interpreted as instructions using the aforementioned code as
context. Instructions may include questions, requests to refactor, debug, find vulnerabilities, or make the
code more robust. The programming language can be determined from the file extension in the file path.
----
codeprompt\template.py
\`\`\`
import os
from pathlib import Path
from loguru import logger
import pyperclip
import frontmatter
from jinja2 import Environment, FileSystemLoader, Template, TemplateNotFound, meta
def paste_from_clipboard():
value = pyperclip.paste()
return value
class TemplateManager:
"""
Manage templates.
"""
def __init__(self, template_dirs: list[Path]):
self.log = logger
self.template_dirs = template_dirs
self.templates = []
self.templates_env = None
def template_builtin_variables(self):
return {
"clipboard": paste_from_clipboard,
}
\`\`\`
--END--
create add docstring to the function
resources
Metadata
Release files for codeprompt 0.2.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 | |
|---|---|---|---|---|
| codeprompt-0.2.0.tar.gz | 6.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codeprompt-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 kB
Release files / codeprompt-0.2.0.tar.gz
| Download URL | codeprompt-0.2.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fb7b65688fe473e84cb88fc98d898888d5a4b4fbc85a15113c93ad6218b81eb
|
|
BLAKE2b-256 checksum How to use checksums |
3ad9da03d19783eb261c594fad870f7c46fac8b46d66631bc8fdabaacbc9c2ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.1 CPython/3.9.12 Windows/10
|
Release files / codeprompt-0.2.0-py3-none-any.whl
| Download URL | codeprompt-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9372502007a3c68e4d2ba21f95646e894265ae243d2d0302c17be038cecf634
|
|
BLAKE2b-256 checksum How to use checksums |
6a3d9cd77437fcaefd2fc0d222394050ed9d074618331b68ea49e1e6016eab08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.1 CPython/3.9.12 Windows/10
|
Security for codeprompt 0.2.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.