actualpy
Python API implementation for the Actual Budget server
actualpy is a Python API implementation for the server of Actual Budget, a superfast and privacy-focused app for managing your finances.
The library is a re-implementation of the Node.js npm package @actual-app/api, but takes a different, more Pythonic approach: database objects are handled through the SQLAlchemy ORM. This means you can use the full power of SQLAlchemy to build your own queries, write custom tools to manage your budget, or export your data to another format. All the useful relationships between the objects are also available to facilitate data handling.
Installation
pip install actualpy
Example
The following script downloads a budget and prints every single transaction registered in it:
from actual import Actual
from actual.queries import get_transactions
with Actual(base_url="http://localhost:5006", password="<your_password>", file="<file_id_or_name>") as actual:
for t in get_transactions(actual.session):
account_name = t.account.name if t.account else None
category = t.category.name if t.category else None
print(t.date, account_name, t.notes, t.amount, category)
Contributing
Ideas, bug fixes and feature requests are welcome: open an issue or submit a pull request. For questions that don’t fit an issue, start a discussion.
The full guide is in CONTRIBUTING.md.