XMLchain is a Python package for creating, verifying, and updating blockchainified XML files.
You can install XMLchain directly from the source:
git clone https://github.com/mehranmo/XMLchain.git
cd XMLchain
pip install .Here's a simple example of how to use XMLchain:
from XMLchain import xmlchain
# Generate a key pair
private_key, public_key = xmlchain.generate_key_pair()
# Create a new block
block = xmlchain.create_block("previous_block_hash", "data", private_key)
# The `block` variable now contains a blockchainified XML block
# Validate the XML file
valid = xmlchain.validate_chain("xml_filename")
# The `valid` variable is True if the XML file is valid, and False otherwiseRun tests with the following command:
python -m unittest discover testsPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.