financeager-flask


Namefinanceager-flask JSON
Version 1.1.0 PyPI version JSON
download
home_page
SummaryPlugin to use flask as backend for financeager
upload_time2023-07-16 12:18:31
maintainer
docs_urlNone
author
requires_python
licenseGPLv3
keywords commandline finances
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Build Status](https://github.com/pylipp/financeager-flask/workflows/CI/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/pylipp/financeager-flask/badge.svg?branch=master)](https://coveralls.io/github/pylipp/financeager-flask?branch=master)

# financeager-flask

Plugin that enables you to run [financeager](https://github.com/pylipp/financeager) as a Flask-powered webservice!

## Installation

`financeager-flask` requires Python 3.8 or higher.

    pip install financeager-flask

Installation via [`pipx`](https://pipxproject.github.io/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 (see `examples/` 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

- `financeager` will 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](https://github.com/pylipp/financeager_flask/labels/bug)

## 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

1. Tag the latest commit on master by incrementing the current version accordingly (scheme `v0.major.minor.patch`).
1. Run `make release`.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "financeager-flask",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "commandline,finances",
    "author": "",
    "author_email": "Philipp Metzner <beth.aleph@yahoo.de>",
    "download_url": "https://files.pythonhosted.org/packages/2e/8f/1ba5522c982913b7f6c0d4e9745ef7a64fd8911d4937fe02c954bcf17abb/financeager-flask-1.1.0.tar.gz",
    "platform": null,
    "description": "![Build Status](https://github.com/pylipp/financeager-flask/workflows/CI/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/pylipp/financeager-flask/badge.svg?branch=master)](https://coveralls.io/github/pylipp/financeager-flask?branch=master)\n\n# financeager-flask\n\nPlugin that enables you to run [financeager](https://github.com/pylipp/financeager) as a Flask-powered webservice!\n\n## Installation\n\n`financeager-flask` requires Python 3.8 or higher.\n\n    pip install financeager-flask\n\nInstallation via [`pipx`](https://pipxproject.github.io/pipx/) is recommended:\n\n    pipx install financeager\n    pipx inject financeager financeager-flask\n\n## Usage\n\nTo run `financeager` as client-server application, start the flask webservice by\n\n    export FLASK_APP=financeager_flask.flask\n    flask run  # --help for more info\n\n>   This does not store data persistently! Specify the environment variable `FINANCEAGER_FLASK_DATA_DIR`.\n\n>   For production use, you should wrap `app = flask.create_app(data_dir=...)` in a WSGI or FCGI (see `examples/` directory).\n\nTo 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\n\n    [SERVICE]\n    name = flask\n\nIf you're on an actual remote 'client' machine, put\n\n    [SERVICE]\n    name = flask\n\n    [SERVICE:FLASK]\n    host = https://foo.pythonanywhere.com\n    timeout = 10\n    username = foouser\n    password = S3cr3t\n\nThis specifies the timeout for HTTP requests and username/password for basic auth, if required by the server.\n\nIn any case, you're all set up! The available client CLI commands and options are the same as for the native program.\n\n### Command-line options\n\nThe plugin provides the `fina web-version` command, yielding information about the `financeager` software version installed on the server.\n\n### More Goodies\n\n- `financeager` will store requests if the server is not reachable (the timeout is configurable). The offline backup is restored the next time a connection is established.\n\n## Architecture\n\nThe following diagram sketches the relationship between financeager's modules, and this plugin. See the module docstrings for more information.\n\n          +--------+\n          | plugin |\n          +--------+\n           \u00a6      \u00a6\n           V      V\n    +--------+   +-----------+   +---------+\n    | config |-->|    cli    |<->| offline |\n    +--------+   +-----------+   +---------+\n\n                     \u00a6   \u039b                     +---------+     +---------+\n    [pre-processing] \u00a6   \u00a6  [formatting]  <--  | listing | <-- | entries |\n                     V   \u00a6                     +---------+     +---------+\n\n    +-------------------------------------+\n    |                clients              |\n    +-------------------------------------+\n\n            \u00a6                     \u039b\n            V                     \u00a6\n\n    +--------------+   |   +--------------+\n    | httprequests |   |   |              |     FRONTEND\n    +--------------+   |   |              |\n    ================   |   |              |    ==========\n    +--------------+   |   | localserver  |\n    |     flask    |   |   |              |     BACKEND\n    +--------------+   |   |              |\n    |  resources   |   |   |              |\n    +--------------+   |   +--------------+\n\n            \u00a6                     \u039b\n            V                     \u00a6\n    +-------------------------------------+\n    |                server               |\n    +-------------------------------------+\n            \u00a6                     \u039b\n            V                     \u00a6\n    +-------------------------------------+\n    |                pocket               |\n    +-------------------------------------+\n\n## Known bugs\n\n- see [issues](https://github.com/pylipp/financeager_flask/labels/bug)\n\n## Development\n\n### Set up\n\n    python3 -m venv .venv\n    source .venv/bin/activate\n    make install\n\nYou're all set for hacking!\n\n### Testing\n\nPlease 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\n\n    make test\n\nIf 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.\n\n### Releasing\n\n1. Tag the latest commit on master by incrementing the current version accordingly (scheme `v0.major.minor.patch`).\n1. Run `make release`.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Plugin to use flask as backend for financeager",
    "version": "1.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/pylipp/financeager-flask/issues",
        "Documentation": "https://github.com/pylipp/financeager-flask",
        "Homepage": "https://github.com/pylipp/financeager-flask",
        "Source Code": "https://github.com/pylipp/financeager-flask"
    },
    "split_keywords": [
        "commandline",
        "finances"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a4e3cda3b0c5394b1f97bdc244cc2cf39ab60978465817f8350944cc2d44686",
                "md5": "a9be7adeda4d218fbcac64c2f4900359",
                "sha256": "6d02bf804b2b6d1bb3359f9d9d66a2383491ce4c253aaf9966ff4749df0c71b5"
            },
            "downloads": -1,
            "filename": "financeager_flask-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a9be7adeda4d218fbcac64c2f4900359",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11695,
            "upload_time": "2023-07-16T12:18:29",
            "upload_time_iso_8601": "2023-07-16T12:18:29.882976Z",
            "url": "https://files.pythonhosted.org/packages/0a/4e/3cda3b0c5394b1f97bdc244cc2cf39ab60978465817f8350944cc2d44686/financeager_flask-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e8f1ba5522c982913b7f6c0d4e9745ef7a64fd8911d4937fe02c954bcf17abb",
                "md5": "b5e104da3b95ca6757f86354ff92b357",
                "sha256": "6c5c29773d406c1d9f350abcf917a6d41b0c09c5be4889c9e5b6e4758f0eb330"
            },
            "downloads": -1,
            "filename": "financeager-flask-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b5e104da3b95ca6757f86354ff92b357",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21106,
            "upload_time": "2023-07-16T12:18:31",
            "upload_time_iso_8601": "2023-07-16T12:18:31.430769Z",
            "url": "https://files.pythonhosted.org/packages/2e/8f/1ba5522c982913b7f6c0d4e9745ef7a64fd8911d4937fe02c954bcf17abb/financeager-flask-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-16 12:18:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pylipp",
    "github_project": "financeager-flask",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "financeager-flask"
}
        
Elapsed time: 0.11192s