Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A pythonic interface to GnuCash SQL documents.

Project Description

Piecash provides a simple and pythonic interface to GnuCash files stored in SQL (sqlite3, Postgres and MySQL).

Documentation:http://piecash.readthedocs.org.
Google group:https://groups.google.com/d/forum/piecash (piecash@googlegroups.com)
Github:https://github.com/sdementen/piecash
PyPI:https://pypi.python.org/pypi/piecash

It is a pure python package, tested on python 2.7 and 3.3/3.4/3.5, 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.

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)
Release History

Release History

This version
History Node

0.12.0

History Node

0.11.1

History Node

0.10.2

History Node

0.10.1

History Node

0.10.0

History Node

0.9.1

History Node

0.8.4

History Node

0.8.3

History Node

0.8.2

History Node

0.8.1

History Node

0.7.6

History Node

0.7.4

History Node

0.7.3

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

History Node

0.5.12

History Node

0.5.11

History Node

0.5.10

History Node

0.5.9

History Node

0.5.8

History Node

0.5.7

History Node

0.5.6

History Node

0.5.5

History Node

0.5.4

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.9

History Node

0.4.5

History Node

0.4.4

History Node

0.4.3

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.0

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
piecash-0.12.0.tar.gz (535.8 kB) Copy SHA256 Checksum SHA256 Source Feb 15, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting