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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30f444f68b0899d8c637fd26e4573e726bcc4cf6ce76a3d0abfaf45043271c43
|
|
| MD5 |
1256adedda6d72bcf47e5943b4d92744
|
|
| BLAKE2b-256 |
3ed9042216c37f62809df79385edfaaa65d3a185e4678b6f73857ac2a02f83cd
|
Provenance
The following attestation bundles were made for osm_sdk-0.1.0.dev1.tar.gz:
Publisher:
publish.yml on Thomas-Shephard/osm-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
osm_sdk-0.1.0.dev1.tar.gz -
Subject digest:
30f444f68b0899d8c637fd26e4573e726bcc4cf6ce76a3d0abfaf45043271c43 - Sigstore transparency entry: 1234861152
- Sigstore integration time:
-
Permalink:
Thomas-Shephard/osm-sdk@c721248908f7ca42c56292b7f5b0abca8aec0fe2 -
Branch / Tag:
refs/tags/v0.1.0-dev1 - Owner: https://github.com/Thomas-Shephard
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c721248908f7ca42c56292b7f5b0abca8aec0fe2 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75eaa2c75b6013128ab68d82b538d63e07cbc90d3b129bcc223a2498f9ee02d9
|
|
| MD5 |
3a7a6e2b1113f2d5d21832b27d23b143
|
|
| BLAKE2b-256 |
705370ff84f095a94a66dc6a3381bac7acd03649b1385ddbd5354af2853c23f4
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
osm_sdk-0.1.0.dev1-py3-none-any.whl -
Subject digest:
75eaa2c75b6013128ab68d82b538d63e07cbc90d3b129bcc223a2498f9ee02d9 - Sigstore transparency entry: 1234861182
- Sigstore integration time:
-
Permalink:
Thomas-Shephard/osm-sdk@c721248908f7ca42c56292b7f5b0abca8aec0fe2 -
Branch / Tag:
refs/tags/v0.1.0-dev1 - Owner: https://github.com/Thomas-Shephard
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c721248908f7ca42c56292b7f5b0abca8aec0fe2 -
Trigger Event:
release
-
Statement type: