python_flutterwave package

Subpackages

Submodules

python_flutterwave.decorators module

python_flutterwave.decorators.handle_api_exceptions(func)[source]

Raise exceptions whenever necessary

python_flutterwave.decorators.require_token(func)[source]

Ascertain existence of the auth token

python_flutterwave.exceptions module

exception python_flutterwave.exceptions.FlutterwaveAPIException[source]

Bases: Exception

exception python_flutterwave.exceptions.TokenException(token, message)[source]

Bases: FlutterwaveAPIException

python_flutterwave.objects module

class python_flutterwave.objects.ChargeData(currency: str, token: str, country: str, amount: int, email: str, tx_ref: str)[source]

Bases: object

Object containing your charge data

Args:

currency (str): Currency to charge in token (str): Token id obtained country (str): Country Code amount (int): Charge Amount email (str): Customer Email tx_ref (str): Unique ref

amount: int
country: str
currency: str
email: str
token: str
tx_ref: str
class python_flutterwave.objects.RetryStrategy(retry_interval: int, retry_amount_variable: int, retry_attempt_variable: int, last_retry_attempt: int = 10)[source]

Bases: object

This object defines retries for failed tokenization attempts.

Args:

retry_interval (int): Number in minutes for the next retry attempt. retry_amount_variable (int): Amount to be retried after the specified number of attempts in percentage. retry_attempt_variable (int): Number of retries to make after the initial tokenization attempt. last_retry_attempt (int): Maximum number of retries to attempt. If unspecified, It is set to 10 by default.

last_retry_attempt: int = 10
retry_amount_variable: int
retry_attempt_variable: int
retry_interval: int

Module contents

Wrapper around Flutterwave Payments API