Simple scope-based HTML/CSS/JS patch suggestion package using LiteLLM
Project description
repatch
First simple Python package for scope-based HTML/CSS/JS patch suggestions via LiteLLM.
Pierwsza, prosta wersja pakietu Python do generowania propozycji patchy fragmentów
HTML/CSS/JS na podstawie scope i odpowiedzi LLM przez litellm.
Zakres v0
- obsługa scope:
functionsdisplaycolorsshapesorientation
- wybór wielu scope naraz
- generowanie 3 wariantów odpowiedzi z LLM
- dla każdego wariantu: co zachować (
keep), co zmienić (change) i patchowany fragment (patched_fragment)
Instalacja (lokalnie)
pip install -e .
Szybkie użycie
from repatch import RepatchService
service = RepatchService(model="gpt-4o-mini")
fragment = """
<section>
<h1>Pracownia Malort Gdynia – przestrzeń dla kreatywności Twojego dziecka</h1>
<p>Zapraszamy do wyjątkowego miejsca...</p>
## AI Cost Tracking
   
  
- 🤖 **LLM usage:** $0.0228 (4 commits)
- 👤 **Human dev:** ~$200 (2.0h @ $100/h, 30min dedup)
Generated on 2026-06-01 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
---
<button>Zapisz dziecko</button>
</section>
"""
suggestions = service.generate_patch_suggestions(
fragment=fragment,
scopes=["display", "colors"],
)
for idx, item in enumerate(suggestions, start=1):
print(f"Wariant {idx}:")
print("KEEP:", item.keep)
print("CHANGE:", item.change)
print(item.patched_fragment)
License
Licensed under Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repatch-0.1.1.tar.gz.
File metadata
- Download URL: repatch-0.1.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d34a9642b92edbef6d2e80b801c9020a0f7f46bfd523e37cbac83fccee786d0
|
|
| MD5 |
eea186962392eefd3a7849260cf22ade
|
|
| BLAKE2b-256 |
011fabe3e55ac4cf9da1a404c36e3f6b9f196ab559bb7de4cace38dfec746152
|
File details
Details for the file repatch-0.1.1-py3-none-any.whl.
File metadata
- Download URL: repatch-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e250504efe972b7c0320709c30306aa31d73a984ae0e0d36f9b830df47f2c722
|
|
| MD5 |
1e94f565d9a289defa25678af7471529
|
|
| BLAKE2b-256 |
a38b730443b49be987b70b62bfaf98670187d0a2563534f992e5aacedc79cf1f
|