Skip to main content

Extract entries from GnuCash data file to pandas.DataFrame.

Project description

gncxml

PyPI

gncxml - extract entries from GnuCash data file to pandas.DataFrame

Installation

pip install gncxml

Usage (Command Line)

usage: gncxml [-h] [-l] [--csv] TYPE [FILE]

gncxml - print entries in GnuCash data file as data frame

positional arguments:
  TYPE        type of entries to print (account | commodity | price | split |
              transaction)
  FILE        GnuCash data file (XML format)

optional arguments:
  -h, --help  show this help message and exit
  -l, --long  list in long format
  --csv       print in csv format

Usage (Python Module)

import sys
import gncxml

try:
    book = gncxml.Book("mybook.gnucash")
except OSError as err:
    sys.exit(err)

# Extract splits as pandas.DataFrame
df = book.list_splits()
print(df[df["trn_date"] >= "2017-10-01"].to_csv())

See also: examples/module_usage.ipynb

License

Copyright 2017-2022 LiosK

Licensed under the Apache License, Version 2.0.

Project details


Download files

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

Source Distribution

gncxml-0.6.4.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

gncxml-0.6.4-py3-none-any.whl (12.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page