Socket
Socket
Sign inDemoInstall

xml-thunder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml-thunder

XML Thunder is a compact library used to create xml parsers


Maintainers
1

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
  • __repr__(self)
    • Returns the string of the private dictionary
  • __str__(self)
    • Returns the string of the private dictionary
  • __contains__(self, route: String)
    • Returns a bool if the route is in the keys of the private dictionary
  • __getitem__(self, route: String)
    • Returns None or a Callable from the private dictionary
  • __setitem__(self, route: String, function: Callable)
    • Maps a route to the function
    • Returns None
  • __delitem__(self, route: String)
    • Deletes the specified route
    • Returns None
  • __len__(self)
    • Returns the length of a private dictionary
  • __bool__(self)
    • Returns True if the private dictionary is empty

  • get_all_routes(self)
    • Returns all registered routes in the private dictionary
  • 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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc