Skip to content

Python client for Firefly III API. Please read .generator/Readme.md

Notifications You must be signed in to change notification settings

ms32035/firefly-iii-client

Repository files navigation

Firefly III API Client

This is the Python client for Firefly III API

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.12
  • Package version: 2.0.12.0
  • Generator version: 7.4.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://firefly-iii.org

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install Firefly-III-API-Client

(you may need to run pip with root permission: sudo pip install Firefly-III-API-Client)

Then import the package:

import firefly_iii_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import firefly_iii_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import firefly_iii_client
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.AboutApi(api_client)
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # System information end point.
        api_response = api_instance.get_about(x_trace_id=x_trace_id)
        print("The response of AboutApi->get_about:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AboutApi->get_about: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://demo.firefly-iii.org/api

Class Method HTTP request Description
AboutApi get_about GET /v1/about System information end point.
AboutApi get_cron GET /v1/cron/{cliToken} Cron job endpoint
AboutApi get_current_user GET /v1/about/user Currently authenticated user endpoint.
AccountsApi delete_account DELETE /v1/accounts/{id} Permanently delete account.
AccountsApi get_account GET /v1/accounts/{id} Get single account.
AccountsApi list_account GET /v1/accounts List all accounts.
AccountsApi list_attachment_by_account GET /v1/accounts/{id}/attachments Lists all attachments.
AccountsApi list_piggy_bank_by_account GET /v1/accounts/{id}/piggy-banks List all piggy banks related to the account.
AccountsApi list_transaction_by_account GET /v1/accounts/{id}/transactions List all transactions related to the account.
AccountsApi store_account POST /v1/accounts Create new account.
AccountsApi update_account PUT /v1/accounts/{id} Update existing account.
AttachmentsApi delete_attachment DELETE /v1/attachments/{id} Delete an attachment.
AttachmentsApi download_attachment GET /v1/attachments/{id}/download Download a single attachment.
AttachmentsApi get_attachment GET /v1/attachments/{id} Get a single attachment.
AttachmentsApi list_attachment GET /v1/attachments List all attachments.
AttachmentsApi store_attachment POST /v1/attachments Store a new attachment.
AttachmentsApi update_attachment PUT /v1/attachments/{id} Update existing attachment.
AttachmentsApi upload_attachment POST /v1/attachments/{id}/upload Upload an attachment.
AutocompleteApi get_accounts_ac GET /v1/autocomplete/accounts Returns all accounts of the user returned in a basic auto-complete array.
AutocompleteApi get_bills_ac GET /v1/autocomplete/bills Returns all bills of the user returned in a basic auto-complete array.
AutocompleteApi get_budgets_ac GET /v1/autocomplete/budgets Returns all budgets of the user returned in a basic auto-complete array.
AutocompleteApi get_categories_ac GET /v1/autocomplete/categories Returns all categories of the user returned in a basic auto-complete array.
AutocompleteApi get_currencies_ac GET /v1/autocomplete/currencies Returns all currencies of the user returned in a basic auto-complete array.
AutocompleteApi get_currencies_code_ac GET /v1/autocomplete/currencies-with-code Returns all currencies of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
AutocompleteApi get_object_groups_ac GET /v1/autocomplete/object-groups Returns all object groups of the user returned in a basic auto-complete array.
AutocompleteApi get_piggies_ac GET /v1/autocomplete/piggy-banks Returns all piggy banks of the user returned in a basic auto-complete array.
AutocompleteApi get_piggies_balance_ac GET /v1/autocomplete/piggy-banks-with-balance Returns all piggy banks of the user returned in a basic auto-complete array complemented with balance information.
AutocompleteApi get_recurring_ac GET /v1/autocomplete/recurring Returns all recurring transactions of the user returned in a basic auto-complete array.
AutocompleteApi get_rule_groups_ac GET /v1/autocomplete/rule-groups Returns all rule groups of the user returned in a basic auto-complete array.
AutocompleteApi get_rules_ac GET /v1/autocomplete/rules Returns all rules of the user returned in a basic auto-complete array.
AutocompleteApi get_tag_ac GET /v1/autocomplete/tags Returns all tags of the user returned in a basic auto-complete array.
AutocompleteApi get_transaction_types_ac GET /v1/autocomplete/transaction-types Returns all transaction types returned in a basic auto-complete array. English only.
AutocompleteApi get_transactions_ac GET /v1/autocomplete/transactions Returns all transaction descriptions of the user returned in a basic auto-complete array.
AutocompleteApi get_transactions_idac GET /v1/autocomplete/transactions-with-id Returns all transactions, complemented with their ID, of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
AvailableBudgetsApi get_available_budget GET /v1/available-budgets/{id} Get a single available budget.
AvailableBudgetsApi list_available_budget GET /v1/available-budgets List all available budget amounts.
BillsApi delete_bill DELETE /v1/bills/{id} Delete a bill.
BillsApi get_bill GET /v1/bills/{id} Get a single bill.
BillsApi list_attachment_by_bill GET /v1/bills/{id}/attachments List all attachments uploaded to the bill.
BillsApi list_bill GET /v1/bills List all bills.
BillsApi list_rule_by_bill GET /v1/bills/{id}/rules List all rules associated with the bill.
BillsApi list_transaction_by_bill GET /v1/bills/{id}/transactions List all transactions associated with the bill.
BillsApi store_bill POST /v1/bills Store a new bill
BillsApi update_bill PUT /v1/bills/{id} Update existing bill.
BudgetsApi delete_budget DELETE /v1/budgets/{id} Delete a budget.
BudgetsApi delete_budget_limit DELETE /v1/budgets/{id}/limits/{limitId} Delete a budget limit.
BudgetsApi get_budget GET /v1/budgets/{id} Get a single budget.
BudgetsApi get_budget_limit GET /v1/budgets/{id}/limits/{limitId} Get single budget limit.
BudgetsApi list_attachment_by_budget GET /v1/budgets/{id}/attachments Lists all attachments of a budget.
BudgetsApi list_budget GET /v1/budgets List all budgets.
BudgetsApi list_budget_limit GET /v1/budget-limits Get list of budget limits by date
BudgetsApi list_budget_limit_by_budget GET /v1/budgets/{id}/limits Get all limits for a budget.
BudgetsApi list_transaction_by_budget GET /v1/budgets/{id}/transactions All transactions to a budget.
BudgetsApi list_transaction_by_budget_limit GET /v1/budgets/{id}/limits/{limitId}/transactions List all transactions by a budget limit ID.
BudgetsApi store_budget POST /v1/budgets Store a new budget
BudgetsApi store_budget_limit POST /v1/budgets/{id}/limits Store new budget limit.
BudgetsApi update_budget PUT /v1/budgets/{id} Update existing budget.
BudgetsApi update_budget_limit PUT /v1/budgets/{id}/limits/{limitId} Update existing budget limit.
CategoriesApi delete_category DELETE /v1/categories/{id} Delete a category.
CategoriesApi get_category GET /v1/categories/{id} Get a single category.
CategoriesApi list_attachment_by_category GET /v1/categories/{id}/attachments Lists all attachments.
CategoriesApi list_category GET /v1/categories List all categories.
CategoriesApi list_transaction_by_category GET /v1/categories/{id}/transactions List all transactions in a category.
CategoriesApi store_category POST /v1/categories Store a new category
CategoriesApi update_category PUT /v1/categories/{id} Update existing category.
ChartsApi get_chart_account_overview GET /v1/chart/account/overview Dashboard chart with asset account balance information.
ConfigurationApi get_configuration GET /v1/configuration Get Firefly III system configuration values.
ConfigurationApi get_single_configuration GET /v1/configuration/{name} Get a single Firefly III system configuration value
ConfigurationApi set_configuration PUT /v1/configuration/{name} Update configuration value
CurrenciesApi default_currency POST /v1/currencies/{code}/default Make currency default currency.
CurrenciesApi delete_currency DELETE /v1/currencies/{code} Delete a currency.
CurrenciesApi disable_currency POST /v1/currencies/{code}/disable Disable a currency.
CurrenciesApi enable_currency POST /v1/currencies/{code}/enable Enable a single currency.
CurrenciesApi get_currency GET /v1/currencies/{code} Get a single currency.
CurrenciesApi get_default_currency GET /v1/currencies/default Get the user's default currency.
CurrenciesApi list_account_by_currency GET /v1/currencies/{code}/accounts List all accounts with this currency.
CurrenciesApi list_available_budget_by_currency GET /v1/currencies/{code}/available-budgets List all available budgets with this currency.
CurrenciesApi list_bill_by_currency GET /v1/currencies/{code}/bills List all bills with this currency.
CurrenciesApi list_budget_limit_by_currency GET /v1/currencies/{code}/budget_limits List all budget limits with this currency
CurrenciesApi list_currency GET /v1/currencies List all currencies.
CurrenciesApi list_recurrence_by_currency GET /v1/currencies/{code}/recurrences List all recurring transactions with this currency.
CurrenciesApi list_rule_by_currency GET /v1/currencies/{code}/rules List all rules with this currency.
CurrenciesApi list_transaction_by_currency GET /v1/currencies/{code}/transactions List all transactions with this currency.
CurrenciesApi store_currency POST /v1/currencies Store a new currency
CurrenciesApi update_currency PUT /v1/currencies/{code} Update existing currency.
DataApi bulk_update_transactions POST /v1/data/bulk/transactions Bulk update transaction properties. For more information, see https://docs.firefly-iii.org/references/firefly-iii/api/specials/
DataApi destroy_data DELETE /v1/data/destroy Endpoint to destroy user data
DataApi export_accounts GET /v1/data/export/accounts Export account data from Firefly III
DataApi export_bills GET /v1/data/export/bills Export bills from Firefly III
DataApi export_budgets GET /v1/data/export/budgets Export budgets and budget amount data from Firefly III
DataApi export_categories GET /v1/data/export/categories Export category data from Firefly III
DataApi export_piggies GET /v1/data/export/piggy-banks Export piggy banks from Firefly III
DataApi export_recurring GET /v1/data/export/recurring Export recurring transaction data from Firefly III
DataApi export_rules GET /v1/data/export/rules Export rule groups and rule data from Firefly III
DataApi export_tags GET /v1/data/export/tags Export tag data from Firefly III
DataApi export_transactions GET /v1/data/export/transactions Export transaction data from Firefly III
DataApi purge_data DELETE /v1/data/purge Endpoint to purge user data
InsightApi insight_expense_asset GET /v1/insight/expense/asset Insight into expenses, grouped by asset account.
InsightApi insight_expense_bill GET /v1/insight/expense/bill Insight into expenses, grouped by bill.
InsightApi insight_expense_budget GET /v1/insight/expense/budget Insight into expenses, grouped by budget.
InsightApi insight_expense_category GET /v1/insight/expense/category Insight into expenses, grouped by category.
InsightApi insight_expense_expense GET /v1/insight/expense/expense Insight into expenses, grouped by expense account.
InsightApi insight_expense_no_bill GET /v1/insight/expense/no-bill Insight into expenses, without bill.
InsightApi insight_expense_no_budget GET /v1/insight/expense/no-budget Insight into expenses, without budget.
InsightApi insight_expense_no_category GET /v1/insight/expense/no-category Insight into expenses, without category.
InsightApi insight_expense_no_tag GET /v1/insight/expense/no-tag Insight into expenses, without tag.
InsightApi insight_expense_tag GET /v1/insight/expense/tag Insight into expenses, grouped by tag.
InsightApi insight_expense_total GET /v1/insight/expense/total Insight into total expenses.
InsightApi insight_income_asset GET /v1/insight/income/asset Insight into income, grouped by asset account.
InsightApi insight_income_category GET /v1/insight/income/category Insight into income, grouped by category.
InsightApi insight_income_no_category GET /v1/insight/income/no-category Insight into income, without category.
InsightApi insight_income_no_tag GET /v1/insight/income/no-tag Insight into income, without tag.
InsightApi insight_income_revenue GET /v1/insight/income/revenue Insight into income, grouped by revenue account.
InsightApi insight_income_tag GET /v1/insight/income/tag Insight into income, grouped by tag.
InsightApi insight_income_total GET /v1/insight/income/total Insight into total income.
InsightApi insight_transfer_category GET /v1/insight/transfer/category Insight into transfers, grouped by category.
InsightApi insight_transfer_no_category GET /v1/insight/transfer/no-category Insight into transfers, without category.
InsightApi insight_transfer_no_tag GET /v1/insight/transfer/no-tag Insight into expenses, without tag.
InsightApi insight_transfer_tag GET /v1/insight/transfer/tag Insight into transfers, grouped by tag.
InsightApi insight_transfer_total GET /v1/insight/transfer/total Insight into total transfers.
InsightApi insight_transfers GET /v1/insight/transfer/asset Insight into transfers, grouped by account.
LinksApi delete_link_type DELETE /v1/link-types/{id} Permanently delete link type.
LinksApi delete_transaction_link DELETE /v1/transaction-links/{id} Permanently delete link between transactions.
LinksApi get_link_type GET /v1/link-types/{id} Get single a link type.
LinksApi get_transaction_link GET /v1/transaction-links/{id} Get a single link.
LinksApi list_link_type GET /v1/link-types List all types of links.
LinksApi list_transaction_by_link_type GET /v1/link-types/{id}/transactions List all transactions under this link type.
LinksApi list_transaction_link GET /v1/transaction-links List all transaction links.
LinksApi store_link_type POST /v1/link-types Create a new link type
LinksApi store_transaction_link POST /v1/transaction-links Create a new link between transactions
LinksApi update_link_type PUT /v1/link-types/{id} Update existing link type.
LinksApi update_transaction_link PUT /v1/transaction-links/{id} Update an existing link between transactions.
ObjectGroupsApi delete_object_group DELETE /v1/object-groups/{id} Delete a object group.
ObjectGroupsApi get_object_group GET /v1/object-groups/{id} Get a single object group.
ObjectGroupsApi list_bill_by_object_group GET /v1/object-groups/{id}/bills List all bills with this object group.
ObjectGroupsApi list_object_groups GET /v1/object-groups List all oject groups.
ObjectGroupsApi list_piggy_bank_by_object_group GET /v1/object-groups/{id}/piggy-banks List all piggy banks related to the object group.
ObjectGroupsApi update_object_group PUT /v1/object-groups/{id} Update existing object group.
PiggyBanksApi delete_piggy_bank DELETE /v1/piggy-banks/{id} Delete a piggy bank.
PiggyBanksApi get_piggy_bank GET /v1/piggy-banks/{id} Get a single piggy bank.
PiggyBanksApi list_attachment_by_piggy_bank GET /v1/piggy-banks/{id}/attachments Lists all attachments.
PiggyBanksApi list_event_by_piggy_bank GET /v1/piggy-banks/{id}/events List all events linked to a piggy bank.
PiggyBanksApi list_piggy_bank GET /v1/piggy-banks List all piggy banks.
PiggyBanksApi store_piggy_bank POST /v1/piggy-banks Store a new piggy bank
PiggyBanksApi update_piggy_bank PUT /v1/piggy-banks/{id} Update existing piggy bank.
PreferencesApi get_preference GET /v1/preferences/{name} Return a single preference.
PreferencesApi list_preference GET /v1/preferences List all users preferences.
PreferencesApi store_preference POST /v1/preferences Store a new preference for this user.
PreferencesApi update_preference PUT /v1/preferences/{name} Update preference
RecurrencesApi delete_recurrence DELETE /v1/recurrences/{id} Delete a recurring transaction.
RecurrencesApi get_recurrence GET /v1/recurrences/{id} Get a single recurring transaction.
RecurrencesApi list_recurrence GET /v1/recurrences List all recurring transactions.
RecurrencesApi list_transaction_by_recurrence GET /v1/recurrences/{id}/transactions List all transactions created by a recurring transaction.
RecurrencesApi store_recurrence POST /v1/recurrences Store a new recurring transaction
RecurrencesApi update_recurrence PUT /v1/recurrences/{id} Update existing recurring transaction.
RuleGroupsApi delete_rule_group DELETE /v1/rule-groups/{id} Delete a rule group.
RuleGroupsApi fire_rule_group POST /v1/rule-groups/{id}/trigger Fire the rule group on your transactions.
RuleGroupsApi get_rule_group GET /v1/rule-groups/{id} Get a single rule group.
RuleGroupsApi list_rule_by_group GET /v1/rule-groups/{id}/rules List rules in this rule group.
RuleGroupsApi list_rule_group GET /v1/rule-groups List all rule groups.
RuleGroupsApi store_rule_group POST /v1/rule-groups Store a new rule group.
RuleGroupsApi test_rule_group GET /v1/rule-groups/{id}/test Test which transactions would be hit by the rule group. No changes will be made.
RuleGroupsApi update_rule_group PUT /v1/rule-groups/{id} Update existing rule group.
RulesApi delete_rule DELETE /v1/rules/{id} Delete an rule.
RulesApi fire_rule POST /v1/rules/{id}/trigger Fire the rule on your transactions.
RulesApi get_rule GET /v1/rules/{id} Get a single rule.
RulesApi list_rule GET /v1/rules List all rules.
RulesApi store_rule POST /v1/rules Store a new rule
RulesApi test_rule GET /v1/rules/{id}/test Test which transactions would be hit by the rule. No changes will be made.
RulesApi update_rule PUT /v1/rules/{id} Update existing rule.
SearchApi search_accounts GET /v1/search/accounts Search for accounts
SearchApi search_transactions GET /v1/search/transactions Search for transactions
SummaryApi get_basic_summary GET /v1/summary/basic Returns basic sums of the users data.
TagsApi delete_tag DELETE /v1/tags/{tag} Delete an tag.
TagsApi get_tag GET /v1/tags/{tag} Get a single tag.
TagsApi list_attachment_by_tag GET /v1/tags/{tag}/attachments Lists all attachments.
TagsApi list_tag GET /v1/tags List all tags.
TagsApi list_transaction_by_tag GET /v1/tags/{tag}/transactions List all transactions with this tag.
TagsApi store_tag POST /v1/tags Store a new tag
TagsApi update_tag PUT /v1/tags/{tag} Update existing tag.
TransactionsApi delete_transaction DELETE /v1/transactions/{id} Delete a transaction.
TransactionsApi delete_transaction_journal DELETE /v1/transaction-journals/{id} Delete split from transaction
TransactionsApi get_transaction GET /v1/transactions/{id} Get a single transaction.
TransactionsApi get_transaction_by_journal GET /v1/transaction-journals/{id} Get a single transaction, based on one of the underlying transaction journals (transaction splits).
TransactionsApi list_attachment_by_transaction GET /v1/transactions/{id}/attachments Lists all attachments.
TransactionsApi list_event_by_transaction GET /v1/transactions/{id}/piggy-bank-events Lists all piggy bank events.
TransactionsApi list_links_by_journal GET /v1/transaction-journals/{id}/links Lists all the transaction links for an individual journal (individual split).
TransactionsApi list_transaction GET /v1/transactions List all the user's transactions.
TransactionsApi store_transaction POST /v1/transactions Store a new transaction
TransactionsApi update_transaction PUT /v1/transactions/{id} Update existing transaction. For more information, see https://docs.firefly-iii.org/references/firefly-iii/api/specials/
UsersApi delete_user DELETE /v1/users/{id} Delete a user.
UsersApi get_user GET /v1/users/{id} Get a single user.
UsersApi list_user GET /v1/users List all users.
UsersApi store_user POST /v1/users Store a new user
UsersApi update_user PUT /v1/users/{id} Update an existing user's information.
WebhooksApi delete_webhook DELETE /v1/webhooks/{id} Delete a webhook.
WebhooksApi delete_webhook_message DELETE /v1/webhooks/{id}/messages/{messageId} Delete a webhook message.
WebhooksApi delete_webhook_message_attempt DELETE /v1/webhooks/{id}/messages/{messageId}/attempts/{attemptId} Delete a webhook attempt.
WebhooksApi get_single_webhook_message GET /v1/webhooks/{id}/messages/{messageId} Get a single message from a webhook.
WebhooksApi get_single_webhook_message_attempt GET /v1/webhooks/{id}/messages/{messageId}/attempts/{attemptId} Get a single failed attempt from a single webhook message.
WebhooksApi get_webhook GET /v1/webhooks/{id} Get a single webhook.
WebhooksApi get_webhook_message_attempts GET /v1/webhooks/{id}/messages/{messageId}/attempts Get all the failed attempts of a single webhook message.
WebhooksApi get_webhook_messages GET /v1/webhooks/{id}/messages Get all the messages of a single webhook.
WebhooksApi list_webhook GET /v1/webhooks List all webhooks.
WebhooksApi store_webhook POST /v1/webhooks Store a new webhook
WebhooksApi submit_webook POST /v1/webhooks/{id}/submit Submit messages for a webhook.
WebhooksApi trigger_transaction_webhook POST /v1/webhooks/{id}/trigger-transaction/{transactionId} Trigger webhook for a given transaction.
WebhooksApi update_webhook PUT /v1/webhooks/{id} Update existing webhook.

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

firefly_iii_auth

local_bearer_auth

  • Type: Bearer authentication

Author

ms32035@gmail.com

About

Python client for Firefly III API. Please read .generator/Readme.md

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages