Preact Codegen
Overview
Preact Codegen is a package that helps developers quickly set up Preact applications without needing a complex build configuration. Users can describe their application requirements in plain text, including desired routing and signal management features. The package processes this input to generate a structured, ready-to-use Preact application code snippet.
Key Features
- Generate Preact application code from user input in plain text
- Supports routing and signal management features
- Easy to integrate and expand
- Simple and fast setup
Installation
pip install preact_codegen
Usage
from preact_codegen import preact_codegen
user_input = "Describe your Preact application requirements here..."
api_key = "your_api_key_here" # Optional, if not provided, the default LLM7 will be used
response = preact_codegen(
user_input=user_input,
api_key=api_key,
)
print(response)
Parameters
user_input: The user input text to process (type:str)llm: ThelangchainLLM instance to use (optional, type:Optional[BaseChatModel]), defaults toChatLLM7fromlangchain_llm7api_key: The API key for LLM7 (optional, type:Optional[str]), defaults toos.getenv("LLM7_API_KEY")orNone
Notes
-
The package uses
ChatLLM7fromlangchain_llm7by default. You can safely pass your own LLM instance (based onlangchain) if you want to use another LLM.Example for
ChatOpenAI:from langchain_openai import ChatOpenAI from preact_codegen import preact_codegen llm = ChatOpenAI() response = preact_codegen( user_input=user_input, llm=llm, )
Example for
ChatAnthropic:from langchain_anthropic import ChatAnthropic from preact_codegen import preact_codegen llm = ChatAnthropic() response = preact_codegen( user_input=user_input, llm=llm, )
Example for
ChatGoogleGenerativeAI:from langchain_google_genai import ChatGoogleGenerativeAI from preact_codegen import preact_codegen llm = ChatGoogleGenerativeAI() response = preact_codegen( user_input=user_input, llm=llm, )
-
The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you want higher rate limits for LLM7, you can pass your own
API_KEYvia environment variableLLM7_API_KEYor directly likepreact_codegen(api_key="your_api_key"). -
You can get a free API key by registering at LLM7.
Links
- GitHub issues: GitHub Issues
- Author name: Eugene Evstafev
- Author email: hi@euegne.plus
Metadata
Release files for preact-codegen 2025.12.21144856
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 |
|---|---|---|---|---|
| preact_codegen-2025.12.21144856.tar.gz | 5.2 kB | Without provenance | Details for preact_codegen-2025.12.21144856.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| preact_codegen-2025.12.21144856-py3-none-any.whl | Python 3 | none | any | Details for preact_codegen-2025.12.21144856-py3-none-any.whl |
Total release size: 10.9 kB
Release files / preact_codegen-2025.12.21144856.tar.gz
| Download URL | preact_codegen-2025.12.21144856.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18d44733c275d3ebb72209cbd8495900c58a174b777dd8f1de899eed53c89523
|
|
BLAKE2b-256 checksum How to use checksums |
47a645b3994c46bfd479e467df3b8db71f74f1eed414b8aba12a46107ed6f2d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / preact_codegen-2025.12.21144856-py3-none-any.whl
| Download URL | preact_codegen-2025.12.21144856-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbdd73867ab1fc27925b8c0520e3612c8c2014f50b43edd77d3a4712d2399f52
|
|
BLAKE2b-256 checksum How to use checksums |
ffcd8fe12ea221e88a9c85cca610bba8ca07da1ec6a11dec239d0d3b112c0d9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for preact-codegen 2025.12.21144856
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.