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.16.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gncxml-0.7.16.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.8 Darwin/25.0.0

File hashes

Hashes for gncxml-0.7.16.tar.gz
Algorithm Hash digest
SHA256 25a472287cb0d8b2a03d01a8de5adb1c1b1331e01c69b81df97bfd8492733945
MD5 05e328e74919ec9c5bbc01838dbaa580
BLAKE2b-256 12d6946173fd846633e627a5b045055c5fb9f1b548111738aa9e2d188e6b9689

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gncxml-0.7.16-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.8 Darwin/25.0.0

File hashes

Hashes for gncxml-0.7.16-py3-none-any.whl
Algorithm Hash digest
SHA256 950748d9eba71dff568b2b14f3912addaf4ed6155763e04e5b9a1cc01cf5a5ec
MD5 8b22bb53944d88c75e7d34d0b2ea6206
BLAKE2b-256 f4bc53ec504cef1e116bb762e63efbbd93607cf146ebf25a487da932c88ae2b1

See more details on using hashes here.

Supported by

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