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"] >= "2023-07-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.7.11.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

gncxml-0.7.11-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file gncxml-0.7.11.tar.gz.

File metadata

  • Download URL: gncxml-0.7.11.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0

File hashes

Hashes for gncxml-0.7.11.tar.gz
Algorithm Hash digest
SHA256 8a7a7132f55d7ee0eb7a417d5445a31016d28f37cbba6201c25a68c7b5bfbcea
MD5 a1f13a402fdac1fa403f510e36c0c0b6
BLAKE2b-256 21e3db041c1ddc9d5189328100e7244c94326a9ae551c85d2fb874ce8115f3a5

See more details on using hashes here.

File details

Details for the file gncxml-0.7.11-py3-none-any.whl.

File metadata

  • Download URL: gncxml-0.7.11-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0

File hashes

Hashes for gncxml-0.7.11-py3-none-any.whl
Algorithm Hash digest
SHA256 535c312bc9242804b2b66dabfebb8eb7200e415f3358b7c87f1c7d8a2b2e08e5
MD5 ffce1b55c7e710d1d1cd79595bd79a6d
BLAKE2b-256 6626a3556f1a1015adc25fdf9437c4e64e53ef05f322b867de33edded18528f9

See more details on using hashes here.

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