Skip to main content

Vibe your Python functions just for fun

Project description

vibefunc 💤

Vibefunc is a Python decorator that lets you write only the function signature & docstring. When you call the function, it automatically asks an AI to fill in the body — and then runs it.


💻 Installation

pip install lazyfunc

🎮 Usage

Set your OpenAI API key as an environment variable:

export OPENAI_API_KEY=your_openai_api_key

Then, you can use the vibefunc decorator to create functions that will be filled in by AI:

from vibefunc import vibefunc

@vibefunc()
def sort(a: list):
    """Sort the list in ascending order and print the sorted list."""
    ...

sort([1, 222, 3333, 4, 45634, 1314235, 233])

Result:

[1, 4, 222, 3333, 45634, 1314235]

⚠️ Warnings

  • Don’t run this in production unless you like surprises (and bugs).

Happy(Damn) vibing! ✨

vibe_coding

Parameters

  • model: The OpenAI model to use (default: "gpt-4.1-mini").
  • base_url: The base URL for the OpenAI SDK (default: "https://api.openai.com/v1").
  • save_money: If True, stores the same function body in a file instead of calling the OpenAI API (default: True).
  • mode: serious or chaotic, just for fun (default: serious).

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

vibefunc-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

vibefunc-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file vibefunc-0.1.0.tar.gz.

File metadata

  • Download URL: vibefunc-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.5

File hashes

Hashes for vibefunc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 35d27cb12621a5c469fbc07098768c109ba77067c9506a89e083f324e6bccd70
MD5 5b2c3274cd6108a073f4073d5bab0dd3
BLAKE2b-256 45fa4336f738e1c9ab0c80a1bbc2f63e0c2577196134813a7acabaaba9858d79

See more details on using hashes here.

File details

Details for the file vibefunc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vibefunc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.5

File hashes

Hashes for vibefunc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac9b44df806e2dc560f0c6f348f1a98458f939f5220715d2476881ead0b909f7
MD5 12709b8ead717acecad00b3537ec7caf
BLAKE2b-256 c54631c2c5a419178df90ce501628aaeb9d759e048436b05ef9bd2187609fd46

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