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/parro/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.2.tar.gz (34.0 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.2-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parro-1.0.2.tar.gz
  • Upload date:
  • Size: 34.0 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.2.tar.gz
Algorithm Hash digest
SHA256 91841c250154ab50f9b0869051d31edf2df6550cce1210730d436fe14e24877a
MD5 3f2d4807257cb357065e5e78d527e119
BLAKE2b-256 74e25744455fd09b5ec9415f805c17d26526016c8fabc4837c582d0c31876b3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for parro-1.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: parro-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b9565d6da12ddbe3f80b0c6c7fbb8ecb034390e1999fde07270ee2cc77b62ee4
MD5 7376636a2fe0190d2bdafefdf6f66ea7
BLAKE2b-256 fdd08a71837fcf4c101a4f44379f8388204acbc58346156345ba7f2888fa200d

See more details on using hashes here.

Provenance

The following attestation bundles were made for parro-1.0.2-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