Installation

Table of contents

  1. Requirements
  2. Install from PyPI
  3. Install with Visualization Support
  4. Development Installation
  5. Verify Installation

Requirements

swissparlpy requires Python 3.9 or higher.


Install from PyPI

swissparlpy is available on PyPI. Install it with pip:

pip install swissparlpy

Install with Visualization Support

To enable the voting visualization feature, install with the visualization extra:

pip install swissparlpy[visualization]

This installs additional dependencies (matplotlib, Pillow) needed for plotting seat maps.


Development Installation

To develop on this project, first install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

Then clone the repository and install the package in editable mode with all development dependencies:

git clone https://github.com/metaodi/swissparlpy.git
cd swissparlpy
uv pip install -e ".[dev,test,visualization]"

Alternatively, use the provided setup script:

./dev_setup.sh

Verify Installation

After installation, verify it works:

import swissparlpy as spp
print(spp.__version__)
tables = spp.get_tables()
print(tables[:3])