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
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyter_formily-0.0.7.tar.gz | 701.8 kB | Without provenance | Details for jupyter_formily-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyter_formily-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for jupyter_formily-0.0.7-py3-none-any.whl |
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
|
Security for jupyter-formily 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.