Skip to main content

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:
    • functions
    • display
    • colors
    • shapes
    • orientation
  • 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

![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.1-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.02-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-2.0h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)

- 🤖 **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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repatch-0.1.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

repatch-0.1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for repatch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1d34a9642b92edbef6d2e80b801c9020a0f7f46bfd523e37cbac83fccee786d0
MD5 eea186962392eefd3a7849260cf22ade
BLAKE2b-256 011fabe3e55ac4cf9da1a404c36e3f6b9f196ab559bb7de4cace38dfec746152

See more details on using hashes here.

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

Hashes for repatch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e250504efe972b7c0320709c30306aa31d73a984ae0e0d36f9b830df47f2c722
MD5 1e94f565d9a289defa25678af7471529
BLAKE2b-256 a38b730443b49be987b70b62bfaf98670187d0a2563534f992e5aacedc79cf1f

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