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.9.0.tar.gz (161.6 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.9.0-py3-none-any.whl (163.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ts_protocol_virtual_machine-1.9.0.tar.gz
Algorithm Hash digest
SHA256 030fccee1f94327fcee8f2a0589d75df71c78d9136ae0c9c4d835f3b3df992f8
MD5 e2b14982018182af7af73aa3aabd7157
BLAKE2b-256 9a62cbfacc709531f836a4fdc8955bc90920dc7a2b96f8bab77d872d8706e6ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ts_protocol_virtual_machine-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49c32648c79c2ddd5d79017e9bbb5c34b6b8d3f8674e6dbd181f3d679d15374f
MD5 634168ba93691d94a8afbc16e056b823
BLAKE2b-256 d33d40c474b11c3da135bdfd67cc20984b8668f07f0aa6b6abc027fa2ec393e0

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