Releases: TexteaInc/funix
Funix 0.6.3
0.6.3 (2025-09-06)
Highlights
-
The
autorunargument has breaking changes and now supports three values:always,disable, andtoggleable: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.
-
Inputs of type
list[int|float|str]/typing.List[int|float|str]now use a Chip List widget; -
History function has been optimized to reduce re-renders and memory usage;
-
The default theme has been improved, the AppBar now uses a white background;
-
pydantic.BaseModelsupport now, funix will handle simple nesting. Seeexamples/pydantic_test.py. Advanced features such asreactiveare still not supported; -
Funix has an experimental redesign for layout/theming. You can now use a
nesttheme and custom icons in the theme, e.g.:{ "name": "my_theme", "funix": { "icon": "/icon.png", "icon_width": 64, "icon_height": 64, "nest": True } }- The
nesttheme automatically moves the function list bar to the top, similar to browser tabs; icon,icon_width, andicon_heightset a custom icon;iconsupports HTTP URLs and Base64 data;- If you need to export a local image, you must manually
from funix.app import appand then use Flask’ssend_fileto serve the image.
- The
-
Markdown now supports an
styleattribute on<img>and can rendermermaiddiagrams; -
datetimetypes are supported, but you must handle time zone concerns yourself; -
List[Tuple[...]]is supported for exporting nested lists of tuples; -
Chemistry support: visual chemical input and export are now supported:
- Use
funix.hint.Ketcherfor chemical input: it has 6 string properties:smiles,inchi,inchi_aux_info,inchi_key,smarts, andket. If the user inputs a reaction, theinchi,inchi_aux_info, andinchi_keyfields will be set toNone. - 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;
- Use
Bug Fixes
- title display (9685171, @Yazawazi)
- title display (true) (361b594, @Yazawazi)
argsfor autorun and justrun (c0760d3, @Yazawazi)auto_run(ffa8269, @Yazawazi)- make
reactiveworks on the class (28eb010, @Yazawazi) - make
MultipleInputandFileUploadWidgetaccept default values (20038fb, @Yazawazi) - make reactive works on callable jump (705219c, @Yazawazi)
- new fields should be updated in
reactive(3a273c3, @Yazawazi) - move
GuessingDataViewoutside for re-rendering (cbf47b4, @Yazawazi) - use lineno to sort lists (a8bb1a4, @Yazawazi)
- reactive cache callable result (8a1f286, @Yazawazi)
- drop filename (94ac9cc, @Yazawazi)
- span for render inline (f57cc1b, @Yazawazi)
- re-render for history (75f7486, @Yazawazi)
- theme: make app bar white (2ec9958, @Yazawazi)
- list of pydantic (2606e1d, @Yazawazi)
__name__attr check (115dca1, @Yazawazi)- pydantic example (1f07fa0, @Yazawazi)
- optional for
pydantic_uiall args (271838c, @Yazawazi) - support optional and list for pydantic (645ec06, @Yazawazi)
- nest mode icon render & widget parse (159f1fa, @Yazawazi)
- remove markdown div for PyDanticPanel.tsx (dacaddf, @Yazawazi)
- basemodel class check (e9a589f, @Yazawazi)
- support
imgstyle (6b7e4d9, @Yazawazi) - indigo svg width (344f8ae, @Yazawazi)
- ketcher init (ed7a2fc, @Yazawazi)
- memo structServiceProvider (7633fde, @Yazawazi)
- clear chem editor (db8044f, @Yazawazi)
list[int]now use<MultipleInput />(981ea1e, @Yazawazi)
Features
- support mermaid (4f675ff, @Yazawazi)
- support
List[str](2c11932, @Yazawazi) - support change title (b0dcd06, @Yazawazi)
- add
reactive_onlikeuseEffect(() => ..., [deps])(0c454d3, @Yazawazi) - try to reduce memory usage and re-render (908526a, @Yazawazi)
- support tuple and unpacking for reactive (fab1d11, @Yazawazi)
- support paste files into upload widget (6ba4cd1, @Yazawazi)
- add a default light theme (3b8151c, @Yazawazi)
- support
funix_icon(86661c8, @Yazawazi) - support
datetime(2e6d027, @Yazawazi) - support
pydantic.BaseModel(cc52a1b, @Yazawazi) - add focus highlight (123e272, @Yazawazi)
- support
nesttheme (69dcdd3, @Yazawazi) - support
titleforpydantic_ui(c280bd8, @Yazawazi) - support simple widget for
pydantic(9b03343, @Yazawazi) - support chem editor (fadda54, @Yazawazi)
- support svg upload (c69bd38, @Yazawazi)
- support render chem (a82a36f, @Yazawazi)
- support chem editor (45aae1f, @Yazawazi)
- support svg upload (7772fb7, @Yazawazi)
- support render chem (94c0391...
Funix 0.6.1
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
Firein thedocfield, thesumfield examples will be filtered toWaterandFox. -
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_heightandfunix.grid_checkboxare added.funix.autorun_labelis used to customize the autorun checkbox label, string.funix.run_buttonis used to customize the run button text, string.funix.grid_heightis used to customize the DataGrid height, number.funix.grid_checkboxis used to customize the DataGrid selection checkbox display or not, boolean.
Bug Fixes
- secret and cookies (49c18b9, @Yazawazi)
- dataframe height, button text (d6bd586, @Yazawazi)
- change auto run label (700c9a7, @Yazawazi)
- use
<img />width & height props (b91dbba, @Yazawazi) - disable center img (0d9df31, @Yazawazi)
- do not show app bar arrow only one function (f9a011a, @Yazawazi)
- revert output panel (777f7ae, @Yazawazi)
Features
- Merge branch 'main' into develop (284ac2c, @Yazawazi)
- support
advanced_examplesforstr(12d8c31, @Yazawazi) - set autorun automatically (98e7812, @Yazawazi)
- sidebar will be collapsed if only one function is in the list (fe91cb7, @Yazawazi)
- add
gridHeightandcheckboxSelection(34b4143, @Yazawazi) - poor autosize (33352ab, @Yazawazi)
- calculate width manually (e2d27db, @Yazawazi)
- add
funix.autorun_labeltheme option (6365b0d, @Yazawazi)
Funix 0.6.0
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_runargument for@funix, you don't need to clickrunbutton, 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.Callableto 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_linkto generate a<a>tag that can redirect to a funix function. Syntax:funix.generate_redirect_link(function_name, args, kwargs). -
Support
dynamic_defaultsargument for@funix, you can usedynamic_defaultsto 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, useGlobalSwitchOption.DOCSTRING_FIRST_LINE_TO_TITLEto turn it on). -
Allow expression in
whitelist,dynamic_defaultsandexample
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
- code render in
ReactMarkdown(55aa745, @Yazawazi) - repo path change (3618103, @Yazawazi)
- add
/update/in log, and make input & output UI width can set in code (798a940, @Yazawazi) - allow empty alias (d4390b3, @Yazawazi)
- datagrid height (2567bd3, @Yazawazi)
- add empty stack for empty data frame (daf61e5, @Yazawazi)
- check size in rejections (264504c, @Yazawazi)
- handle null
funix_disable_input_title(f8c2ce9, @Yazawazi) - leading zero (d1d8baf, @Yazawazi)
- add title for markdown link (9254873, @Yazawazi)
Features
- try to add
rowsPerPageOptions(d82f939, @Yazawazi) - add
autosizeOnMount(f7535a9, @Yazawazi) - log ip, function name and file info (c8897a3, @Yazawazi)
- add share dialog (4afd595, @Yazawazi)
- add icon and keep order for class methods (543e134, @Yazawazi)
- make a dashboard for funix logs (b19947a, @Yazawazi)
- add
just_runargument for@funix(13de1f2, @Yazawazi) - add function analytics (8156ea9, @Yazawazi)
- add
SESSION_COOKIE_SECURE(c392507, @Yazawazi) - support custom overrides (8a09d6f, @Yazawazi)
- support custom header, footer text and hiding footer icons (62fc3ee, @Yazawazi)
- support
Callablejump (c17e77a, @Yazawazi) - support get
localsafter calling (1c1cf42, @Yazawazi) - support
generate_redirect_link(8282656, @Yazawazi) - support
dynamic_defaults(63aacef, @Yazawazi) - fix docstring label & support overwriting help text (32ec3f0, @Yazawazi)
- funix 2025 winter new features and bug fixes (72234a9, @Yazawazi)
- add global
ajump (5976b46, @Yazawazi) - fix tuple arguments (7331c05, @Yazawazi)
Refactors
Chores
- Remove build artifacts from
developbranch (5c28a69, @NanamiNakano) - frontend: Lock package manager version to prevent build error (40ff48e, @NanamiNakano)
- mui premium (d43d97b, @NanamiNakano)
Reverts
Funix 0.5.9
0.5.9 (2024-07-29)
Highlights
- Funix now parses the
docstringof 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
whitelistandexamplecan be dynamically updated by functions.
Bug Fixes
- disable close on select and check value for docstring (caf8fdb, @Yazawazi)
- only legal widgets in the docstring will be processed (c740cd9, @Yazawazi)
- close pyplot (548cd1b, @Yazawazi)
- class function do not use new app (d676f30, @Yazawazi)
- use inline code for stderr (d452af2, @Yazawazi)
- multiple apps in
funix_class(8eb139c, @Yazawazi) - keep dict order (390f1ba, @Yazawazi)
- resize in options (335f425, @Yazawazi)
- class menu and
push_counter(9363bf5, @Yazawazi) - isolate data with Flask instances (c6b5d00, @Yazawazi)
- handle
list(6c6f0dd, @Yazawazi) - typing issues of funix() (a0a4300, @luochen1990)
- allow wrapped function (1432113, @Yazawazi)
- remove
.envfile (2124afe, @Yazawazi) - check dataframe argument in the request (d643dbd, @Yazawazi)
- add
paginationinDataGrid(d2b83af, @Yazawazi)
Features
- support docstring in runtime ast (e52d3a3, @Yazawazi)
- support iframe with jupyter (53b4586, @Yazawazi)
- do not use
AutocompleteforTextField(73da3f8, @Yazawazi) - support
List[Literal[...]]for dropdown menu (758374f, @Yazawazi) - support docstring for widgets (a3f8375, @Yazawazi)
- parse label in docstring (cad7546, @Yazawazi)
- direct printing is supported for tuples (cd2d72d, @Yazawazi)
- support ipywidgets Image, Video and Audio (6db1f58, @Yazawazi)
- add
encodingand replacestderrfor ws (026e1f4, @Yazawazi) - remove pandera (24843e8, @Yazawazi)
- remove pandera in
bioinformatics(19f0860, @Yazawazi) - add callable whitelist and example (3eba23c, @Yazawazi)
Refactors
Documents
- update chatGPT examples (1f55720, @forrestbao)
Funix 0.5.8
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,panderaandpandasbecome mandatory.
Bug Fixes
- minHeight in datagrid (ea9b1ee, @Yazawazi)
- cors request (ba8282c, @Yazawazi)
- ai examples and path_difference (a424d1d, @Yazawazi)
- secret error (40baed3, @Yazawazi)
Documents
- add install options (482a470, @Yazawazi)
- fix install and add cn (e1a32dc, @Yazawazi)
- fix code block (5d61288, @Yazawazi)
- add more build (61d5613, @Yazawazi)
Chores
Funix 0.5.7
There are no feature updates or logic fixes compared to Funix 0.5.6. Only dependencies have been fixed.
Funix 0.5.6
0.5.6 (2024-04-21)
Highlights
- You can now dynamically fetch variable as description from session, use
session_descriptionargument, 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
- asynchronous optimization for
FunixFunction(7f1d1c7, @Yazawazi) - if
log_levelis off, do not show (756206b, @Yazawazi) callmodule name (810de23, @Yazawazi)- error websocket in https (a6e65b9, @Yazawazi)
Features
- support description from session (a6017dc, @Yazawazi)
- frontend history optimization (24aea95, @Yazawazi)
- support keep last (a6259d3, @Yazawazi)
- remove
react-pdf(cf93b5b, @Yazawazi) - auto choose default function (first function in list) (2d15e94, @Yazawazi)
- support outdated alert (c41468a, @Yazawazi)
- change webcam and microphone position (df04197, @Yazawazi)
Documentations
- update theme examples (b132c05, @forrestbao)
Funix 0.5.5
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=Truein the decorator to enable this feature - Once again, any function or class will be decorated with
funixorfunix_class(defaultlazyis 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=Truein the parameter of the decorator IPython.display.Javascriptis now supported- You can now customize widgets with
widgetsandpropsin the widgets and themetheme = { "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_policyfunction
Bug Fixes
- use
getsourcefileto check member (fac9783, @Yazawazi) - custom class error (9d7dad2, @Yazawazi)
- privacy requests too much (3c25d85, @Yazawazi)
- backend check in privacy (04126c9, @Yazawazi)
- theme custom component parser (f05b857, @Yazawazi)
- do not change width in the frontend (f05a065, @Yazawazi)
- no wrap for grid (d262755, @Yazawazi)
- circular import (9bb9a0f, @Yazawazi)
- lists use wrong app and wrong value in
process_examples_and_whitelist(06e90eb, @Yazawazi) - cell doesn't working (bcb9986, @Yazawazi)
- raw
draw_figure(3201ec2, @Yazawazi) - tuple args parse (1aa5f1a, @Yazawazi)
IPython.displaycheck (3cac765, @Yazawazi)IPython.displaycheck in list (a7761a0, @Yazawazi)
Features
- support both sqlite and JSON Lines for telemetry (3b816d1, @Colerar)
- support autorun (5954f35, @Yazawazi)
- remove
lazyagain (51a7342, @Yazawazi) - support figure to image (949f7cd, @Yazawazi)
- disable log by default (8d966b6, @Yazawazi)
- support
IPython.display.Javascript(d51f019, @Yazawazi) - support update privacy message (f2649a7, @Yazawazi)
- try to support custom components (f40d8f9, @Yazawazi)
- support custom components in
widgets(b4f4aaf, @Yazawazi) - support custom components and props in
widgetsandtheme(1c3f17b, @Yazawazi) - user management example (bcc89da, @Colerar)
Documentation
- clean up examples and README (a9f7007, @forrestbao)
- update README with new examples (c65de88, @forrestbao)
Refactors
Funix 0.5.4
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
reactiveparameter 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
- remove
get_class_source_code, use full ast analyse (93a4d31, @Yazawazi) - external scripts load (97b60c0, @Colerar)
- docstring bug (cf97fb8, @Yazawazi)
- markdown list in toc (63eb95d, @Yazawazi)
- run script in HTML type (572afa9, @Yazawazi)
- do not update when function has no reactive (c9dbd69, @Yazawazi)
- improve class init error message (d78f20f, @Colerar)
- replace UTC with timezone (4ef833c, @Yazawazi)
Features
- support docstring as description (cf2637c, @Yazawazi)
- support label in sheet (8bc6c69, @Yazawazi)
- sort string in list (1b667b2, @Yazawazi)
- support "*" syntax sugar (6b33fac, @Colerar)
- support "*" in label (b849469, @Yazawazi)
- support glob and regex as key (e55dce7, @Colerar)
- add wordle example (dcfefbe, @Yazawazi)
- try to support reactive argument (3576712, @Yazawazi)
- better rate limit error display (c3bf872, @Yazawazi)
- add empty function list check (68391fc, @Yazawazi)
- if Literal args less than 8 use radio (304de20, @Yazawazi)
- support camera and microphone input (4fe2966, @Yazawazi)
- add a simple privacy policy and disclaimer (d01206f, @Yazawazi)
- backend telemetry (8627bb1, @Colerar)
- add SQLAlchemy (46ed592, @Colerar)
- update gitignore (4cb875c, @Colerar)
Documents
- update GenAI example (1ba6417, @Yazawazi)
- Update pandas DataFrame demo (e621bf3, @forrestbao)
- update openAI demos in compliance with new openAI API (3bffbe6, @forrestbao)
Funix 0.5.3
0.5.3 (2023-11-28)
Highlights
- Support
classwith funix, you can usefunix.funix_classandfunix.funix_methodfor class and class's method - Support
generatorfunction with websocket, and you can useyieldto send message to frontend - For websocket, we add
print_to_weboption in decorator for printing message to frontend directly byprintfunction - Normal
pandastype 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
- frontend:
conditional_visibleandinput_layoutcan cause conflicts (903ac3b, @Yazawazi) objArraySorttop level array check (1da9e1c, @Yazawazi)- use
abspathin case (b0340e7, @Yazawazi) - use ast to create funix at the runtime (0718529, @Yazawazi)
- handle
funix_class_paramscorrectly (922560c, @Yazawazi) - support
funix.funix_method(ecb459a, @Yazawazi) - type hint of example (e8a1780, @Colerar)
- web histories memory leak (f3d0b13, @Colerar)
Features
- frontend: support resize
TextField(db43985, @Yazawazi) - support generator function (9bfe561, @Yazawazi)
- add new openai example (1f4172b, @Yazawazi)
- use
globalfor auto session mode (3ecffd9, @Yazawazi) - support history in websocket mode (a003521, @Yazawazi)
- use
SyntaxHighlighterinMarkdownDiv(134875b, @Yazawazi) - remove
lazymode, lazy mode now be an addition to the normal mode (4473845, @Yazawazi) - update chatgpt example (c6bd389, @Yazawazi)
- try to support normal
pandas(e57e697, @Yazawazi) - support local d3 and mpld3 (cf83083, @Yazawazi)
- support
funix_class(693b310, @Yazawazi) - support
funix_class_params(cec8cdb, @Yazawazi) - support
print_to_web(efb7f7e, @Yazawazi) - support
markdownand fix flush (39cef98, @Yazawazi) - support
disableinfunix_class(8a1f57e, @Yazawazi) - try to support class with
__init__(af2f56b, @Yazawazi) - bring
lazymode back (5ba0caa, @Yazawazi) funix_classas decorator (da192c6, @Colerar)- invocation style funix_class, update example (50a73e8, @Colerar)
funix_classimports (f2c57a2, @Colerar)- remove multiline prop for number type (375db47, @Yazawazi)
Documents
- update readme and command line options (83b36e6, @Yazawazi)
- [demo] partially updating examples for streaming mode and openAI 1.1.1 API (06a26c2, @forrestbao)
- partially updating examples for OpenAI API v1.0+ (6380cf4, @forrestbao)
- update the example for classes (766920b, @forrestbao)