Skip to main content

Command-line interface for the Parro school communication platform

Project description

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

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.

Licentie

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parro-1.0.3.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parro-1.0.3-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file parro-1.0.3.tar.gz.

File metadata

  • Download URL: parro-1.0.3.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parro-1.0.3.tar.gz
Algorithm Hash digest
SHA256 3635699c528c6d1d2dde83c1bf28e4a5a576cf24ffdf18a19c908b2f09470ce8
MD5 fee6e100cbeed72d852f12ec23db264b
BLAKE2b-256 47ae91f71d2307efdb9f595284994753f0cb1bf49548489f1a5c6cdcaa7906c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for parro-1.0.3.tar.gz:

Publisher: release.yaml on anneschuth/parro-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parro-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: parro-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parro-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c97b5dea745c238070afd00272af9280f0bebac1bb084b2884cc4d9ea894f857
MD5 12e405c72a67e98e1765e01d4b2865dd
BLAKE2b-256 c4dc620b72b54033785f27ea42bcbae12c6d5b8ab3f1bbb959776c02dfeb8bea

See more details on using hashes here.

Provenance

The following attestation bundles were made for parro-1.0.3-py3-none-any.whl:

Publisher: release.yaml on anneschuth/parro-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page