Releases: TexteaInc/funix
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
Fire
in thedoc
field, thesum
field examples will be filtered toWater
andFox
. -
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
andfunix.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
- 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_examples
forstr
(12d8c31, @Yazawazi) - set autorun automatically (98e7812, @Yazawazi)
- sidebar will be collapsed if only one function is in the list (fe91cb7, @Yazawazi)
- add
gridHeight
andcheckboxSelection
(34b4143, @Yazawazi) - poor autosize (33352ab, @Yazawazi)
- calculate width manually (e2d27db, @Yazawazi)
- add
funix.autorun_label
theme 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_run
argument for@funix
, you don't need to clickrun
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 usedynamic_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, useGlobalSwitchOption.DOCSTRING_FIRST_LINE_TO_TITLE
to turn it on). -
Allow expression in
whitelist
,dynamic_defaults
andexample
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_run
argument 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
Callable
jump (c17e77a, @Yazawazi) - support get
locals
after 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
a
jump (5976b46, @Yazawazi) - fix tuple arguments (7331c05, @Yazawazi)
Refactors
Chores
- Remove build artifacts from
develop
branch (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
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
andexample
can 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
.env
file (2124afe, @Yazawazi) - check dataframe argument in the request (d643dbd, @Yazawazi)
- add
pagination
inDataGrid
(d2b83af, @Yazawazi)
Features
- support docstring in runtime ast (e52d3a3, @Yazawazi)
- support iframe with jupyter (53b4586, @Yazawazi)
- do not use
Autocomplete
forTextField
(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
encoding
and replacestderr
for 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
,pandera
andpandas
become 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_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
- asynchronous optimization for
FunixFunction
(7f1d1c7, @Yazawazi) - if
log_level
is off, do not show (756206b, @Yazawazi) call
module 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=True
in the decorator to enable this feature - Once again, any function or class will be decorated with
funix
orfunix_class
(defaultlazy
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
andprops
in 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_policy
function
Bug Fixes
- use
getsourcefile
to 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.display
check (3cac765, @Yazawazi)IPython.display
check in list (a7761a0, @Yazawazi)
Features
- support both sqlite and JSON Lines for telemetry (3b816d1, @Colerar)
- support autorun (5954f35, @Yazawazi)
- remove
lazy
again (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
widgets
andtheme
(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
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
- 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
class
with funix, you can usefunix.funix_class
andfunix.funix_method
for class and class's method - Support
generator
function with websocket, and you can useyield
to send message to frontend - For websocket, we add
print_to_web
option in decorator for printing message to frontend directly byprint
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
- frontend:
conditional_visible
andinput_layout
can cause conflicts (903ac3b, @Yazawazi) objArraySort
top level array check (1da9e1c, @Yazawazi)- use
abspath
in case (b0340e7, @Yazawazi) - use ast to create funix at the runtime (0718529, @Yazawazi)
- handle
funix_class_params
correctly (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
global
for auto session mode (3ecffd9, @Yazawazi) - support history in websocket mode (a003521, @Yazawazi)
- use
SyntaxHighlighter
inMarkdownDiv
(134875b, @Yazawazi) - remove
lazy
mode, 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
markdown
and fix flush (39cef98, @Yazawazi) - support
disable
infunix_class
(8a1f57e, @Yazawazi) - try to support class with
__init__
(af2f56b, @Yazawazi) - bring
lazy
mode back (5ba0caa, @Yazawazi) funix_class
as decorator (da192c6, @Colerar)- invocation style funix_class, update example (50a73e8, @Colerar)
funix_class
imports (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)
Chores
Funix 0.5.2.1
The following changes have been made in this version relative to 0.5.2:
- rollback of code that failed to run properly due to a merge error
- automatic recursive mode
You can read here to see the changes in 0.5.2, but the release at PyPI has been removed.