Skip to main content

dask-actor-singleton

This package works around common transient errors and pitfalls in creating a singleton instance of an Actor in Dask. It provides a clean interface for retrieving the singleton instance, and allocating it when necessary.

Usage

import dask_actor_singleton

class MyActor:
    def __init__(self, arg):
        self.value = arg
    def inc(self):
        self.value += 1
        return self.value

client = dask.distributed.Client()
actor = dask_actor_singleton.get('my_actor', create=lambda: MyActor(8))
print(actor.inc().result())  # 9
# Now, on a different computer / dask.distributed.Client, run this script again:
# ...
print(actor.inc().result())  # 10
# If ever the singleton should be deleted, one may call:
dask_actor_singleton.discard('my_actor')

History

  • 2023-09-14 v1.3.4 release. Fixing compatibility with Dask 2023.5.0 and beyond, and the FAW.
  • 2021-08-19 v1.3.3 release. Caching times start after object creation finishes; not at the start. This matters for objects with long load times.
  • 2021-08-18 v1.3.2 release. Explicitly forget wrapped future.
  • 2021-08-18 v1.3.1 release. Free old actor when re-allocating to potentially reduce memory load.
  • 2021-08-02 v1.3.0 release. Priority argument added to improve responsiveness alongside larger processing loads.
  • 2021-07-29 v1.2.0 release. Added TTL support for get, and better documentation for discard.
  • 2021-07-29 v1.1.1 release. Fixed issue with "Working holding Actor was lost"
  • 2021-07-29 v1.1 release. Supports discard to purge a cached singleton.
  • 2021-07-19 v1.0 release.

Metadata

Release files for dask-actor-singleton 1.3.4

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

Source distribution (sdist)

Source distribution for dask-actor-singleton 1.3.4
File Size Uploaded Provenance
dask-actor-singleton-1.3.4.tar.gz 6.4 kB Without provenance Details

Release files / dask-actor-singleton-1.3.4.tar.gz

Download URL dask-actor-singleton-1.3.4.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7b8e009163a275dac345cf408b09aca2f30e219b7f3a0f0e1f93b8d9499ca7d9
BLAKE2b-256 checksum
How to use checksums
088170cd9b1f49e27ed729d869922efbc9d30eaa6abcb279ae4b9ea71e7754d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Security for dask-actor-singleton 1.3.4

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