Skip to main content

pyerviss

CI PyPI Docs Open In Colab

Unofficial Python API to ERVISS, the European Respiratory Virus Surveillance Summary

Weekly ILI, ARI and SARI rates and influenza, RSV and SARS-CoV-2 test positivity for EU/EEA countries as pandas DataFrames, from ECDC's ERVISS data, with history back to 2014 (ILI, ARI, primary care positivity) and 2020 (SARI).

Disclaimer: pyerviss is an independent, unofficial project. It is not affiliated with, endorsed by, or maintained by the European Centre for Disease Prevention and Control (ECDC) or ERVISS. The data is mirrored from ECDC's public repository and processed here (units are harmonized, history is added from other sources, and rows ECDC later removes are kept), so it can differ from the official figures. For official data, see erviss.org.

Documentation: https://pyerviss.readthedocs.io · Try it without installing: quickstart notebook on Colab (notebooks/quickstart.ipynb)

Installation

pip install pyerviss

Requires Python 3.10+.

Usage

import pyerviss as pv

# ILI rates for Italy and Malta (names or ISO2 codes) in the 2024/25 season
df = pv.get_ili(countries=["Italy", "MT"], season="2024/25", age_groups="total")

# SARI rates for people aged 65+ between two dates (weeks or dates, inclusive)
df = pv.get_sari(start="2024-10-01", end="2025-03-31", age_groups="65+")

# ARI rates for all countries
df = pv.get_ari()

# Influenza test positivity in primary care, with test and detection counts
df = pv.get_positivity(pathogen="influenza", setting="primary care", countries="IT")

Rate queries return one row per country, week and age group:

indicator country country_code year_week date age value unit
ili Italy IT 2024-W42 2024-10-20 total 592.8 per 100,000 population
ili Malta MT 2024-W42 2024-10-20 total 5800.0 per 100,000 consultations
  • date is the last day (Sunday) of the ISO week.
  • A season such as "2024/25" runs from 2024-W40 to 2025-W39.
  • unit says what value measures; it differs by country (see Units).
  • Positivity rows add setting and pathogen columns, a value in %, and the tests and detections counts it is computed from.
  • Before 2022-W25, some countries only have the "total" age group (see coverage).

Plotting (requires pip install "pyerviss[plot]"): one line per season, the latest highlighted, with facet="country" or facet="age" for comparisons:

pv.plot_seasons(pv.get_ili(countries="Italy", age_groups="total"))

Finding out what is available:

pv.coverage("ili")         # per country: first/last week, number of weeks, age groups
pv.list_countries("sari")  # countries with SARI data
pv.list_seasons()          # ["2014/15", ..., "2025/26"]
pv.latest_week()           # most recent week with data, e.g. "2026-W38"

Data is downloaded on first use and cached locally (~/.cache/pyerviss on Linux), then checked for updates at most once an hour. Without a connection, the cached copy is used. pv.update_data() checks for updates now and pv.clear_cache() removes the cache.

Data

data/ mirrors ILI, ARI and SARI rates and primary care and SARI virology (tests, detections and positivity) from ECDC's Respiratory_viruses_weekly_data, synced daily and merged cumulatively (rows ECDC removes are kept). Weeks ECDC no longer publishes were imported once from earlier versions of ECDC's files in its git history (ILI and ARI by age group from 2014-W40, primary care virology from 2014-W25, SARI rates and virology from 2020-W40), and ILI and ARI for the total age group from the RespiCast ERVISS snapshots of 2024-10-11.

Units

The unit column says what each value measures, which differs by country:

Indicator Countries unit
ILI, ARI most per 100,000 population
ILI, ARI Finland per 100,000 consultations
ILI, ARI Cyprus, Luxembourg, Malta per 100,000 consultations (ECDC: per 100 consultations; multiplied by 1000)
SARI most per 100,000 population (hospital catchment population)
SARI Greece, Ireland, Latvia, Luxembourg per 100,000 hospital admissions (ECDC: per 100 total hospital admissions; multiplied by 1000)
Positivity all % of tested samples

Rates with different units are not directly comparable. Slovakia's SARI data is based on ICU admissions only. The sync fails if a country's values change scale by orders of magnitude, which would indicate a unit change upstream.

Credits

Data from the European Centre for Disease Prevention and Control (ECDC), European Respiratory Virus Surveillance Summary (ERVISS), published in EU-ECDC/Respiratory_viruses_weekly_data; see that repository for the data's terms of use. Historical ILI and ARI data via the European RespiCast Hub.

License

The code is released under the MIT License.

Metadata

Release files for pyerviss 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyerviss 0.3.0
File Size Uploaded Provenance Actions
pyerviss-0.3.0.tar.gz 30.2 kB With provenance Details for pyerviss-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyerviss 0.3.0
File Interpreter ABI Platform Actions
pyerviss-0.3.0-py3-none-any.whl Python 3 none any Details for pyerviss-0.3.0-py3-none-any.whl

Total release size: 63.1 kB

Release files / pyerviss-0.3.0.tar.gz

Download URL pyerviss-0.3.0.tar.gz
Size 30.2 kB
Tags Source
SHA-256 checksum
How to use checksums
59462e3b43a97b1983f08bf3fbbbc6080bd7da594e2c878179fd3f72b6dd0152
BLAKE2b-256 checksum
How to use checksums
8d9643f285e797750cc5c02df3a6f79f787475b1b66afa6ed5e7c3f4e3572a36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / pyerviss-0.3.0-py3-none-any.whl

Download URL pyerviss-0.3.0-py3-none-any.whl
Size 32.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31e0fc35d4b3c8082e58cbfe7f2fb260404a3d2ccdc89762fc12a9ba77fa9c27
BLAKE2b-256 checksum
How to use checksums
7de055acb0252f14b2aaf4f6f126543be4708699cffb698518667563f38f3811
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Security for pyerviss 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyerviss-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page