Config

Configuration de la page, thème, cache, navigation et utilitaires.

Référence API

FonctionBPM
@cache_data@bpm.cache_data
@cache_resource@bpm.cache_resource
set_page_config()bpm.set_page_config()
stop()bpm.stop()
rerun()bpm.rerun()
switch_page()bpm.switch_page()
query_paramsbpm.query_params
connection()bpm.connection()
secretsbpm.secrets
userbpm.user

Exemples

import bpm

bpm.set_page_config(page_title="Mon app", page_icon="📐", layout="wide")
bpm.theme(primary_color="#d4af37")

@bpm.cache_data(ttl=3600)
def load_data():
    return pd.read_csv("data.csv")

if condition: bpm.stop()
bpm.rerun()
bpm.query_params["id"] = "123"

Variables CSS : thème global --bpm-* (accent #d4af37, dark mode).