Skip to main content

Fabrique nodes SDK

Project description

fabrique-nodes-core

fabrique nodes sdk

Install this lib

pip3 install fabrique-nodes-core

UI ports generator

class UIPortGroupParams:
    id_: str = '' # port_group_id
    show_ports: bool = True # show port panels
    can_add: bool = False # can add new port to group
    can_delete: bool = False # can add delete port from group
    can_move: bool = False # can move port inside group
    can_hide: bool = False # can hide port
    can_set_type: bool = True # can set porttype to port
    has_code: bool = False # has editable code field
    has_special: bool = False # has special binary switch
    has_required: bool = False # has required binary switch
    copy_name_from_code: bool = True # copy port name from code field when code edting
    group_title: str | None = None # visual title for port group
    special_title: str | None = None # title|tooltip for special
    code_title: str | None = None # title|tooltip for code
    copy_from_group: str | None = None # port group name
    portgenerator_callback_name: str | None = None
    valid_types: List[str] = []

UI config forms generator

typical config

from pydantic import BaseModel, Field, constr
from typing import Literal

urls_type = constr(regex=r'[A-Za-z0-9]+://[A-Za-z0-9%-_]+(/[A-Za-z0-9%-_])*(#|\\?)[A-Za-z0-9%-_&=]*')

class Config(BaseModel):
     port: int = Field(80, title='DB Port', description='ClickHouse Port', ge=0, le=65535)
     url: urls_type = Field('', title='url', description='ClickHouse URL')
     agg: Literal['MAX', 'MIN', 'SUM'] = Field('SUM', title='Aggregator', description='Aggregator method')

Then Config().schema() could be validated here

  • Field for defaults, titles, descriptions and constraints

  • Literal string enums supported

  • ge and le for numbers (>= and <=)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fabrique_nodes_core-0.10.7-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file fabrique_nodes_core-0.10.7-py3-none-any.whl.

File metadata

File hashes

Hashes for fabrique_nodes_core-0.10.7-py3-none-any.whl
Algorithm Hash digest
SHA256 13f25fa4af01348cfa6f76233f0e3d037e3d054f00f2956582e5ee58bd299a63
MD5 14d2e4bb156dd332f6520a8a0859c28b
BLAKE2b-256 ac739c086810ca2dc23bfad6d3e43b531902cfd509d49ea4b8cbe34ec0bfe483

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page