pluxee package

Submodules

pluxee.base_pluxee_client module

class pluxee.base_pluxee_client.PassType(value)[source]

Bases: str, Enum

The different types of pass that are provided.

CONSO = 'CONSO'
ECO = 'ECO'
GIFT = 'GIFT'
LUNCH = 'LUNCH'
class pluxee.base_pluxee_client.PluxeeBalance(lunch_pass: float, eco_pass: float, gift_pass: float, conso_pass: float)[source]

Bases: object

The balance of each pass.

class pluxee.base_pluxee_client.PluxeeTransaction(date: date, amount: float, detail: str, merchant: str)[source]

Bases: object

A payment or the reception of your pass.

pluxee.exceptions module

exception pluxee.exceptions.PluxeeAPIError[source]

Bases: Exception

Pluxee webpage did not respond with the expected status or do not contain the expected information.

exception pluxee.exceptions.PluxeeLoginError[source]

Bases: Exception

An error occured with the login process.

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: _PluxeeClient

An 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:

PluxeeBalance

async get_ssl_context(url: str, executor=None) SSLContext[source]
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: _PluxeeClient

A 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’).

class TemporaryPEMFile(aia_session: AIASession, url: str)[source]

Bases: object

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:

PluxeeBalance

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]

Module contents