SDK
Publish figures and tables
Promote notebook outputs into experiment figures, tables, and catalog lineage.
Publishing turns a local notebook output into an EpistaBase artifact.
import biolake as bl
result = bl.publish_figure(fig, name="Dose response", format="svg")
result.catalog_asset_id
result.download_urlPublish a table:
table = bl.publish_table(df, name="IC50 summary")What publish accepts
publish_figure() accepts:
- raw bytes
- matplotlib figures with
savefig() - plotly figures with
to_image()
publish_table() accepts:
- raw bytes
- CSV text
- dataframe-like objects with
to_csv()orto_parquet()
Experiment context
Published artifacts use BIOLAKE_EXPERIMENT_ID unless you pass experiment_id=.
bl.publish_table(df, name="Summary", experiment_id="experiment-id")When BIOLAKE_NOTEBOOK_ID is present, the artifact can record notebook context. Successful bl.query() calls made earlier in the session can be included in the publish payload for lineage.
Naming
Name published outputs like figure captions, not scratch files:
| Better | Avoid |
|---|---|
| Trametinib dose-response by cell line | plot1 |
| High-dose apoptosis by line | final bar chart |
| IC50 summary table | dataframe export |