Skip to content

Releases: offerrall/FuncToWeb

0.9.5

09 Dec 15:11

Choose a tag to compare

[0.9.5] - 2025-12-09

Added

  • New Generic File Type: Added support for a generic File type hint.
    • Use from func_to_web.types import File to accept uploaded files of any extension.
  • Expanded File Extensions: Significantly broadened the list of supported formats for specific file types.

0.9.4

08 Dec 14:57

Choose a tag to compare

[0.9.4] - 2025-12-08

Added

  • Python Enum Support: Full support for Python Enum types as dropdown menus.
    • Use standard Python enums as type hints: def func(theme: Theme)
    • Supports str, int, and float enum values
    • Your function receives the actual Enum member (e.g., Theme.LIGHT), not just the string value
    • Access both .name and .value properties in your function
    • Compatible with all enum features (methods, properties, iteration)
    • Add tests covering enum handling, conversion, and edge cases

0.9.3

30 Nov 15:06

Choose a tag to compare

[0.9.3] - 2025-11-30

Fixed

  • Async Function Support: Fixed an issue where passing an async def function displayed a <coroutine object> instead of the result.
    • The library now automatically detects async functions and awaits them properly.
    • Enables seamless integration with async libraries (e.g., httpx, tortoise-orm, motor).

0.9.2

27 Nov 00:06

Choose a tag to compare

[0.9.2] - 2025-11-25

Added

  • Built-in Authentication: Robust, stateless authentication system.
    • Enable simply by passing a dictionary auth={"username": "password"} to the run() function.
    • Architecture based on Signed Cookies (no database required).
    • Includes protection against Timing Attacks (secrets.compare_digest) and CSRF (SameSite='Lax').
  • Session Management: New secret_key argument in run() to control session persistence across server restarts.
  • Login UI:
    • Dedicated, modern login page that automatically inherits the application's theme (Light/Dark).
    • Responsive design matching the core library aesthetics.
  • Logout Functionality: New logout button in the header navigation (automatically appears when auth is enabled).

Changed

  • Dependencies: Added itsdangerous to required packages (essential for session signing).
  • Templates: Updated base templates to handle conditional rendering based on authentication state (has_auth flag).