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.1.tar.gz (32.2 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.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parro-1.0.1.tar.gz
  • Upload date:
  • Size: 32.2 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.1.tar.gz
Algorithm Hash digest
SHA256 51fee51a40cd71718342a35681531d1b96495aeff706542ffae400b5277665f3
MD5 af0a226a36acf4568ff0212f0eba73ce
BLAKE2b-256 1a72a5096f0e7422f5f34324661d852eb8727e57a87f255f6141b4a895266cef

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: parro-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 039626572ebb0509b8ffd596f87049e8a9089cefe9098fcbffe64ac0330de160
MD5 379588bb899278b5fbdce2ad38d53c58
BLAKE2b-256 a1bae0a76b0213e3ab9007ab05459a95a159c33fc1eefd39321850b40155ae72

See more details on using hashes here.

Provenance

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