piecash
=======
.. image:: https://badges.gitter.im/sdementen/piecash.svg
:alt: Join the chat at https://gitter.im/sdementen/piecash
:target: https://gitter.im/sdementen/piecash?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. image:: https://github.com/sdementen/piecash/workflows/CI/badge.svg
:target: https://github.com/sdementen/piecash/actions
.. image:: https://readthedocs.org/projects/piecash/badge/?version=master
:target: http://piecash.readthedocs.org
.. image:: https://img.shields.io/pypi/v/piecash.svg
:target: https://pypi.python.org/pypi/piecash
.. image:: https://img.shields.io/pypi/pyversions/piecash.svg
:target: https://pypi.python.org/pypi/piecash/
.. image:: https://img.shields.io/pypi/dd/piecash.svg
:target: https://pypi.python.org/pypi/piecash/
.. image:: https://coveralls.io/repos/sdementen/piecash/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/sdementen/piecash?branch=master
Piecash provides a simple and pythonic interface to GnuCash files stored in SQL (sqlite3, Postgres and MySQL).
:Documentation: http://piecash.readthedocs.org.
:Gitter: https://gitter.im/sdementen/piecash
:Github: https://github.com/sdementen/piecash
:PyPI: https://pypi.python.org/pypi/piecash
It is a pure python package, tested on python 3.6 to 3.9, that can be used as an alternative to:
- the official python bindings (as long as no advanced book modifications and/or engine calculations are needed).
This is specially useful on Windows where the official python bindings may be tricky to install or if you want to work with
python 3.
- XML parsing/reading of XML GnuCash files if you prefer python over XML/XLST manipulations.
piecash test suite runs successfully on Windows and Linux on the three supported SQL backends (sqlite3, Postgres and MySQL).
piecash has also been successfully run on Android (sqlite3 backend) thanks to Kivy buildozer and python-for-android.
It allows you to:
- open existing GnuCash documents and access all objects within
- modify objects or add new objects (accounts, transactions, prices, ...)
- create new GnuCash documents from scratch
Scripts are also available to:
- export to ledger-cli format (http://www.ledger-cli.org/)
- export to QIF format
- import/export prices (CSV format)
A simple example of a piecash script:
.. code-block:: python
with open_book("example.gnucash") as book:
# get default currency of book
print( book.default_currency ) # ==> Commodity<CURRENCY:EUR>
# iterating over all splits in all books and print the transaction description:
for acc in book.accounts:
for sp in acc.splits:
print(sp.transaction.description)
The project has reached beta stage.
.. important::
If you want to work with python 2.7/3.4 and books from gnucash 2.6.x series, you can use piecash 0.19.0.
Versions of piecash as of 1.0.0 supports python >=3.6 and books from gnucash 3.0.x series.
.. warning::
1) Always do a backup of your gnucash file/DB before using piecash.
2) Test first your script by opening your file in readonly mode (which is the default mode)
Raw data
{
"_id": null,
"home_page": "https://github.com/sdementen/piecash",
"name": "piecash",
"maintainer": "sdementen",
"docs_url": "https://pythonhosted.org/piecash/",
"requires_python": null,
"maintainer_email": "sdementen@gmail.com",
"keywords": "GnuCash, python, binding, interface, sqlalchemy",
"author": "sdementen",
"author_email": "sdementen@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/6a/e0/5ceb393d6f765b09f8b97fb054260bcfb32d2d04a524b781e5f140e87e82/piecash-1.2.1.tar.gz",
"platform": "any",
"description": "piecash\r\n=======\r\n\r\n.. image:: https://badges.gitter.im/sdementen/piecash.svg\r\n :alt: Join the chat at https://gitter.im/sdementen/piecash\r\n :target: https://gitter.im/sdementen/piecash?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\r\n\r\n.. image:: https://github.com/sdementen/piecash/workflows/CI/badge.svg\r\n :target: https://github.com/sdementen/piecash/actions\r\n\r\n.. image:: https://readthedocs.org/projects/piecash/badge/?version=master\r\n :target: http://piecash.readthedocs.org\r\n\r\n.. image:: https://img.shields.io/pypi/v/piecash.svg\r\n :target: https://pypi.python.org/pypi/piecash\r\n\r\n.. image:: https://img.shields.io/pypi/pyversions/piecash.svg\r\n :target: https://pypi.python.org/pypi/piecash/\r\n\r\n.. image:: https://img.shields.io/pypi/dd/piecash.svg\r\n :target: https://pypi.python.org/pypi/piecash/\r\n\r\n.. image:: https://coveralls.io/repos/sdementen/piecash/badge.svg?branch=master&service=github\r\n :target: https://coveralls.io/github/sdementen/piecash?branch=master\r\n\r\n\r\nPiecash provides a simple and pythonic interface to GnuCash files stored in SQL (sqlite3, Postgres and MySQL).\r\n\r\n:Documentation: http://piecash.readthedocs.org.\r\n:Gitter: https://gitter.im/sdementen/piecash\r\n:Github: https://github.com/sdementen/piecash\r\n:PyPI: https://pypi.python.org/pypi/piecash\r\n\r\n\r\nIt is a pure python package, tested on python 3.6 to 3.9, that can be used as an alternative to:\r\n\r\n- the official python bindings (as long as no advanced book modifications and/or engine calculations are needed).\r\n This is specially useful on Windows where the official python bindings may be tricky to install or if you want to work with\r\n python 3.\r\n- XML parsing/reading of XML GnuCash files if you prefer python over XML/XLST manipulations.\r\n\r\npiecash test suite runs successfully on Windows and Linux on the three supported SQL backends (sqlite3, Postgres and MySQL).\r\npiecash has also been successfully run on Android (sqlite3 backend) thanks to Kivy buildozer and python-for-android.\r\n\r\nIt allows you to:\r\n\r\n- open existing GnuCash documents and access all objects within\r\n- modify objects or add new objects (accounts, transactions, prices, ...)\r\n- create new GnuCash documents from scratch\r\n\r\nScripts are also available to:\r\n\r\n- export to ledger-cli format (http://www.ledger-cli.org/)\r\n- export to QIF format\r\n- import/export prices (CSV format)\r\n\r\nA simple example of a piecash script:\r\n\r\n.. code-block:: python\r\n\r\n with open_book(\"example.gnucash\") as book:\r\n # get default currency of book\r\n print( book.default_currency ) # ==> Commodity<CURRENCY:EUR>\r\n\r\n # iterating over all splits in all books and print the transaction description:\r\n for acc in book.accounts:\r\n for sp in acc.splits:\r\n print(sp.transaction.description)\r\n\r\nThe project has reached beta stage.\r\n\r\n.. important::\r\n\r\n If you want to work with python 2.7/3.4 and books from gnucash 2.6.x series, you can use piecash 0.19.0.\r\n Versions of piecash as of 1.0.0 supports python >=3.6 and books from gnucash 3.0.x series.\r\n\r\n.. warning::\r\n\r\n 1) Always do a backup of your gnucash file/DB before using piecash.\r\n 2) Test first your script by opening your file in readonly mode (which is the default mode)\r\n\r\n\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A pythonic interface to GnuCash SQL documents.",
"version": "1.2.1",
"project_urls": {
"Homepage": "https://github.com/sdementen/piecash"
},
"split_keywords": [
"gnucash",
" python",
" binding",
" interface",
" sqlalchemy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6ae05ceb393d6f765b09f8b97fb054260bcfb32d2d04a524b781e5f140e87e82",
"md5": "ce834601f422fce8c0d682b01988ab12",
"sha256": "7f9c5c7342df3b9cd1457adf4b82fea430f14fa93be17e52c7dd41c02abf7104"
},
"downloads": -1,
"filename": "piecash-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "ce834601f422fce8c0d682b01988ab12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 769224,
"upload_time": "2024-07-14T05:31:31",
"upload_time_iso_8601": "2024-07-14T05:31:31.671062Z",
"url": "https://files.pythonhosted.org/packages/6a/e0/5ceb393d6f765b09f8b97fb054260bcfb32d2d04a524b781e5f140e87e82/piecash-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-14 05:31:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sdementen",
"github_project": "piecash",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "piecash"
}