beancount-mercury


Namebeancount-mercury JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/mtlynch/beancount-mercury.git
SummaryImport Mercury banking transactions into beancount format
upload_time2023-10-07 22:16:19
maintainer
docs_urlNone
authorMichael Lynch
requires_python>=3.9
licenseMIT
keywords mercury beancount bookkeeping finance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # beancount-mercury

[![PyPI](https://img.shields.io/pypi/v/beancount-mercury)](https://pypi.org/project/beancount-mercury/)
[![CircleCI](https://circleci.com/gh/mtlynch/beancount-mercury.svg?style=svg)](https://circleci.com/gh/mtlynch/beancount-mercury)
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](LICENSE)

beancount-mercury provides an Importer for converting CSV exports Mercury checking transactions into [Beancount](https://github.com/beancount/beancount) v2 format.

## Installation

```bash
pip install beancount-mercury
```

## Usage

Add the Mercury importer to your account as follows:

```python
import beancount_mercury

CONFIG = [
    beancount_mercury.CheckingImporter(
        'Assets:Checking:Mercury',
        currency='USD',
        account_patterns=[
          # These are example patterns. You can add your own.
          ('GITHUB', 'Expenses:Cloud-Services:Source-Hosting:Github'),
          ('Fedex',  'Expenses:Postage:FedEx'),
        ]
    ),
]
```

The `account_patterns` parameter is a list of (regex, account) pairs. For each line in your Mercury CSV, `CheckingImporter` will attempt to create a matching posting on the transaction by matching the payee or narration to the regexes. The regexes are in priority order, with earlier patterns taking priority over later patterns.

Once this configuration is in place, you can use `bean-extract` to convert a Mercury CSV export of transactions to beancount format:

```bash
bean-extract config.py mercury-transactions.csv
```

## Resources

See [awesome-beancount](https://awesome-beancount.com/) for other publicly available Beancount importers.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mtlynch/beancount-mercury.git",
    "name": "beancount-mercury",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "mercury beancount bookkeeping finance",
    "author": "Michael Lynch",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/27/ad/cb727217f6b171cb8f0867069e20c69cdf6c0e9ba437f70cc1ddd9bbeabc/beancount-mercury-0.1.4.tar.gz",
    "platform": null,
    "description": "# beancount-mercury\n\n[![PyPI](https://img.shields.io/pypi/v/beancount-mercury)](https://pypi.org/project/beancount-mercury/)\n[![CircleCI](https://circleci.com/gh/mtlynch/beancount-mercury.svg?style=svg)](https://circleci.com/gh/mtlynch/beancount-mercury)\n[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](LICENSE)\n\nbeancount-mercury provides an Importer for converting CSV exports Mercury checking transactions into [Beancount](https://github.com/beancount/beancount) v2 format.\n\n## Installation\n\n```bash\npip install beancount-mercury\n```\n\n## Usage\n\nAdd the Mercury importer to your account as follows:\n\n```python\nimport beancount_mercury\n\nCONFIG = [\n    beancount_mercury.CheckingImporter(\n        'Assets:Checking:Mercury',\n        currency='USD',\n        account_patterns=[\n          # These are example patterns. You can add your own.\n          ('GITHUB', 'Expenses:Cloud-Services:Source-Hosting:Github'),\n          ('Fedex',  'Expenses:Postage:FedEx'),\n        ]\n    ),\n]\n```\n\nThe `account_patterns` parameter is a list of (regex, account) pairs. For each line in your Mercury CSV, `CheckingImporter` will attempt to create a matching posting on the transaction by matching the payee or narration to the regexes. The regexes are in priority order, with earlier patterns taking priority over later patterns.\n\nOnce this configuration is in place, you can use `bean-extract` to convert a Mercury CSV export of transactions to beancount format:\n\n```bash\nbean-extract config.py mercury-transactions.csv\n```\n\n## Resources\n\nSee [awesome-beancount](https://awesome-beancount.com/) for other publicly available Beancount importers.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Import Mercury banking transactions into beancount format",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/mtlynch/beancount-mercury.git"
    },
    "split_keywords": [
        "mercury",
        "beancount",
        "bookkeeping",
        "finance"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2071af69810bb51bb6c0f6ffae689718bdbef99a5be0c11a73059ba5ed716e4",
                "md5": "1020bfd5576ebba32994ba1559b56225",
                "sha256": "aa99f60b057f489f332c31f2bdb53e5b12f57c6d7b9311d259c619b9994ba102"
            },
            "downloads": -1,
            "filename": "beancount_mercury-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1020bfd5576ebba32994ba1559b56225",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 5798,
            "upload_time": "2023-10-07T22:16:18",
            "upload_time_iso_8601": "2023-10-07T22:16:18.111704Z",
            "url": "https://files.pythonhosted.org/packages/d2/07/1af69810bb51bb6c0f6ffae689718bdbef99a5be0c11a73059ba5ed716e4/beancount_mercury-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27adcb727217f6b171cb8f0867069e20c69cdf6c0e9ba437f70cc1ddd9bbeabc",
                "md5": "095942446c012b612fd5e7a370feccb8",
                "sha256": "dc91f9afe8624e8f1c15e8384e87fb9b70b31ba53484638f6a8003e4b6ee60fd"
            },
            "downloads": -1,
            "filename": "beancount-mercury-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "095942446c012b612fd5e7a370feccb8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 4435,
            "upload_time": "2023-10-07T22:16:19",
            "upload_time_iso_8601": "2023-10-07T22:16:19.521260Z",
            "url": "https://files.pythonhosted.org/packages/27/ad/cb727217f6b171cb8f0867069e20c69cdf6c0e9ba437f70cc1ddd9bbeabc/beancount-mercury-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-07 22:16:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mtlynch",
    "github_project": "beancount-mercury",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "requirements": [],
    "lcname": "beancount-mercury"
}
        
Elapsed time: 0.13870s