wxyz.core#
Isomorphic JSON widgets
- class wxyz.core.Fn(**kwargs: Any)[source]#
Bases:
Base
Turns a
source
into avalue
This is a foundational class with a number of implementations throughout
wxyz
.The simplest
Fn
subclass might implement the identity function:class Identity(Fn): def the_function(self, source): return source
- mode#
whether to execute transformations on the client and/or the kernel
- source: any#
the source
- value: any#
the value produced by evaluating the function
- class wxyz.core.JSON(**kwargs: Any)[source]#
Bases:
Fn
A JSON parsing functional widget
- mode#
whether to execute transformations on the client and/or the kernel
- source: any#
the source
- the_observer(*_)#
Base observer that updates value and/or error
- value: any#
the value produced by evaluating the function
- class wxyz.core.JSONPointer(**kwargs: Any)[source]#
Bases:
Fn
A JSON pointer resolver
- mode#
whether to execute transformations on the client and/or the kernel
- source: any#
the source
- the_observer(*_)#
Base observer that updates value and/or error
- value: any#
the value produced by evaluating the function
- class wxyz.core.JSONSchema(**kwargs: Any)[source]#
Bases:
Fn
A JSON schema validator
- mode#
whether to execute transformations on the client and/or the kernel
- source: any#
the source
- the_observer(*_)#
Base observer that updates value and/or error
- value: any#
the value produced by evaluating the function
- class wxyz.core.UnJSON(**kwargs: Any)[source]#
Bases:
Fn
A JSON dumping functional widget
- mode#
whether to execute transformations on the client and/or the kernel
- source: any#
the source
- the_observer(*_)#
Base observer that updates value and/or error
- value: any#
the value produced by evaluating the function