Skip to main content

Python SAX parser to extract xml

Project description

SaxTract

https://img.shields.io/pypi/v/saxtract.svg https://img.shields.io/travis/danwald/saxtract.svg Documentation Status Updates

Python SAX parser to extract xml

Features

Uses a SAXParser to maintain a fix memory footprint to parse and ‘extract’ tags from an xml file and push it to an output stream.

With performance tests on a trimmed down to 10k records from the dbpl dataset, SaxTrack ran in about half the time and half the memory footprint

python tests/perf_tests.py --filename test.xml --tag authors --runs 5

SaxTrack run took ~0.05381571219999999s
DOM Parser run took ~0.09159613900000001s

Todo’s

allow xsd/dtd input for validation

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

The main parser code was copied from tutorialspoint

History

0.1.0 (2021-02-26)

  • First release on PyPI.

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

saxtract-0.1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

saxtract-0.1.0-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file saxtract-0.1.0.tar.gz.

File metadata

  • Download URL: saxtract-0.1.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.6

File hashes

Hashes for saxtract-0.1.0.tar.gz
Algorithm Hash digest
SHA256 68a638242eb92221943e76696fb8d99fc6a5c38eba2b70af44e8bd469affac40
MD5 a9403ac577a07fb9707d2488c0c53bdc
BLAKE2b-256 f1080169354aeda8193db7c8ddd003d8824f0a5f4721e02e854986f840f38383

See more details on using hashes here.

File details

Details for the file saxtract-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: saxtract-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.6

File hashes

Hashes for saxtract-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e29fa9425269c0f29c1a63c2092a1bec09077eda1099408f724d3ed871ae7961
MD5 593c0a77725c5d8b8beb7036864fd3e4
BLAKE2b-256 10dc698781cf4a89ea174c1df824d21ba0b1fc31a1b244448e2d409b5fd8cf8f

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