Technical preview / Python

Python client

Load the static five-company public preview package in notebooks and scripts. The client reads local files; it is not a live web API.

DeliveryLocal package DatasetStatic public beta Scope5 companies Live APINot available
01

Quickstart

Run locally, then query the package

Clone the repository and run from its root. Python 3.10+ is required; pandas is optional but recommended.

01 / Local examples

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
02 / Initialization and first query

Load, inspect and compare

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.

02

Common workflows

Move from company context to comparison

01 Company profile get_company_profile(ticker)

Metadata, sector, currencies and fiscal year-end.

02 Fundamentals get_fundamentals(ticker)

Annual financial rows for one preview company.

03 Ratios get_accounting_ratios(ticker)

Margins, returns and leverage where inputs are available.

04 Comparisons compare_companies(tickers, metrics)

Selected metrics side by side across companies.

05 Quality notes get_quality_notes(ticker?)

Documented company-level data quality issues.

Direct file workflow

Load the same public data from CSV

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())
03

Technical register

Function reference

CallableReturns 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.

04

Current limitations

Static access, explicit blanks

Web APINot live UpdatesNot real-time Missing dataBlank or null OutputsData access only

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.