Skip to main content

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 aiohttp for asynchronous requests.
  • Validates API responses using pydantic models.

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) -> InformationsResponseModel
  • request_messes(date: datetime, zone: ZonesEnum) -> MessesResponseModel
  • request_complies(date: datetime, zone: ZonesEnum) -> CompliesResponseModel
  • request_laudes(date: datetime, zone: ZonesEnum) -> LaudesResponseModel
  • request_lectures(date: datetime, zone: ZonesEnum) -> LecturesResponseModel
  • request_none(date: datetime, zone: ZonesEnum) -> NoneResponseModel
  • request_sexte(date: datetime, zone: ZonesEnum) -> SexteResponseModel
  • request_tierce(date: datetime, zone: ZonesEnum) -> TierceResponseModel
  • request_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:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Write tests for your changes.
  4. Run the tests to ensure everything works.
  5. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aelf_api_client-0.1.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aelf_api_client-0.1.1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file aelf_api_client-0.1.1.tar.gz.

File metadata

  • Download URL: aelf_api_client-0.1.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Linux/6.8.0-1021-azure

File hashes

Hashes for aelf_api_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b814794e7763e342a71b4d90dcb3aead92bc4128f965fd46bf735e7285867c65
MD5 a0aec7b45fd3f610014d716863687030
BLAKE2b-256 6894a17f9b0bb9a9ee6bcc75b4c84ca32989e93a15d71d0e9732c2de164b5756

See more details on using hashes here.

File details

Details for the file aelf_api_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aelf_api_client-0.1.1-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.3 Linux/6.8.0-1021-azure

File hashes

Hashes for aelf_api_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25e2e8b125662f2f84c116333a954cae8191b3f174427e3e16a71304562d8f67
MD5 e6a15d224b88287943d737ee0345e5b3
BLAKE2b-256 b666b712e458eee8ed7b7bdf0d481f4ca84674b44fbfda9e64ebfc4cfad36a11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page