DesignStore

Contents

DesignStore#

class pulserver.host.DesignStore[source]#

Bases: object

The designs under one directory, each in <id>/ and immutable once written.

A design directory holds the Pulseq files of its chain, its IR cache and MANIFEST. It is written in a stage and renamed into place, so a reader sees a design whole or not at all, and two processes writing one design leave one directory.

Methods

commit

Publish a staged directory as the design of identity; return its identifier.

directory

Return the directory of a design, whether or not it exists.

discard

find

Return the identifier of the stored design with this identity, or None.

manifest

Return a stored design's manifest.

pack

Return a stored design as a bundle: a gzip-compressed tar of its files.

prune

Remove designs, least recently used first; return their identifiers.

receive

Store a bundle pack() made, after checking it; return its identifier.

stage

Create an empty directory to write a design into.