Skip to main content

A Python SDK for Online Scout Manager (OSM)

Project description

OSM SDK

OSM SDK is a Python SDK for Online Scout Manager (OSM).

The project is provided as a PyPI package that is published on pypi.org, and it can be installed by running:

pip install osm-sdk

Requirements

OSM SDK requires an OAuth Client ID and Oauth Secret.

These can be generated within OSM, by going to Settings → My Account Details → Developer Tools → Create Application.

Client Credentials Grant must be enabled for the application.

Quick Start

from osm_sdk import OSMClient, OSMAttendanceStatus

client = OSMClient(client_id="...", client_secret="...")

section = client.get_section(name="Scouts")
term = section.current_term()

for member in term.list_members():
    contacts = member.list_contacts()
    print(f"Member: {member.full_name} has {len(contacts)} contacts.")

for event in term.list_events():
    attendance = event.list_attendance()
    attending = [a for a in attendance if a.status == OSMAttendanceStatus.YES]
    print(f"Event: {event.name}: {len(attending)} attending (out of {len(attendance)})")

for meeting in term.list_meetings():
    attendance = meeting.list_attendance()
    attending = [a for a in attendance if a.status == OSMAttendanceStatus.YES]
    print(f"Meeting: {meeting.name}: {len(attending)} attending (out of {len(attendance)})")

By default, OSMClient requests the scopes: section:member:read section:event:read section:programme:read section:attendance:read.

Documentation

The public API is documented in PUBLIC_API.md.

Contributions

Contributions are welcome! Read the contributing guide to get started.

License

This project is licensed under the MIT 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

osm_sdk-0.1.0.dev1.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

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

osm_sdk-0.1.0.dev1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file osm_sdk-0.1.0.dev1.tar.gz.

File metadata

  • Download URL: osm_sdk-0.1.0.dev1.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for osm_sdk-0.1.0.dev1.tar.gz
Algorithm Hash digest
SHA256 30f444f68b0899d8c637fd26e4573e726bcc4cf6ce76a3d0abfaf45043271c43
MD5 1256adedda6d72bcf47e5943b4d92744
BLAKE2b-256 3ed9042216c37f62809df79385edfaaa65d3a185e4678b6f73857ac2a02f83cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for osm_sdk-0.1.0.dev1.tar.gz:

Publisher: publish.yml on Thomas-Shephard/osm-sdk

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

File details

Details for the file osm_sdk-0.1.0.dev1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for osm_sdk-0.1.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 75eaa2c75b6013128ab68d82b538d63e07cbc90d3b129bcc223a2498f9ee02d9
MD5 3a7a6e2b1113f2d5d21832b27d23b143
BLAKE2b-256 705370ff84f095a94a66dc6a3381bac7acd03649b1385ddbd5354af2853c23f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for osm_sdk-0.1.0.dev1-py3-none-any.whl:

Publisher: publish.yml on Thomas-Shephard/osm-sdk

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