Skip to main content

tetrascience protocol compiler

Project description

tetrascience protocol virtual machine

compiler

Example usage for python 3.10+

from ts_protocol_virtual_machine import compiler
from ts_protocol_virtual_machine.result import Ok, Err

INPUT = """
protocolSchema: v3

steps: []
"""

match compiler.yaml.to.protocol_v2(INPUT):
    case Ok(program, warnings):
        print("SUCCESS", program, warnings)
    case Err(errors, warnings):
        print("ERROR", errors, warnings)

Example usage for python 3.9:

from ts_protocol_virtual_machine import compiler

INPUT = """
protocolSchema: v3

steps: []
"""

compiler.yaml.to.pvm(INPUT).match(
    lambda program, warnings: print("SUCCESS", program, warnings),
    lambda errors, warnings: print("ERROR", errors, warnings),
)

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

ts_protocol_virtual_machine-1.8.1.tar.gz (161.3 kB view details)

Uploaded Source

Built Distribution

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

ts_protocol_virtual_machine-1.8.1-py3-none-any.whl (163.6 kB view details)

Uploaded Python 3

File details

Details for the file ts_protocol_virtual_machine-1.8.1.tar.gz.

File metadata

File hashes

Hashes for ts_protocol_virtual_machine-1.8.1.tar.gz
Algorithm Hash digest
SHA256 ea39799ccd93d67878722cec2afadbf7bcd7ab3be9b3225faa5d315f224138a2
MD5 d9d6712d845bbf1989c411bc28513018
BLAKE2b-256 ca96b08717e096dc657992dd354009e174ab0fb7aabe3efaccd926d9af812d7a

See more details on using hashes here.

File details

Details for the file ts_protocol_virtual_machine-1.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ts_protocol_virtual_machine-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4451d49ac8e73c85a450eb794231225cfa8fe800aa4da60b36f5ae323706e78
MD5 f9ef978e1e76c91e74640067921793ea
BLAKE2b-256 18487ffded4a6a8bdcf129af9dc6a76a1d936269719ca8fbb5a8cbd5218abf33

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