financeager-flask
Plugin that enables you to run financeager as a Flask-powered webservice!
Installation
financeager-flask requires Python 3.8 or higher.
pip install financeager-flask
Installation via pipx is recommended:
pipx install financeager
pipx inject financeager financeager-flask
Usage
To run financeager as client-server application, start the flask webservice by
export FLASK_APP=financeager_flask.flask
flask run # --help for more info
This does not store data persistently! Specify the environment variable
FINANCEAGER_FLASK_DATA_DIR.
For production use, you should wrap
app = flask.create_app(data_dir=...)in a WSGI or FCGI (seeexamples/directory).
To communicate with the webservice, the financeager configuration has to be adjusted. Create and open the file ~/.config/financeager/config. If you're on the machine that runs the webservice, put the lines
[SERVICE]
name = flask
If you're on an actual remote 'client' machine, put
[SERVICE]
name = flask
[SERVICE:FLASK]
host = https://foo.pythonanywhere.com
timeout = 10
username = foouser
password = S3cr3t
This specifies the timeout for HTTP requests and username/password for basic auth, if required by the server.
In any case, you're all set up! The available client CLI commands and options are the same as for the native program.
Command-line options
The plugin provides the fina web-version command, yielding information about the financeager software version installed on the server.
More Goodies
financeagerwill store requests if the server is not reachable (the timeout is configurable). The offline backup is restored the next time a connection is established.
Architecture
The following diagram sketches the relationship between financeager's modules, and this plugin. See the module docstrings for more information.
+--------+
| plugin |
+--------+
¦ ¦
V V
+--------+ +-----------+ +---------+
| config |-->| cli |<->| offline |
+--------+ +-----------+ +---------+
¦ Λ +---------+ +---------+
[pre-processing] ¦ ¦ [formatting] <-- | listing | <-- | entries |
V ¦ +---------+ +---------+
+-------------------------------------+
| clients |
+-------------------------------------+
¦ Λ
V ¦
+--------------+ | +--------------+
| httprequests | | | | FRONTEND
+--------------+ | | |
================ | | | ==========
+--------------+ | | localserver |
| flask | | | | BACKEND
+--------------+ | | |
| resources | | | |
+--------------+ | +--------------+
¦ Λ
V ¦
+-------------------------------------+
| server |
+-------------------------------------+
¦ Λ
V ¦
+-------------------------------------+
| pocket |
+-------------------------------------+
Known bugs
- see issues
Development
Set up
python3 -m venv .venv
source .venv/bin/activate
make install
You're all set for hacking!
Testing
Please adhere to test-driven development, if possible: When adding a feature, or fixing a bug, try to construct a test first, and subsequently adapt the implementation. Run the tests from the root directory via
make test
If you added a non-cosmetic change (i.e. a change in functionality, e.g. a bug fix or a new feature), please update Changelog.md accordingly as well. Check this README whether the content is still up to date.
Releasing
- Tag the latest commit on master by incrementing the current version accordingly (scheme
v0.major.minor.patch). - Run
make release.
Metadata
Release files for financeager-flask 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| financeager-flask-1.1.0.tar.gz | 21.1 kB | Without provenance | Details for financeager-flask-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| financeager_flask-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for financeager_flask-1.1.0-py3-none-any.whl |
Total release size: 32.8 kB
Release files / financeager-flask-1.1.0.tar.gz
| Download URL | financeager-flask-1.1.0.tar.gz |
|---|---|
| Size | 21.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c5c29773d406c1d9f350abcf917a6d41b0c09c5be4889c9e5b6e4758f0eb330
|
|
BLAKE2b-256 checksum How to use checksums |
2e8f1ba5522c982913b7f6c0d4e9745ef7a64fd8911d4937fe02c954bcf17abb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / financeager_flask-1.1.0-py3-none-any.whl
| Download URL | financeager_flask-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d02bf804b2b6d1bb3359f9d9d66a2383491ce4c253aaf9966ff4749df0c71b5
|
|
BLAKE2b-256 checksum How to use checksums |
0a4e3cda3b0c5394b1f97bdc244cc2cf39ab60978465817f8350944cc2d44686
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for financeager-flask 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.