magicfunc
magicfunc is a Python library that uses LLM to generate function bodies for function signatures and dynamically proxies them at runtime.
Installation
You can install magicfunc using pip:
pip install magicfunc
Usage
To use magicfunc, you need to define a function signature and pass it to the magicfunc.magic decorator. magicfunc will then generate a function body using LLM and dynamically proxy it at runtime.
import magicfunc
@magicfunc.magic
def add(x: int, y: int) -> int:
"""
Add two integers together.
"""
You can then call the function as you would any other function:
result = add(2, 3)
print(result) # Output: 5
magicfunc will generate a function body that adds the two integers together and returns the result.
Configuration
magicfunc can be configured using these variables:
DEFAULT_PROVIDER: The default provider for generate function body.
Contributing
If you find a bug or have a feature request, please open an issue on GitHub. If you would like to contribute code, please fork the repository and submit a pull request.
License
magicfunc is licensed under the MIT License. See the LICENSE file for more information.
Metadata
Release files for magicfunc 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| magicfunc-1.0.1.tar.gz | 4.1 kB | Without provenance | Details for magicfunc-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magicfunc-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for magicfunc-1.0.1-py3-none-any.whl |
Total release size: 9.1 kB
Release files / magicfunc-1.0.1.tar.gz
| Download URL | magicfunc-1.0.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3a715b3ba7662f2ef343be79a3d7b5fbeb5d3a37573789ad65e8df80d45f091
|
|
BLAKE2b-256 checksum How to use checksums |
b6342bab803ad4c350817178ba93fc93c849293861e9201b8fad11f2c12c3664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.8 Windows/10
|
Release files / magicfunc-1.0.1-py3-none-any.whl
| Download URL | magicfunc-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47c0fa1ff79b9c2033b5c5f134545fae11c61e360f140bc00c2fcdea9a8f1392
|
|
BLAKE2b-256 checksum How to use checksums |
66a4536601d5d8cb7d89a15269a1ad9192ae681102eb221538c4e8ad417baa89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.8 Windows/10
|
Security for magicfunc 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.