Skip to main content

jupyter-formily

Use formily in Jupyter.

Installation

pip install jupyter-formily

Usage

from jupyter_formily import Formily

example = Formily(schema, options, default_value)
example.display()

schema can be constructed with Formily Designer or crafted manually. options allows you to tune the form to fit you need. default_value allows you to set initial value which follow schema.

options is dict, and key as follow:

key Type Default value
show_modal bool True
ok_label string "OK"
cancel_label string "Cancel"
ok_props ISubmitProps {}
cancel_props ButtonProps {}
form_props IFormLayoutProps {}
modal_props ModalProps {}

Check demo.ipynb for more information.

Custom Components

Currently custom can not be used via Formily Designer, you have to add them manually. A trick to use custom components is to add a similar component in desinger as placeholder. And then replace it to the component you want by patching the generated schema.

File Picker

Select file path interactively.

{
  "type": "string",
  "name": "input_file",
  "title": "Input File",
  "x-decorator": "FormItem",
  "x-component": "FilePicker",
  "x-validator": [],
  "x-component-props": {
    "init_path": "./"
  },
  "x-decorator-props": {},
  "x-designable-id": "8j01zeibhn3",
  "x-index": 1
}

Development

Setup

You need to install dependencies both python and javascript. Please make sure you have installed poetry and yarn.

# python
poetry install

# javascript
cd vendor/formily && yarn

Start Server

cd vendor/formily && npm run dev Formily

Then you can check widget in demo.ipynb.

Build

./build.sh

Release files for jupyter-formily 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyter-formily 0.0.7
File Size Uploaded
jupyter_formily-0.0.7.tar.gz 701.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-formily 0.0.7
File Interpreter ABI Platform
jupyter_formily-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / jupyter_formily-0.0.7.tar.gz

Download URL jupyter_formily-0.0.7.tar.gz
Size 701.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4e0fd96178ea2c33fc16d4fe94533e6d219185016d6a4d3cd64ea159d888697e
BLAKE2b-256 checksum
How to use checksums
133e947006bf3e6f1e3f9806aef36f5d9ed8cdfa68f72c88cba76ca3a156484f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.9.12 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / jupyter_formily-0.0.7-py3-none-any.whl

Download URL jupyter_formily-0.0.7-py3-none-any.whl
Size 711.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71fe2f3b19ba7eff0e271763801c83523b248b5fe069d6516722c00483312892
BLAKE2b-256 checksum
How to use checksums
e1aa31dd007e61f51f787ffb3daf3bec4fcda6bb587e0628d88db1fdacdce8cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.9.12 Linux/5.15.90.1-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page