Main class: Fineract

class fineract.main.Fineract(username=None, password=None, tenant='default', base_url='https://localhost/fineract-provider/api/v1', timeout=15, per_page=30, debug=False, ssl_check=True)[source]

Provide a Fineract object

Parameters:
  • per_page – int Number of items per page
  • debug – bool Enable debug mode
  • ssl_check – bool Verify ssl certs
  • username – str Fineract Username
  • password – str Fineract Password
  • tenant – str Fineract Tenant
  • base_url – string Fineract base url
  • timeout – int Request timeout
get_charges(id=None)[source]

Returns a charge with a matching id or all charges

:calls GET /charges/<id>

Parameters:id – Charge id
Return type:fineract.objects.org.Charge or fineract.pagination.PaginatedList of fineract.objects.org.Charge
get_client(id, **kwargs)[source]

Returns a client with id

:calls GET /clients/<id>

Parameters:id – int Client id
Return type:fineract.objects.client.Client
get_clients(**kwargs)[source]

Returns all clients

:calls GET /clients

Return type:fineract.pagination.PaginatedList of fineract.objects.client.Client
get_funds(id=None)[source]

“Returns a fund with a matching id or all funds

:calls GET /funds/<id>

Parameters:id – Charge id
Return type:fineract.objects.org.Fund or fineract.pagination.PaginatedList of fineract.objects.org.Fund
get_group(id, **kwargs)[source]

Returns a group with id

:calls GET /groups/<id>

Parameters:id – int Group id
Return type:fineract.objects.group.Group
get_groups(**kwargs)[source]

Returns all groups

:calls GET /groups

Return type:fineract.pagination.PaginatedList of fineract.objects.group.Group
get_hooks(id=None)[source]

Returns an office with a matching id or all offices

:calls GET /hooks/<id>

Parameters:id – Office id
Return type:fineract.objects.hook.Hook or fineract.pagination.PaginatedList of fineract.objects.hook.Hook
get_loan(id, **kwargs)[source]

Returns a loan with matching id

:calls GET /loans/<id>

Parameters:id – int Loan id
Return type:fineract.objects.loan.Loan
get_loan_product(id, **kwargs)[source]

Return a loan product with matching id

:calls GET /loanproducts/<id>

Parameters:id – int Loan Product id
Return type:fineract.objects.loan_product.LoanProduct
get_loan_products(**kwargs)[source]

Returns all loan products

:calls GET /loanproducts

Return type:fineract.pagination.PaginatedList of fineract.objects.loan_product.LoanProduct
get_loans(**kwargs)[source]

Return all loans

:calls GET /loans

Return type:fineract.pagination.PaginatedList of fineract.objects.loan.Loan
get_offices(id=None)[source]

Returns an office with a matching id or all offices

:calls GET /offices/<id>

Parameters:id – Office id
Return type:fineract.objects.org.Office or fineract.pagination.PaginatedList of fineract.objects.org.Office
get_reports(id=None)[source]

Returns an office with a matching id or all offices

:calls GET /reports/<id>

Parameters:id – Office id
Return type:fineract.objects.report.Report or fineract.pagination.PaginatedList of fineract.objects.report.Report
get_roles()[source]

Returns all roles

:calls GET /roles

Return type:fineract.pagination.PaginatedList of fineract.objects.role.Role
get_savings_account(id, **kwargs)[source]

Returns a savings account with matching id

:calls GET /savingsaccounts/<id>

Parameters:id – int Savings account id
Return type:fineract.objects.savings.Savings
get_savings_accounts(**kwargs)[source]

Return all savings accounts

:calls GET /loans

Return type:fineract.pagination.PaginatedList of fineract.objects.savings.Savings
get_staff(id=None)[source]

Returns a stuff with a matching id or all staff

:calls GET /staff/<id>

Parameters:id – Staff id
Return type:fineract.objects.staff.Staff or fineract.pagination.PaginatedList of fineract.objects.org.Staff
get_users(id=None)[source]

Returns an user with a matching id or all users

:calls GET /users/<id>

Parameters:id – User id
Return type:fineract.objects.user.User or fineract.pagination.PaginatedList of fineract.objects.user.User
raw_request(method, url, **kwargs)[source]

Make a raw request to the Fineract API

Parameters:
  • method – request method
  • url – endpoint
  • kwargs
Returns:

Returns dict/list object

request_handler

fineract.handlers.RequestHandler

templates(template, extra=None, params=None)[source]

Retrieve a template :param template: template name :param extra: :return: