A way to retrieve information about members from the ForeningLet API (www.foreninglet.dk) - ForeningLet is a member system for small (typically) voluntary organizations in Denmark
Project description
foreninglet-data
Python module for generalising access to the ForeningLet (www.foreninglet.dk) member system API
Current functionality
The project is work in progress. As of now, calling the ForeningLet API has been generalised, and the memberlist can be retrieved.
A memberlist object can be genereated, and so far has functionality to count the members, and genders.
Installation
For now this code can be pip installed by referring to the get repo:
python -m pip install git+https://github.com/simcax/foreninglet-data
Compulsory Settings
Export settings as environment variables:
API_USERNAME=username
API_PASSWORD=password
API_BASE_URL=https://foreninglet.dk/api/
API_VERSION=version=1
API_MEMBERS_API=members
API_ACTIVITIES_API=activities
Usage
Then import:
from foreninglet_data.api import ForeningLet
from foreninglet_data.memberlist import Memberlist
And get the memberlist:
fl_obj = ForeningLet()
memberlist = fl_obj.get_memberlist()
memberlist_obj = Memberlist(memberlist)
Retrieve the membercount:
memberlist.member_count
Retrieve the count of genders:
memberlist.count_men
memberlist.count_women
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
Hashes for foreninglet_data-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0530d3cada0ce233e8906428b6e7b4adcd994cffc6fb5a2a7ed20c293474c1a9 |
|
MD5 | 1fb7836191e4d6f1782ad1f5f45576ff |
|
BLAKE2b-256 | 978cea4865b860745978b7f0dc92fd6e39246538b42ced085565a1417f66e5de |