Methods
setup
: This is an optional method implemented by the PixieApp to initialize its state. Will be automatically invoked before the PixieApp runs.Arguments: None
Example:
def setup(self): self.var1 = “some initial value” self.pandas_dataframe = pandas.DataFrame(data)
Note
You can find the code file here:
https://github.com/DTAIEB/Thoughtful-Data-Science/blob/master/chapter%205/sampleCode39.py
run
: This starts the PixieApp.Arguments:
- entity: [Optional] Dataset passed as input to the PixieApp. Can be referenced with the
pd_entity
attribute or directly as a field calledpixieapp_entity
. - **kwargs: Keyword arguments to be passed to the PixieApp when it runs. For example, using
runInDialog=”true”
will start the PixieApp in a dialog.app = MyPixieApp() app.run(runInDialog=”true”)
Example:
- entity: [Optional] Dataset passed as input to the PixieApp. Can be referenced with the
invoke_route
: This is used to programmatically invoke a route.Arguments:
- Route method: Method to be invoked.
- **kwargs: Keyword arguments to be passed to the route method...