Utilities¶
Error Handling¶
-
exception
fineract.exceptions.
BadArgsException
(status, data)[source]¶ Exception raised when a non-existing object is requested (when Fineract API replies with a 400 HTML status)
-
exception
fineract.exceptions.
BadCredentialsException
(status, data)[source]¶ Exception raised in case of bad credentials (when Fineract API replies with a 401 or 403 HTML status)
-
exception
fineract.exceptions.
FineractException
(status, data)[source]¶ Error handling in PyFineract is done with exceptions. This class is the base of all exceptions raised by PyFineract (but
fineract.exceptions.BadAttributeException
). Some other types of exceptions might be raised by underlying libraries, for example for network-related issues.-
data
¶ The (decoded) data returned by the Fineract API
-
status
¶ The status returned by the Fineract API
-
Pagination¶
-
class
fineract.pagination.
PaginatedList
(klass, request_handler, url, params, list_item='pageItems', page=1)[source]¶ This class represents a paginated list of items fetched from a Fineract API
Parameters: - klass – Child class of a
fineract.objects.fineract_object.FineractObject
- request_handler –
fineract.handlers.RequestHandler
- url – Endpoint to be called
- params – dict Extra payload to pass during the call
- list_item – Response field holding the items
- page – int Page to return
-
total_count
¶ Returns total count of items
-
total_pages
¶ Return total pages
- klass – Child class of a