Cheat Sheet
Cheat Sheet¶
This page serves as a complete reference for the main concepts in Meerkat. You can use this cheat sheet to point you to the right documentation as you learn more about the library.
Concept |
Description |
---|---|
|
The Meerkat CLI, which is used to create and run Meerkat apps. Automatically installed when you install Meerkat. |
|
A Meerkat data frame. Holds structured and unstructured data in a single table. |
|
A column of data in a Meerkat DataFrame. Columns are of 4 main types: |
|
The way to wrap arbitrary Python objects so their value remains synchronized with the frontend. A Store is a transparent wrapper object that can be used as if it were the Python object it wraps. Stores help Meerkat keep track of objects and data that will participate in reactive functions. |
Markable Objects |
All Meerkat data objects can be marked or unmarked to indicate how they should be treated by reactive functions. |
|
Methods and properties to mark and unmark Meerkat data objects. |
|
A shortcut function that returns a marked Meerkat object. Equivalent to |
Reactive Function |
A function that is automatically re-run by Meerkat when any of its marked inputs change. Along with endpoints, reactive functions are the primary way to define how to respond to a user manipulating the frontend. When called, reactive functions, and their inputs and outputs are added by Meerkat to a directed, acyclic computation graph. |
Chained Reactivity |
Reactive function calls can be chained, where the output of one function is used as input to another. This defines dependencies between reactive functions, where re-running one function will cause all functions that depend on it to be re-run. |
Default Object Reactivity |
Meerkat automatically makes all property accesses and certain methods on |
|
A decorator that is used to create reactive functions in Meerkat. When called, reactive functions will automatically unwrap |
Endpoint |
A Python function that is run in response to some event on the frontend. The frontend sends the event payload which provides arguments to call the endpoint with. Endpoints in Meerkat are implemented by the |
|
A decorator that is used to create endpoints in Meerkat. Functions decorated by |
|
A method that can be called on any Meerkat endpoint in order to bind some its arguments. Returns a new endpoint i.e. a new |
|
A method that can be called on any Meerkat object in order to set its value. This is the only way to trigger reactive functions in Meerkat, and can only be used inside Meerkat endpoints. Reactive functions that depend directly or indirectly (through chained reactivity) on the object that was set will be re-run. When called on non- |
|
A decorator that ensures that the decorated function is always called with unmarked inputs. Consequently, this function when called will never be reactive, and neither will any function calls within its body, even if they are to reactive functions. Effectively creates a reactivity dead zone. |
|
A context manager within which all Meerkat objects are made unmarked. Consequently, reactive functions, methods or property accesses used within the context will not behave reactively. Effectively creates a reactivity dead zone. |
|
A context manager within which all |
|
The building block for interactive user interfaces in Meerkat. A single component can be as simple as a slider, or as complex as a full data app. All components in Meerkat must have a corresponding component implementation in Svelte. |
|
An endpoint attribute of a component. If an endpoint is assigned to this attribute, it will be called when the event occurs. This is the only way to set up endpoint calls in Meerkat. |
|
An object that represents a single page in a Meerkat app. Interactive apps must initialize a page, passing in a |