Skip to main content

Add your description here

Project description

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

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

close_enough-0.1.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

close_enough-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file close_enough-0.1.1.tar.gz.

File metadata

  • Download URL: close_enough-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for close_enough-0.1.1.tar.gz
Algorithm Hash digest
SHA256 69fedc22f74cb908ae4da66bd35b670d8463fe2bceb41a8078e563688ac8c8fb
MD5 3dd909581f1896ed46f201ba9cadf07d
BLAKE2b-256 15d8f44d3325b9c5c1f92d5f78ca8ab84e5de491a247d408e9c8c2add58c5675

See more details on using hashes here.

File details

Details for the file close_enough-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: close_enough-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for close_enough-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2f658689d4513af7b687a4612d93e9cfa8243b82eaccfd35002554a13801bc4
MD5 bb3acae65b4f44f8bf008b917b6cd3c3
BLAKE2b-256 3367d209dfcfc8b5a455509b8a826c00cdb20bff61e91905d488c41bd4a0a42b

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