Skip to content

Releases: TexteaInc/funix

Funix 0.6.3

06 Sep 02:06
78cb042

Choose a tag to compare

0.6.3 (2025-09-06)

Highlights

  1. The autorun argument has breaking changes and now supports three values: always, disable, and toggleable:

    • always: the function will re-run whenever panel inputs change. The Run button and the auto-run checkbox are disable;
    • disable: the auto-run checkbox is disabled, but the Run button remains available;
    • toggleable: both controls are kept; the user can enable/disable auto-run as needed.
  2. Inputs of type list[int|float|str] / typing.List[int|float|str] now use a Chip List widget;

  3. History function has been optimized to reduce re-renders and memory usage;

  4. The default theme has been improved, the AppBar now uses a white background;

  5. pydantic.BaseModel support now, funix will handle simple nesting. See examples/pydantic_test.py. Advanced features such as reactive are still not supported;

  6. Funix has an experimental redesign for layout/theming. You can now use a nest theme and custom icons in the theme, e.g.:

    {
        "name": "my_theme",
        "funix": {
            "icon": "/icon.png",
            "icon_width": 64,
            "icon_height": 64,
            "nest": True
        }
    }
    • The nest theme automatically moves the function list bar to the top, similar to browser tabs;
    • icon, icon_width, and icon_height set a custom icon; icon supports HTTP URLs and Base64 data;
    • If you need to export a local image, you must manually from funix.app import app and then use Flask’s send_file to serve the image.
  7. Markdown now supports an style attribute on <img> and can render mermaid diagrams;

  8. datetime types are supported, but you must handle time zone concerns yourself;

  9. List[Tuple[...]] is supported for exporting nested lists of tuples;

  10. Chemistry support: visual chemical input and export are now supported:

    • Use funix.hint.Ketcher for chemical input: it has 6 string properties: smiles, inchi, inchi_aux_info, inchi_key, smarts, and ket. If the user inputs a reaction, the inchi, inchi_aux_info, and inchi_key fields will be set to None.
    • You can return funix.hint.ChemStr: SMILES, SMARTS and InChI formats should be supported and will render as the corresponding SVG image;
    • Note: the Funix frontend now requires WebAssembly (WASM). If the user’s browser doesn’t support WASM, an API fallback may be necessary;

Bug Fixes

Features

Read more

Funix 0.6.1

15 May 08:08

Choose a tag to compare

0.6.1 (2025-05-15)

Highlights

  • A new examples syntax is available, where you can combine different arguments, like below:

    @funix(
        examples=[
            {"doc": "Fire", "sum": "Water"},
            {"doc": "Fire", "sum": "Fox"},
            {"sum": "Wood"},
            {"doc": "Golden", "sum": "Silver"},
            {"doc": "Day", "sum": "Night"},
        ]
    )
    def example_function(
        doc: str,
        sum: str,
    ) -> str:
        pass

    When user input Fire in the doc field, the sum field examples will be filtered to Water and Fox.

  • The front-end has been improved a little so that the left-hand list is not expanded under a single function.

  • The theme options funix.autorun_label, funix.run_button, funix.grid_height and funix.grid_checkbox are added.

    • funix.autorun_label is used to customize the autorun checkbox label, string.
    • funix.run_button is used to customize the run button text, string.
    • funix.grid_height is used to customize the DataGrid height, number.
    • funix.grid_checkbox is used to customize the DataGrid selection checkbox display or not, boolean.

Bug Fixes

Features

Funix 0.6.0

02 May 07:56
284ac2c

Choose a tag to compare

0.6.0 (2025-05-02)

Highlights

  • URLs and iframe codes can be copied from the Funix App interface, making it easier to share or embed.

  • The logging system, when enabled, can now record the user's IP address, the name of the function called, the server file accessed, and other information.

  • Now the sidebar functions have icons and are sorted by the order of definition.

  • Support just_run argument for @funix, you don't need to click run button, the Funix App will run the function automatically when you enter the function's page.

  • Header and footer strings can now be modified through the theme, and simple string templates are supported. The icons at the footer can be hidden at any time, and the function name can also be displayed in the input panel. Here is an example:

     from funix import import_theme, funix
     
     
     import_theme({
         "name": "example",
         "funix": {
             "header": "Example - {{functionName}}",
             "footer": "©️ {{year}} Example, Funix: {{funixLink}}",
         }
     })
     
     @funix(theme="example")
     def my_function():
         pass
  • Function jumping is supported, a funix decorated function can use typing.Callable to jump to another funix decorated function, examples are shown below:

     from typing import Callable
     
     
     def test_function(x: int, y: int) -> int:
         return x + y
     
     
     def normal_jump() -> Callable:
         return test_function

    If you want to jump with arguments, you can do like this:

     from typing import Callable
     
     
     def test_function(x: int, y: int) -> int:
         return x + y
     
     
     def args_jump() -> Callable:
         x = 1
         return lambda _: test_function(2, y=x)
  • You can use funix.generate_redirect_link to generate a <a> tag that can redirect to a funix function. Syntax: funix.generate_redirect_link(function_name, args, kwargs).

  • Support dynamic_defaults argument for @funix, you can use dynamic_defaults to generate default values for function arguments. For example:

     from funix import funix
     
     def get_x():
         return 1
     
     @funix(dynamic_defaults={
         "x": get_x
     })
     def my_function(x: int):
         return x

    Or you can use this with session class, use lambda self: ... to get the session object:

     from funix import funix_method
     
     class A:
         def __init__(self, x: int):
             self.x = x
         
         def get_x(self):
             return self.x
         
         @funix_method(
             dynamic_defaults={
                 "x": lambda self: self.get_x()
             }
         )
         def calc(self, x: int, y: int):
             return self.x + x
  • Auto read first line in function's __doc__ as title (Disabled by default, use GlobalSwitchOption.DOCSTRING_FIRST_LINE_TO_TITLE to turn it on).

  • Allow expression in whitelist, dynamic_defaults and example

Breaking Changes

There are major differences between the previous version and this version, so please be aware that some issues and features may break past code.

Bug Fixes

Features

Refactors

Chores

Reverts

Funix 0.5.9

29 Jul 00:09

Choose a tag to compare

0.5.9 (2024-07-29)

Highlights

  • Funix now parses the docstring of your function as a description of the app and its arguments.
  • Initial support for jupyter through a simple iframe.
  • It is now possible to use the List[Literal[...]] type to create dropdown menus.
  • The whitelist and example can be dynamically updated by functions.

Bug Fixes

Features

Refactors

Documents

Funix 0.5.8

17 May 13:36

Choose a tag to compare

0.5.8 (2024-05-17)

Highlights

This release brings some fixes and documentation changes:

  • Important Fixes: Form Height, CORS Requests, Secret Authentication
  • Now for dependencies, matplotlib, mpld3, pandera and pandas become mandatory.

Bug Fixes

Documents

Chores

Funix 0.5.7

27 Apr 10:30
94cc179

Choose a tag to compare

There are no feature updates or logic fixes compared to Funix 0.5.6. Only dependencies have been fixed.

Funix 0.5.6

21 Apr 08:58

Choose a tag to compare

0.5.6 (2024-04-21)

Highlights

  • You can now dynamically fetch variable as description from session, use session_description argument, fill your variable name in session
  • Provide a new boolean parameter: keep_last, whose function is to keep the last inputs and outputs of the session in the function page when it is opened again
  • Funix app that do not have a default function will now use one of the functions used in the list as the default function
  • Outdated hints will now be displayed when previewing historical functions

Bug Fixes

Features

Documentations

Funix 0.5.5

28 Feb 11:36

Choose a tag to compare

0.5.5 (2024-02-28)

Highlights

  • Initial implementation of autorun allows the frontend to automatically re-run the function as parameters are changed, you can use autorun=True in the decorator to enable this feature
  • Once again, any function or class will be decorated with funix or funix_class (default lazy is back again), which you can turn off with @funix(disable=True)
  • Now allowed to generate static images directly from the Figure type (if mpld3 doesn't work for you) by using figure_to_image=True in the parameter of the decorator
  • IPython.display.Javascript is now supported
  • You can now customize widgets with widgets and props in the widgets and theme
    theme = {
        "widgets": {
            "YOUR_WIDGET_NAME": {
                "widget": "WidgetComponent, e.g. '@mui/material/TextField'",
                "props": {
                    # props for the widget
                    "type": "password"
                }
            }
        }
    }
  • The privacy message can now be updated with funix.app.privacy_policy function

Bug Fixes

Features

Documentation

Refactors

Funix 0.5.4

23 Dec 02:07

Choose a tag to compare

0.5.4 (2023-12-23)

Highlights

  • Fixed issue where external scripts could not be loaded due to security checks in DOM updates
  • For users using @funix_class, the AST is now used to parse the source code
  • docstring is now used as a function description
  • HTML code now allows developers to embed JavaScript
  • Improved error message when limiter limit is exceeded and class is not initialized
  • Added reactive parameter to help update/calculate parameters in real time
  • For parameters such as label, the *, glob or regex are now supported
  • Camera (picture or video) and microphone inputs are supported on the front end

Bug Fixes

Features

Documents

Funix 0.5.3

28 Nov 15:28

Choose a tag to compare

0.5.3 (2023-11-28)

Highlights

  • Support class with funix, you can use funix.funix_class and funix.funix_method for class and class's method
  • Support generator function with websocket, and you can use yield to send message to frontend
  • For websocket, we add print_to_web option in decorator for printing message to frontend directly by print function
  • Normal pandas type is now supported
  • Now funix can run offline
  • The memory leak of web histories is fixed, and for any input with file, the history will be disabled

Bug Fixes

Features

Documents

Chores