Skip to content

amaurylekens/Spond

This branch is 2 commits ahead of, 205 commits behind Olen/Spond:main.

Folders and files

NameName
Last commit message
Last commit date
Dec 17, 2020
Oct 21, 2022
Jun 30, 2022
Mar 14, 2022
Oct 13, 2022
Oct 7, 2022
Dec 17, 2020
Sep 28, 2022
Sep 28, 2022
Apr 30, 2022
Oct 5, 2022

Repository files navigation

Spond

spond logo

Simple, unofficial library with some example scripts to access data from the Spond API.

Install

pip install spond

Usage

You need a username and password from Spond

Example code

import asyncio
from spond import spond

username = 'my@mail.invalid'
password = 'Pa55worD'

async def main():
    s = spond.Spond(username=username, password=password)
    groups = await s.get_groups()
    for group in groups:
        print(group['name'])
    await s.clientsession.close()


loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Key methods

get_groups()

Get details of all your group memberships and all members of those groups.

get_events([group_id, include_scheduled, max_end, min_end, max_start, min_start, max_events])

) Get details of events, limited to 100 by default. Optional parameters allow filtering by start and end datetimes, group; more events to be returned; inclusion of 'scheduled' events.

get_person()

Get a member's details.

get_messages()

Get all your messages.

send_message(recipient, text)

Send a message with content text in a specific chat with id chatId.

Example scripts

The following scripts are included as examples. Some of the scripts might require additional packages to be installed (csv, ical etc).

Rename the file config.py.sample to config.py and add your username and password to the file before running the samples.

ical.py

Generates an ics-file of upcoming events.

groups.py

Generates a json-file for each group you are a member of.

attendance.py <-f from_date> <-t to_date> [-a]

Generates a csv-file for each event between from_date and to_date with attendance status of all organizers. The optional parameter -a also includes all members that has been invited.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%