awesome-python icon indicating copy to clipboard operation
awesome-python copied to clipboard

Add func-to-web to Admin Panels section

Open offerrall opened this issue 2 months ago • 0 comments

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:

  • 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.

offerrall avatar Oct 26 '25 14:10 offerrall