Skip to main content

auto_impl

Automatically implements functions using the llm toolkit.

Install

pip install auto_impl --upgrade

Usage

First install llm. Follow the instructions from the llm site to set it up. For example, use llm keys set openai to set up a ChatGPT API key and llm "Ten fun names for a pet pelican" to test it.

@auto

Usage:

@auto($prompt)
$function

where $prompt is a prompt string literal, and $function is the target function.

Example:

from auto_impl import auto


@auto("Return fizz if the number is divisible by 3, buzz if the number is divisible by 5, and fizzbuzz if the number is divisible by both 3 and 5.")
def fizzbuzz(n: int) -> str:
    pass


def test_fizzbuzz():
    assert fizzbuzz(3) == "fizz"
    assert fizzbuzz(5) == "buzz"
    assert fizzbuzz(15) == "fizzbuzz"
    assert fizzbuzz(1) == "1"


test_fizzbuzz() # Doesn't raise exceptions

Acknowledgement

License

auto_impl is released under the MIT license.

Metadata

Release files for auto-impl 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for auto-impl 0.1.3
File Size Uploaded
auto_impl-0.1.3.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for auto-impl 0.1.3
File Interpreter ABI Platform
auto_impl-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / auto_impl-0.1.3.tar.gz

Download URL auto_impl-0.1.3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6110f8d572e15bb7a27ad39d496004d1b5a58b7f91439b00ecd82368bdc5710d
BLAKE2b-256 checksum
How to use checksums
962f9659912064c875640264f9b32cd383166899956cd1f9bdcf261d414aaebe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.13

Release files / auto_impl-0.1.3-py3-none-any.whl

Download URL auto_impl-0.1.3-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43ce933679a08b78b71b5919108802c817ece678335a5623e6b77ffe81938783
BLAKE2b-256 checksum
How to use checksums
6aa84a99b62f650cf779c3dc1683ef43c76362aa276838cee907118ea9b6b013
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page