TBD.
Project description
Snakelang
Snakelang is a Python module that uses OpenAI's GPT-4 model to automatically generate Python code based on natural language descriptions of the desired functionality.
Installation
The easiest way to install Snakelang is through pip:
python3 -m pip install snakelang
Usage
To use Snakelang, you will need to import the snakelang
module and use the @snakelang.spec
decorator to specify the desired functionality. Here is an example usage:
import snakelang
@snakelang.spec("Compute the nth number in the Fibonacci series.")
def myfib(n: int) -> int:
""
This code will generate a Python function named myfib
that computes the nth number in the Fibonacci series.
To actually execute the function, you can call it as you would any other Python function:
for i in range(20):
print(myfib(i))
Snakelang caches the results of translating natural language to Python, so subsequent executions in the same directory will run much faster.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file snakelang-0.0.3.tar.gz
.
File metadata
- Download URL: snakelang-0.0.3.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f0f16f4f03b0d61db7cb28e1befff02eb94b7ca803954ab0696cca1b87e02c |
|
MD5 | 0ebfcb43ad1c9454d16e6a3710e25248 |
|
BLAKE2b-256 | 375754920437f40fcc16e3518e900a205a41f04939f82390a24cc65ff2edd15c |
File details
Details for the file snakelang-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: snakelang-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c1bdd349c80a2b6bab81779b37aa309b14f41e76b1049694ea93d4ae58a4f54 |
|
MD5 | 59f7ab00ccfbe8cdfa5e2dad3cb2e820 |
|
BLAKE2b-256 | eaf63f163affa7b15739665d40a1ad121e5647e4f982f658ddec951f4dc1da44 |