[PR #2782] Add func-to-web to Admin Panels section #2095

Open
opened 2025-11-06 13:29:22 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vinta/awesome-python/pull/2782
Author: @offerrall
Created: 10/26/2025
Status: 🔄 Open

Base: masterHead: add-functoweb


📝 Commits (1)

  • a1cdf60 Add func-to-web to Admin Panels section

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 README.md (+1 -0)

📄 Description

What is this Python project?

FuncToWeb turns Python functions into web forms with zero boilerplate.

Problem it solves: Data scientists, backend developers, and teams need quick internal tools and forms without learning frontend frameworks or writing repetitive FastAPI boilerplate.

Solution: Just add type hints to any function and get an automatic web UI:

def process_data(
    file: ImageFile,
    threshold: Annotated[int, Field(ge=0, le=100)],
    mode: Literal["fast", "accurate"]
):
    # Your logic here
    return result

run(process_data)  # That's it - instant web form

Use cases:

  • Internal tools (data processing, report generation)
  • Quick prototypes and demos
  • Script sharing with non-technical users
  • Admin panels without writing HTML/CSS/JS

Describe features:

  • Zero boilerplate - just type hints
  • All Python types supported (int, str, bool, date, time, files, lists)
  • Advanced validation with Pydantic Field
  • Combined constraints (validate both list size AND individual items)
  • Dynamic dropdowns with Literal[function]
  • File uploads (images, CSV, documents)
  • FastAPI-powered, production-ready

What's the difference between this Python project and similar ones?

vs Streamlit (33k stars):

  • Streamlit requires learning their API (st.text_input(), st.button())
  • FuncToWeb uses standard Python type hints - zero new syntax
  • Better for wrapping existing functions without modification

vs Gradio (30k stars):

  • Gradio needs explicit gr.Interface() configuration
  • FuncToWeb infers everything from type hints automatically
  • Lighter weight - fewer dependencies

vs Wooey:

  • Wooey uses argparse (outdated approach)
  • FuncToWeb uses modern Python type hints
  • Better validation with Pydantic Field constraints

Unique features:

  • OptionalEnabled/OptionalDisabled markers for optional field control
  • Dynamic Literal[function] for runtime-populated dropdowns
  • Combined constraints: validate both list size AND each item separately
    # 3-10 ratings, each rating must be 1-5
    ratings: Annotated[
        list[Annotated[int, Field(ge=1, le=5)]], 
        Field(min_length=3, max_length=10)
    ]
    
  • Comprehensive Pydantic integration

Project info:

Anyone who agrees with this pull request could submit an Approve review to it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vinta/awesome-python/pull/2782 **Author:** [@offerrall](https://github.com/offerrall) **Created:** 10/26/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `add-functoweb` --- ### 📝 Commits (1) - [`a1cdf60`](https://github.com/vinta/awesome-python/commit/a1cdf60c0cbfee7ee1b38500c4a3e3b4d8ddbb8b) Add func-to-web to Admin Panels section ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) </details> ### 📄 Description ## What is this Python project? FuncToWeb turns Python functions into web forms with zero boilerplate. **Problem it solves:** Data scientists, backend developers, and teams need quick internal tools and forms without learning frontend frameworks or writing repetitive FastAPI boilerplate. **Solution:** Just add type hints to any function and get an automatic web UI: ```python def process_data( file: ImageFile, threshold: Annotated[int, Field(ge=0, le=100)], mode: Literal["fast", "accurate"] ): # Your logic here return result run(process_data) # That's it - instant web form ``` **Use cases:** - Internal tools (data processing, report generation) - Quick prototypes and demos - Script sharing with non-technical users - Admin panels without writing HTML/CSS/JS Describe features: - Zero boilerplate - just type hints - All Python types supported (int, str, bool, date, time, files, lists) - Advanced validation with Pydantic Field - Combined constraints (validate both list size AND individual items) - Dynamic dropdowns with Literal[function] - File uploads (images, CSV, documents) - FastAPI-powered, production-ready ## What's the difference between this Python project and similar ones? **vs Streamlit (33k stars):** - Streamlit requires learning their API (st.text_input(), st.button()) - FuncToWeb uses standard Python type hints - zero new syntax - Better for wrapping existing functions without modification **vs Gradio (30k stars):** - Gradio needs explicit gr.Interface() configuration - FuncToWeb infers everything from type hints automatically - Lighter weight - fewer dependencies **vs Wooey:** - Wooey uses argparse (outdated approach) - FuncToWeb uses modern Python type hints - Better validation with Pydantic Field constraints **Unique features:** - OptionalEnabled/OptionalDisabled markers for optional field control - Dynamic Literal[function] for runtime-populated dropdowns - Combined constraints: validate both list size AND each item separately ```python # 3-10 ratings, each rating must be 1-5 ratings: Annotated[ list[Annotated[int, Field(ge=1, le=5)]], Field(min_length=3, max_length=10) ] ``` - Comprehensive Pydantic integration --- **Project info:** - GitHub: https://github.com/offerrall/FuncToWeb - Documentation: https://offerrall.github.io/FuncToWeb/ - Stars: 208+ - PyPI: https://pypi.org/project/func-to-web/ Anyone who agrees with this pull request could submit an *Approve* review to it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-06 13:29:22 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-python#2095