Skip to main content

Overview

Sequence is a library that lets you build analysis tools that can be controlled by configuration files. This is useful when you want to define the logic for generating some sort of output, like data or an image, in a configuration file. This type of configuration file is called a sequence and it defines a sequence of operations that do something.

Under the hood, sequences are run by a virtual stack machine. A sequence is a list of operations, where an operation is either another sequence or a method. A method is a Python function that uses the @sequence.method decorator and methods provide basic functionality building blocks. Methods and sequences pass data to each other on the virtual machine's stack, via pushing, popping, and swapping data.

A sequence toolkit (STK) is a Python package that provides a suite of methods. The standard toolkit (built-in) is a suite of turing-complete methods that provide the backbone for scripting logic in sequences (e.g., if blocks, while loops, string formatting, data resources, etc.). Additional functionality can be added by installing additional toolkits.

About Stack Machines

If it isn't clear how operations pass data using the stack, a good way to get familiar with the concept is by playing around with an RPN calculator like this. Try calculating the hypotenuse of a triangle with side length of 3 and 4 using the Pythagorean Theorem (the answer is 3, Enter, X, Enter, 4, Enter, X, +, SQRT). Every button-press is equivalent to an operation in sequence.

The design of sequence took inspiration from these old RPN-style calculators as well as the FORTH programming language.

Installing sequence

Sequence can be install using pip. The basic install supports JSON.

$ pip install sequence-stk

It's often useful to be able to write comments and use multi-line strings in sequences. JSON5 and HSON are extensions of JSON that support these features. Additional configuration languages can be installed via the json5, and/ord hson extras.

$ pip install "sequence[json5,hson]"

If you are developing an STK, the dev and docs extras install the requirements for running tests and building documentation.

$ pip install "sequence[dev,docs]"

Metadata

Release files for sequence-stk 0.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sequence-stk 0.7.2
File Size Uploaded Provenance Actions
sequence-stk-0.7.2.tar.gz 38.7 kB Without provenance Details for sequence-stk-0.7.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sequence-stk 0.7.2
File Interpreter ABI Platform Actions
sequence_stk-0.7.2-py3-none-any.whl Python 3 none any Details for sequence_stk-0.7.2-py3-none-any.whl

Total release size: 64.8 kB

Release files / sequence-stk-0.7.2.tar.gz

Download URL sequence-stk-0.7.2.tar.gz
Size 38.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0771ac0c2d16ad47cc83ebc279010ec19ef83fc603665da69290d5ddd4283911
BLAKE2b-256 checksum
How to use checksums
16a0766a85322e12dfce36a0568bc4d8a91d12435ecbce03cf4a4d20aca8596f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / sequence_stk-0.7.2-py3-none-any.whl

Download URL sequence_stk-0.7.2-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
630847f47ce36eba011a831c1e683d6105984591bae525b230fece7117ed41d3
BLAKE2b-256 checksum
How to use checksums
afb977a58433b8864d7610e5780731e00ca849a86b21cb4e9c176eadc95c8b55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Security for sequence-stk 0.7.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page