Skip to content

Spec for Component.py

Daniel Chatfield edited this page Jul 30, 2013 · 12 revisions

This is very much a work in progress.

File structure

Currently component is a single python file, it is possible that in the future it will become a full module but apart from making the name slightly misleading this won't make it backward-incompatible.

Consuming components in python

from component import require

example_component = require("example-component")

By default this would just include the module, however if your component is just a function you can decorate it with @export and just the function will be exported.

from component import export

@export
def my_function(){

}
Clone this wiki locally