Spond-classes
About
Spond is a team/group-oriented events system.
The unofficial Python spond library package (GitHub,
PyPI) returns data from the Spond API.
This unofficial Python spond-classes library package
(GitHub,
PyPI) parses that data using
Pydantic to create class instances.
Partial, read-only implementation.
Install
Install from PyPI, e.g:
pip install spond-classes
Note that spond is required for practical use, but
is not a technical dependency, so needs to be installed separately.
Example code
Adapting the example code in Spond README:
import asyncio
from spond.spond import Spond
from spond_classes import Group
# fake credentials and ids
USERNAME = "my@mail.invalid"
PASSWORD = "Pa55worD"
SUBGROUP_ID = "SG1"
async def main():
s = Spond(username=USERNAME, password=PASSWORD)
groups_data = await s.get_groups()
await s.clientsession.close()
# Now we can create class instances from the data...
groups = Group.list_from_data(groups_data)
# ... use class attributes instead of dict keys ...
my_group = groups[0]
print(my_group.uid)
# ... access subordinate instances and their attributes ...
for member in my_group.members:
print(f"{member.full_name} is in the {my_group.name} group")
# ... and use some helper methods
subgroup = my_group.subgroup_by_uid(SUBGROUP_ID)
for member in my_group.members_by_subgroup(subgroup):
print(f"{member.full_name} is in the {subgroup.name} subgroup")
asyncio.run(main())
Documentation
Full API documentation is published at https://elliot-100.github.io/Spond-classes/ and
is also included as HTML in the package source docs folder.
Development
Build documentation:
uv run pdoc src/spond_classes -d numpy -t docs_templates -o docs
Metadata
Release files for spond-classes 0.21.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spond_classes-0.21.0.tar.gz | 19.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spond_classes-0.21.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.4 kB
Release files / spond_classes-0.21.0.tar.gz
| Download URL | spond_classes-0.21.0.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50840dfbd06bd7eeca08b3fc71a46bc504db8bb6ab4b15396f534fa34f4fdd06
|
|
BLAKE2b-256 checksum How to use checksums |
b34013a114445ead17d281986e8bd570b2bf5696dfdcc3657c73e2ca3afa3693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / spond_classes-0.21.0-py3-none-any.whl
| Download URL | spond_classes-0.21.0-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
626d1de7fd758327e9f01e72ee2806f67851f5cb09e7242563524b0f6d6d94dc
|
|
BLAKE2b-256 checksum How to use checksums |
029c6fb22708fdb6200bf5f20e9614716db149c4a5c8eab75bdd73bff03917ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|