Python client for the AELF API (https://api.aelf.org/)
Project description
aelf-api-client
An unofficial Python client for interacting with the AELF API. This library provides an easy-to-use interface for fetching liturgical information from the AELF API.
Table of contents
Features
- Fetch liturgical information for a specific date and zone.
- Retrieve prayers such as
laudes,vepres,tierce,sexte, and more. - Built with
aiohttpfor asynchronous requests. - Validates API responses using
pydanticmodels.
Installation
Package is directly available from the Pypi repositories:
pip install aelf-api-client
Usage
Example: Fetch masses informations
from datetime import datetime
import asyncio
from aelf_api_client import AELFClient
from aelf_api_client.schemas.enums import ZonesEnum
async def main():
client = AELFClient()
date = datetime.now()
zone = ZonesEnum.FRANCE
# Fetch messes
messes = await client.request_messes(date, zone)
print(messes)
asyncio.run(main())
Available Methods:
The AELFClient provides the following methods:
request_informations(date: datetime, zone: ZonesEnum)-> InformationsResponseModelrequest_messes(date: datetime, zone: ZonesEnum)-> MessesResponseModelrequest_complies(date: datetime, zone: ZonesEnum)-> CompliesResponseModelrequest_laudes(date: datetime, zone: ZonesEnum)-> LaudesResponseModelrequest_lectures(date: datetime, zone: ZonesEnum)-> LecturesResponseModelrequest_none(date: datetime, zone: ZonesEnum)-> NoneResponseModelrequest_sexte(date: datetime, zone: ZonesEnum)-> SexteResponseModelrequest_tierce(date: datetime, zone: ZonesEnum)-> TierceResponseModelrequest_vepres(date: datetime, zone: ZonesEnum)-> VepresResponseModel
Each method fetches data for a specific liturgical endpoint and returns a validated response model.
Development
Setting Up the Local Environment
git clone git@github.com:thamin-i/aelf-api-client.git
cd aef-client
make install
Running Tests
Tests are written using pytest. To run the tests:
poetry run pytest
Code Formatting and Linting
This project uses ruff, isort, and pylint for formatting and linting. To check the code:
make format_code && make check_code
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Write tests for your changes.
- Run the tests to ensure everything works.
- Submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
- Pypi: Project
- Homepage: AELF Python Client
- Issues: https://github.com/thamin-i/aelf-api-client/issues
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 aelf_api_client-0.1.0.tar.gz.
File metadata
- Download URL: aelf_api_client-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.2 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f5cae3bd5b15641ca513552bfcb91130d644cee2d431ef752100440ed850eba
|
|
| MD5 |
aa8417e90005647d76c3d2209556d09f
|
|
| BLAKE2b-256 |
bd4f68cea12e17b533e1f169a1af56e25da834946f92697f38e3cc785764b76f
|
File details
Details for the file aelf_api_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aelf_api_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.2 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a184dcc04179374ffb78ed31cff2f840afa624349c6d7dd714a1ad01e28fc7be
|
|
| MD5 |
1df1c7c74b53f8d099318e8895ea2dac
|
|
| BLAKE2b-256 |
c192163d63de22c1d469a6238af259cb404e490f229a045e0b86a08b4d1508f5
|