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.15.tar.gz (11.3 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.15-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gncxml-0.7.15.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for gncxml-0.7.15.tar.gz
Algorithm Hash digest
SHA256 ca36bfdb8ab02d5e71d7172fc827d147959fcee78062818d379a3b0c5cba2b4f
MD5 89247d36b09e3d7f6058be92ebe5a5a5
BLAKE2b-256 7b9bd1890e37e5ab5807af67ca3a81d137a109c26e71a81f33d3013f03dd7fd8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gncxml-0.7.15-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for gncxml-0.7.15-py3-none-any.whl
Algorithm Hash digest
SHA256 42fc7662f8ee217d69e2dcdc1433708cf306378ad6540226a2a027263bec4161
MD5 f17f44472d296ee35f8c0e89f668d6f2
BLAKE2b-256 f00dfa2d8b75fd70fa40fc949eb4e4686ff73b2aa9fbb1a9c8a1c3962fa3efa5

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