Skip to main content

XML Thunder is a compact library used to create xml parsers

Project description

XML Thunder

Installation

pip install xml_thunder

Usage

XML Thunder provides a class called 'Lightning'. The Lightning class's primary purpose is used for creating an XML parser. The Lightning class provides the following methods:


  • __init__(self)
    • Initializes an empty private dictionary

  • __getitem__(self, route: String)
    • Returns None or a Callable from the private dictionary

  • __len__(self)
    • Returns the length of a private dictionary

  • __bool__(self)
    • Returns True if the private dictionary is empty

  • get_route(self, route: String)
    • Returns a registered route if there is one at 'route'

  • get_all_routes(self)
    • Returns all registered routes in the private dictionary

  • add_route(self, path: String, function: Callable)
    • Adds a route at 'path' with 'function' as the value
    • Returns None

  • route(self, path: String)
    • Creates a route for the provided 'path'
    • 'path' is any valid xPath
    • Note that this method is a decorator and should be used as such

  • parse(self, xml_like_document: String | FileObject)
    • The entrypoint for parsing xml strings/files
    • Returns None

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

xml_thunder-0.0.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

xml_thunder-0.0.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file xml_thunder-0.0.3.tar.gz.

File metadata

  • Download URL: xml_thunder-0.0.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.0

File hashes

Hashes for xml_thunder-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9b8f929a8a95e0ae762851b7b36fbd6dbae02934f7a7932200eda2fa76dca551
MD5 d43dd79a1ed882fb0f208e83358f2d83
BLAKE2b-256 a2032a02b31d142d092253232de6a400a5011ca844422e93441f8bd35f7f25f4

See more details on using hashes here.

File details

Details for the file xml_thunder-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: xml_thunder-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.0

File hashes

Hashes for xml_thunder-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea61f1eaf15b0353417e16c62d8ca34e2fa606b2a5185137c1528eaf1730c2f2
MD5 b097946013df69cf6ed171e45567efd4
BLAKE2b-256 9a8b43c019dc4c8223978f690eb71ca398835289df24943f030311a9c52e647f

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