pluxee package
Submodules
pluxee.base_pluxee_client module
- class pluxee.base_pluxee_client.PassType(value)[source]
Bases:
str,EnumThe different types of pass that are provided.
- CONSO = 'CONSO'
- ECO = 'ECO'
- GIFT = 'GIFT'
- LUNCH = 'LUNCH'
pluxee.exceptions module
pluxee.pluxee_async_client module
- class pluxee.pluxee_async_client.PluxeeAsyncClient(username: str, password: str, language: str = 'fr', session: ClientSession | None = None, timeout: int = 30)[source]
Bases:
_PluxeeClientAn asynchronous client providing information about you Pluxee balance and transactions.
- Parameters:
username – The pluxee username.
password – The pluxee password.
language – The pluxee website language (either ‘fr’ or ‘nl’, defaults to ‘fr’).
timeout – Request timeout in seconds (defaults to 30).
- Attrs:
username: The pluxee username. password: The pluxee password. language: The pluxee website language (either ‘fr’ or ‘nl’, defaults to ‘fr’).
- async get_balance() PluxeeBalance[source]
Retrieve the balance of each pass type.
- Raises:
PluxeeAPIError – If Pluxee webpage did not respond with the expected status or do not contain the expected information.
PluxeeLoginError – If an error occurred with the login process.
- Returns:
The balance.
- Return type:
- async get_transactions(pass_type: PassType, since: date | None = None, until: date | None = None) List[PluxeeTransaction][source]
Retrieve the transactions of the requested pass type in the given interval.
- Parameters:
pass_type – The type of the pass for which to retrieve the transactions.
since – The start of the interval (inclusive). Only transactions on or after this date are returned.
until – The end of the interval (exclusive). Only transactions before this date are returned.
- Raises:
PluxeeAPIError – If Pluxee webpage did not respond with the expected status or do not contain the expected information.
PluxeeLoginError – If an error occurred with the login process.
- Returns:
The transactions with the oldest elements first.
- Return type:
List[PluxeeTransaction]
pluxee.pluxee_client module
- class pluxee.pluxee_client.PluxeeClient(username: str, password: str, language: str = 'fr', session: Session | None = None, timeout: int = 30)[source]
Bases:
_PluxeeClientA synchronous client providing information about you Pluxee balance and transactions.
- Parameters:
username – The pluxee username.
password – The pluxee password.
language – The pluxee website language (either ‘fr’ or ‘nl’, defaults to ‘fr’).
timeout – Request timeout in seconds (defaults to 30).
- Attrs:
username: The pluxee username. password: The pluxee password. language: The pluxee website language (either ‘fr’ or ‘nl’, defaults to ‘fr’).
- get_balance() PluxeeBalance[source]
Retrieve the balance of each pass type.
- Raises:
PluxeeAPIError – If Pluxee webpage did not respond with the expected status or do not contain the expected information.
PluxeeLoginError – If an error occurred with the login process.
- Returns:
The balance.
- Return type:
- get_transactions(pass_type: PassType, since: date | None = None, until: date | None = None) List[PluxeeTransaction][source]
Retrieve the transactions of the requested pass type in the given interval.
- Parameters:
pass_type – The type of the pass for which to retrieve the transactions.
since – The start of the interval (inclusive). Only transactions on or after this date are returned.
until – The end of the interval (exclusive). Only transactions before this date are returned.
- Raises:
PluxeeAPIError – If Pluxee webpage did not respond with the expected status or do not contain the expected information.
PluxeeLoginError – If an error occurred with the login process.
- Returns:
The transactions with the oldest elements first.
- Return type:
List[PluxeeTransaction]