close_enough
A cursed Python decorator that generates function implementations using LLMs.
Installation
uv add close_enough
Usage
import close_enough
@close_enough
def calculate_fibonacci(n: int) -> int:
"""Calculate the nth Fibonacci number."""
...
result = calculate_fibonacci(10) # 55
The decorator generates a function implementation based on the signature and docstring. The implementation is generated from a LLM's output lazily on first call and cached for subsequent calls.
Do not use in production code.
Configuration
The default model is github_copilot/gpt-4. To use a different model:
import close_enough
close_enough.MODEL_NAME = "your-model-name"
License
MIT
Release files for close-enough 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| close_enough-0.1.1.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| close_enough-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / close_enough-0.1.1.tar.gz
| Download URL | close_enough-0.1.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69fedc22f74cb908ae4da66bd35b670d8463fe2bceb41a8078e563688ac8c8fb
|
|
BLAKE2b-256 checksum How to use checksums |
15d8f44d3325b9c5c1f92d5f78ca8ab84e5de491a247d408e9c8c2add58c5675
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / close_enough-0.1.1-py3-none-any.whl
| Download URL | close_enough-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2f658689d4513af7b687a4612d93e9cfa8243b82eaccfd35002554a13801bc4
|
|
BLAKE2b-256 checksum How to use checksums |
3367d209dfcfc8b5a455509b8a826c00cdb20bff61e91905d488c41bd4a0a42b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|