seamless.checksum_class

Class for Seamless checksums. Seamless checksums are calculated as SHA-256 hashes of buffers.

Checksum

  • kind: class
  • signature: Checksum

Class for Seamless checksums. Seamless checksums are calculated as SHA-256 hashes of buffers.

Checksum.bytes

  • kind: method
  • signature: bytes(self)

Returns the checksum as a 32-byte bytes object

Checksum.decref

  • kind: method
  • signature: decref(self)

Decrement normal refcount in the buffer cache. If no refs remain (and no tempref), may be uncached.

Checksum.find

  • kind: method
  • signature: find(self, verbose)

Returns a list of URL infos to download the underlying buffer. An URL info can be an URL string, or a dict with additional information.

Checksum.fingertip

  • kind: method
  • signature: fingertip(self, celltype)

Return a resolvable buffer/value, recomputing locally if needed.

Checksum.fingertip_sync

  • kind: method
  • signature: fingertip_sync(self, celltype)

Synchronously resolve or recompute the checksum buffer/value.

Checksum.hex

  • kind: method
  • signature: hex(self)

Returns the checksum as a 64-byte hexadecimal string

Checksum.incref

  • kind: method
  • signature: incref(self, *, scratch)

Increment normal refcount in the buffer cache.

If scratch is True, keep the ref scratch-only (no remote registration).

Checksum.load

  • kind: method
  • signature: load(cls, filename)

Loads the checksum from a .CHECKSUM file.

If the filename doesn't have a .CHECKSUM extension, it is added

Checksum.resolution

  • kind: method
  • signature: resolution(self, celltype)

Returns the data buffer that corresponds to the checksum. If celltype is provided, a value is returned instead.

Checksum.resolve

  • kind: method
  • signature: resolve(self, celltype)

Returns the data buffer that corresponds to the checksum. If celltype is provided, a value is returned instead.

The buffer is retrieved from buffer cache

Checksum.save

  • kind: method
  • signature: save(self, filename)

Saves the checksum to a .CHECKSUM file.

If the filename doesn't have a .CHECKSUM extension, it is added

Checksum.tempref

  • kind: method
  • signature: tempref(self, interest, fade_factor, fade_interval, scratch)

Add or refresh a single tempref. Only one tempref allowed per checksum.

If scratch is True, keep the tempref scratch-only (no remote registration).

_run_coro_in_new_loop

  • kind: function
  • signature: _run_coro_in_new_loop(coro)

No docstring.

_run_coro_in_worker_thread

  • kind: function
  • signature: _run_coro_in_worker_thread(coro)

No docstring.

validate_checksum

  • kind: function
  • signature: validate_checksum(v)

Validate a checksum, list or dict recursively