Set the client import path
PYTHONPATH=python_client .venv/bin/python python_client/examples/quickstart.py
PYTHONPATH=python_client .venv/bin/python python_client/examples/compare_companies.py Technical preview / Python
Load the static five-company public preview package in notebooks and scripts. The client reads local files; it is not a live web API.
Quickstart
Clone the repository and run from its root. Python 3.10+ is required; pandas is optional but recommended.
PYTHONPATH=python_client .venv/bin/python python_client/examples/quickstart.py
PYTHONPATH=python_client .venv/bin/python python_client/examples/compare_companies.py from swiss_equity_data import PublicBetaDataset
data = PublicBetaDataset.load()
# List all companies
companies = data.get_companies()
print(companies)
# Get annual fundamentals for one company
sika = data.get_fundamentals("SIKA.SW")
print(sika)
# Compare companies side by side
comparison = data.compare_companies(
["SIKA.SW", "GEBN.SW", "BARN.SW"],
metrics=["revenue", "ebit", "net_income", "roe_pct"]
)
print(comparison)
The client reads static JSON from site/public/beta_v0_2/. Full local usage remains documented in python_client/README.md.
Common workflows
get_company_profile(ticker) Metadata, sector, currencies and fiscal year-end.
get_fundamentals(ticker) Annual financial rows for one preview company.
get_accounting_ratios(ticker) Margins, returns and leverage where inputs are available.
compare_companies(tickers, metrics) Selected metrics side by side across companies.
get_quality_notes(ticker?) Documented company-level data quality issues.
Direct file workflow
The published files can also be read without the Python client.
import pandas as pd
# CSV files can also be loaded directly
base_url = "https://swiss-equity-data.ch/beta_v0_2/downloads"
financials = pd.read_csv(f"{base_url}/company_financials.csv")
print(financials[financials["ticker"] == "BARN.SW"].tail()) Technical register
| Callable | Returns or purpose |
|---|---|
PublicBetaDataset.load() | Load the public preview dataset from its default local path |
PublicBetaDataset(data_dir="site/public/beta_v0_2") | Initialize the client with an explicit local data directory |
get_companies() | List all companies in the preview dataset |
get_company_profile(ticker) | Company metadata, sector, currencies and fiscal year-end |
get_fundamentals(ticker) | Annual financial rows |
get_accounting_ratios(ticker) | Margins, ROE, ROA and leverage |
get_valuation_ratios(ticker) | P/E, EV/EBITDA and dividend yield where available |
get_reporting_coverage(ticker?) | Annual, Q1 and H1 coverage status |
get_quality_summary(ticker?) | Quality status and flag counts |
get_quality_notes(ticker?) | Documented data quality issues |
get_sources(ticker?) | Source references |
get_quarterly_updates(ticker?) | Q1 updates |
get_interim_financials(ticker?) | H1 interim rows |
compare_companies(tickers, metrics) | Side-by-side comparison |
list_available_metrics(dataset?) | Column names for a dataset |
Tabular methods return pandas DataFrames when pandas is installed, or lists of dictionaries otherwise.
Current limitations
Coverage is limited to BARN.SW, DKSH.SW, GEBN.SW, SCMN.SW and SIKA.SW. Unavailable values are not estimated or filled. The package provides no financial advice, action ratings, price objectives, forecasts, target prices or recommendations. A live API and hosted MCP access remain future roadmap items.