An early Python implementation of sdmp/signed-yaml
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
syml
test
.gitignore
LICENSE
README.md
requirements.txt
setup.py

README.md

This is an attempt at implementing the signed-yaml specification in Python.

The specification is not complete, so consider this an unfinished work.
Additionally, other than being internally consistent, there has been no outside verification of this code.

API

Super simple API for now.

syml.Sign(document, private_key_path, private_key_passphrase=None)

Arguments

  • document - A YAML document, as a string, unicode or object.
  • private_key_path - File path to the private key as PEM
  • private_key_passphrase - Passphrase for private key, if needed

Return

A unicode object of the signed message.

Raises

  • syml.exceptions.InvalidKeyException

syml.Verify(message, public_key_path)

Arguments

  • message - A signed YAML message, as unicode.
  • public_key_path - File path to the public key as PEM

Return

None if document does not verify. unicode document string if it does.

Raises

  • syml.exceptions.InvalidKeyException