Name: widget-gen
Owner: Two Sigma
Description: A node package for generating jupyter widget definitions from a JSON schema
Created: 2018-04-02 14:41:26.0
Updated: 2018-05-21 14:26:12.0
Pushed: 2018-05-21 14:26:10.0
Homepage: null
Size: 109
Language: TypeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a utility library for auto-generating jupyter widget definitions based on the synchronization state. Any bussiness logic will have to be added on top, but this utility can help with:
The last point is best accomplished by using the auto-generated definitions as base classes for the classes that actually add the business logic.
It can read (parse) widget definitions from:
And then output corresponding code in the following languages:
install [-g] widget-gen
dgetgen --help
age: main [options] <file> [languages...]
tions:
-V, --version output the version number
-p, --parser [parser] The name of the parser to use, either "json" or "python".
-o, --outputdir [outputdir] The output directory.
-t, --template [template] a template file to use.
-e, --extension [extension] The file extension to use for the output.
-h, --help output usage information
To add support for other output languages, you need to add another Writer class. You can either
do this by inherting the base Writer
class, having full control of the process, or you can
inherit the TemplateWriter
class that will use Nunjucks templates for creating output.