Git Product home page Git Product logo

piecash's Introduction

piecash

Join the chat at https://gitter.im/sdementen/piecash https://travis-ci.org/sdementen/piecash.svg?branch=master https://ci.appveyor.com/api/projects/status/af7mb3pwv31i6ltv/branch/master?svg=true https://readthedocs.org/projects/piecash/badge/?version=master https://requires.io/github/sdementen/piecash/requirements.svg?branch=master 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.5/3.6, 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.

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.5 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)

piecash's People

Contributors

sdementen avatar gregorias avatar brian-k-smith avatar spookylukey avatar aslehigh avatar geoffwright240 avatar belidzs avatar chrisberkhout avatar sebastiendementen avatar nigelcleland avatar gitter-badger avatar quazgar avatar jrwrigh avatar

Watchers

Frank Riley avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.