publish_table
The publish_table method publishes a table to a given SharedTicket. Another session can then use the ticket to fetch the table.
Other sessions can use the shared ticket to access the table as long as the table is not released. When the table is released either through an explicit call of the close method on it, implicitly through garbage collection, or through the closing of the publishing session, the shared ticket will no longer be valid.
This is a convenience method specifically for tables. For publishing other types of server objects (such as plots, pandas DataFrames, or plugin objects), use the generic publish method.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| ticket | SharedTicket | A |
| table | Table | A Table object to publish. |
Returns
This method returns None.
Examples
The following example creates a table and publishes it to a shared ticket so that other sessions can access it.
For a complete example showing how to use publish_table with Barrage sessions, see the Barrage subscribe documentation.