Installation
Table of contents
- Requirements
- Install from PyPI
- Install with Visualization Support
- Development Installation
- 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])