{"id":17761899,"url":"https://github.com/elliot-100/spond-classes","last_synced_at":"2025-03-15T11:32:56.658Z","repository":{"id":65875601,"uuid":"596682456","full_name":"elliot-100/Spond-classes","owner":"elliot-100","description":"Provides a class abstraction layer for the `Spond` library package.","archived":false,"fork":false,"pushed_at":"2024-10-24T09:55:49.000Z","size":298,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T07:47:04.344Z","etag":null,"topics":["abstraction-layer","api-wrapper","classes","events","python","spond"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elliot-100.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-02T18:00:13.000Z","updated_at":"2024-10-24T09:55:52.000Z","dependencies_parsed_at":"2024-06-09T00:21:51.175Z","dependency_job_id":"70470bb9-1bb4-4446-b2a5-64faeaa78afd","html_url":"https://github.com/elliot-100/Spond-classes","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliot-100%2FSpond-classes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliot-100%2FSpond-classes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliot-100%2FSpond-classes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliot-100%2FSpond-classes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elliot-100","download_url":"https://codeload.github.com/elliot-100/Spond-classes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243725010,"owners_count":20337659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abstraction-layer","api-wrapper","classes","events","python","spond"],"created_at":"2024-10-26T19:48:06.872Z","updated_at":"2025-03-15T11:32:56.651Z","avatar_url":"https://github.com/elliot-100.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spond-classes\n\n## About\n\n[Spond](https://spond.com/welcome) is a team/group-oriented events system.\n\nThe unofficial Python [`spond` library package](https://github.com/Olen/Spond/) gets\ndata from the Spond API and returns `dict` objects.\n\nThis unofficial Python `spond-classes` library package parses those `dict` objects to\ncreate [Pydantic](https://docs.pydantic.dev/) class instances.\n\nPartial, read-only implementation.\n\n## Install\n\nInstall from PyPI, e.g:\n```shell\npip install spond-classes\n```\nOr if you're using Poetry:\n```shell\npoetry add spond-classes\n```\nNote that [`spond`](https://github.com/Olen/Spond/) is required for practical use, but not a technical dependency,\nso needs to be installed separately.\n\n\n## Example code\n\nAdapting the example code in [`Spond`](https://github.com/Olen/Spond/) README:\n\n```python\nimport asyncio\nfrom spond.spond import Spond\nfrom spond_classes import Group\n\n# fake credentials and ids\nUSERNAME = 'my@mail.invalid'\nPASSWORD = 'Pa55worD'\nGROUP_ID = 'G1'\nSUBGROUP_ID = 'SG1'\n\nasync def main():\n    s = Spond(username=USERNAME, password=PASSWORD)\n    group_data = await s.get_group(GROUP_ID)\n    await s.clientsession.close()\n\n    # Now we can create a class instance ...\n    group = Group.from_dict(group_data)\n\n    # ... use class attributes instead of dict keys ...\n    print(group.name)\n\n    # ... access subordinate instances and their attributes ...\n    for member in group.members:\n        print(f\"{member.full_name} is in the {group.name} group\")\n\n    # ... and use some helper methods\n    subgroup = group.subgroup_by_id(SUBGROUP_ID)\n    for member in group.members_by_subgroup(subgroup):\n        print(f\"{member.full_name} is in the {subgroup.name} subgroup\")\n\nasyncio.run(main())\n\n```\n## Documentation\n\nFull API documentation is published at https://elliot-100.github.io/Spond-classes/ and\nis also included as HTML in the package source `docs` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliot-100%2Fspond-classes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felliot-100%2Fspond-classes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliot-100%2Fspond-classes/lists"}