This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# GNU Cash XML Library

`gnucashxml` is a [Python][] library to parse [GNU Cash][] XML files.
This allows writing reporting utilities that do not rely on the GNU
Cash libraries themselves, or require the main program to run at all.
Tested with GNU Cash 2.4.10.

The library supports extracting the account tree, including all
transactions and splits. It does not support scheduled transactions,
price tables, and likely none but the most basic commodities. In
particular, writing of XML files is not supported.

[gnu cash]:

## Usage

The interface is intended to allow quickly writing reports using
Python. It reuses as many Python data structures as possible. Whenever
dates or times are used, the standard library `datetime` is used. All
account and transaction balances are represented as the standard
`Decimal` type.

The three main concepts in GNU Cash are accounts, transactions, and
splits. A transaction consists of a number of splits that specify from
which account or to which account commodities are transferred by this
transaction. All splits within a transaction together are balanced.

The main classes provided by `gnucashxml` mirror these concepts. A
`Book` is the main class containing everything else. A `Commodity` is
what is stored in an account, for example, Euros or Dollars. An
`Account` is part of a tree structure and contains splits. `Splits`
again are part of `Transactions`.

These classes all have a `slots` member, which is a simple dictionary
for extra information. GNU Cash information such as "hidden" are
recorded here.

## Example

import gnucashxml

book = gnucashxml.from_filename("test.gnucash")

income_total = 0
expense_total = 0
for account, subaccounts, splits in book.walk():
if account.actype == 'INCOME':
income_total += sum(split.value for split in account.splits)
elif account.actype == 'EXPENSE':
expense_total += sum(split.value for split in account.splits)

print "Total income : {:9.2f}".format(income_total * -1)
print "Total expense: {:9.2f}".format(expense_total)

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gnucashxml-1.0.tar.gz (4.9 kB) Copy SHA256 Checksum SHA256 Source Oct 30, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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