Skip to main content

📬 parro

A CLI and Python SDK for Parro, the Dutch school communication platform.
Mededelingen lezen, chatrooms volgen en bijlages openen — zonder de app te openen.

CI PyPI Python License


Wat doet het?

parro geeft je toegang tot het Parro schoolplatform vanuit de terminal:

  • Mededelingen lezen met bijlages, direct openen in Preview
  • Chatrooms bekijken en berichten lezen
  • Ongelezen aantallen checken
  • Kalender iCal URLs ophalen
  • JSON output voor scripting en automatisering

Authenticatie gaat via een headless OAuth2 flow — geen browser nodig.

Installatie

# CLI (met pip)
pip install parro[cli]

# CLI (met uv, aanbevolen)
uv tool install parro[cli]

# CLI (met Homebrew)
brew install anneschuth/tap/parro

# Alleen SDK (geen rich/click)
pip install parro

# Vanuit source
git clone https://github.com/anneschuth/parro-cli.git
cd parro-cli
uv tool install .[cli]

Snel aan de slag

# Inloggen
parro login

# Mededelingen bekijken
parro announcements

# Bijlage openen (nummer uit de output)
parro open 3

# Chatrooms
parro chatrooms
parro messages 12345

# Ongelezen berichten
parro unread

Alle commando's

Commando Wat het doet
parro login Inloggen via headless OAuth2
parro logout Tokens verwijderen
parro account Account info tonen
parro announcements Mededelingen ophalen (--limit N, --group ID)
parro chatrooms Chatrooms tonen, gesorteerd op activiteit
parro messages <id> Berichten in een chatroom (--limit N)
parro open <ref> Bijlage openen op nummer of URL
parro children Kinderen tonen
parro groups Groepen tonen
parro unread Ongelezen aantallen
parro calendar iCal URLs tonen
parro completion <shell> Shell completion script genereren

JSON output

Elke data-commando ondersteunt --json voor machine-leesbare output:

parro --json announcements --limit 5
parro --json chatrooms | jq '.[0].title'

Configuratie

Credentials

Drie manieren om in te loggen:

# 1. Interactief (prompts)
parro login

# 2. Command-line opties
parro login -u je@email.nl -p geheim

# 3. Environment variabelen of .env bestand
export PARRO_USERNAME=je@email.nl
export PARRO_PASSWORD=geheim
parro login

Voor .env bestanden: plaats ze in ~/.config/parro/.env of in je huidige directory.

Meerdere accounts op één login

Als je e-mailadres aan meerdere identiteiten gekoppeld is (bijvoorbeeld twee verzorgers die hetzelfde adres delen), toont ParnaSys na het wachtwoord een "Account kiezen"-pagina. Standaard wordt het eerste account gekozen; kies zelf met:

parro login --account "Jan"          # deel van de getoonde naam (of rol)
export PARRO_ACCOUNT=Jan             # of via env

Tokens

Na het inloggen worden tokens opgeslagen in ~/.config/parro/tokens.json (mode 0600). De CLI refresht automatisch verlopen tokens.

Shell completion

# bash — toevoegen aan ~/.bashrc
eval "$(parro completion bash)"

# zsh — toevoegen aan ~/.zshrc
eval "$(parro completion zsh)"

# fish
parro completion fish > ~/.config/fish/completions/parro.fish

SDK gebruik

Het parro package kan ook als Python SDK gebruikt worden, zonder CLI-afhankelijkheden:

from parro import ParroClient, ParroAuth, link_id, identity_name

# Inloggen (eenmalig)
tokens = ParroAuth.login("je@email.nl", "geheim")

# API gebruiken
with ParroClient(tokens["access_token"]) as client:
    for ann in client.get_all_announcements(limit=5):
        print(ann["title"], ann.get("_group_name", ""))

    for child in client.get_children():
        print(identity_name(child))

Development

git clone https://github.com/anneschuth/parro-cli.git
cd parro-cli
uv sync --extra dev
uv run pre-commit install
uv run pytest
uv run parro --help

See CONTRIBUTING.md for more details.

Bijdragen

Pull requests zijn welkom. Draai uv run pytest, uv run ruff check . en uv run ty check voordat je een PR opent; de CI doet hetzelfde.

Met dank aan @mingoes (login-fix na de IDP-wijziging en de accountkeuze) en @wienke (paginering via Range-headers, Rich-escaping en de afkapbug in mededelingen).

Licentie

MIT — see LICENSE.

Release files for parro 1.1.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 parro 1.1.0
File Size Uploaded
parro-1.1.0.tar.gz 40.5 kB Details

Built distribution (wheel)

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

Total release size: 57.0 kB

Release files / parro-1.1.0.tar.gz

Download URL parro-1.1.0.tar.gz
Size 40.5 kB
Tags Source
SHA-256 checksum
How to use checksums
82817afd2ab71e01f0d4e0e0865487f03aaeec98143ed0667e806e199d093c0a
BLAKE2b-256 checksum
How to use checksums
518351bfc2949beafe59d5cff867c88ef1cc393f0becc6411eace02d56082614
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 Sep 7, 2026.

Transparency log

Release files / parro-1.1.0-py3-none-any.whl

Download URL parro-1.1.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
201caa7645edee57bc1348b8b9e95d1d037a600c7331965b98bedcdea39afd8b
BLAKE2b-256 checksum
How to use checksums
b8546f3103214042690a9151523bb1782b501469509e0992c53d5498cc6820f4
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 Sep 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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