Skip to main content

piecash

Join the chat at https://gitter.im/sdementen/piecash https://github.com/sdementen/piecash/workflows/CI/badge.svg https://readthedocs.org/projects/piecash/badge/?version=master https://img.shields.io/pypi/v/piecash.svg https://img.shields.io/pypi/pyversions/piecash.svg https://img.shields.io/pypi/dd/piecash.svg https://coveralls.io/repos/sdementen/piecash/badge.svg?branch=master&service=github

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:

A simple example of a piecash script:

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.

Metadata

Release files for piecash 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piecash 1.2.1
File Size Uploaded Provenance
piecash-1.2.1.tar.gz 769.2 kB Without provenance Details

Release files / piecash-1.2.1.tar.gz

Download URL piecash-1.2.1.tar.gz
Size 769.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7f9c5c7342df3b9cd1457adf4b82fea430f14fa93be17e52c7dd41c02abf7104
BLAKE2b-256 checksum
How to use checksums
6ae05ceb393d6f765b09f8b97fb054260bcfb32d2d04a524b781e5f140e87e82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.13

Security for piecash 1.2.1

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.

Release history Release notifications | RSS feed

This release

1.2.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page