Skip to main content

splut

Actor model for Python.

This README is auto-generated, see project wiki for details.

API

splut.actor

ActorHandle Objects

class ActorHandle(Parabject)

__getattr__
def __getattr__(name)

Return a function to add a message to the mailbox, for execution by a capable worker when one becomes free.

__getitem__
def __getitem__(key)

Index or slice workers by the given key and return an actor handle backed by the resulting workers.

__iter__
def __iter__()

For each worker, yield an actor handle backed by that worker specifically.

Spawn Objects

class Spawn()

__init__
def __init__(executor)

Spawned actors will use threads from the given executor.

__call__
def __call__(*objs)

Create an actor backed by the given worker object(s), each of which is used in a single-threaded way. Calling a method on the returned actor returns a Future immediately, which eventually becomes done with the result of a worker method of the same name (or never if the worker method hangs). A worker method may be async, in which case it can await futures returned by other actors, releasing the worker in the meantime.

Join Objects

class Join()

Make multiple futures awaitable as a unit. In the zero futures case this resolves (to an empty list) without suspending execution. Otherwise if any future hangs, so does this. Otherwise if any future failed, all such exceptions are raised as a chain. Otherwise all results are returned as a list.

ManualExecutor Objects

class ManualExecutor()

Utilise the main (or any other) thread directly.

run
def run()

Execute tasks until interrupted. Typical usage is for the main thread to call this after setting up the system.

putinterrupt
def putinterrupt()

Cause exactly one thread to exit the run method soon.

splut.actor.aio

EventLoopPool Objects

class EventLoopPool()

Executor with asyncio-capable threads.

splut.actor.future

Future Objects

class Future()

wait
def wait()

Block until there is an outcome, then return/raise it. For use outside actors, or within one if you know the future is done and don't want to suspend execution with await in that case.

andforget
def andforget(log)

Send any exception to the given log.

elf
def elf()

Create a future awaitable by the current event loop that has the same outcome as this one.

splut.bg

Sleeper Objects

class Sleeper()

interrupt
def interrupt()

If a sleep is in progress that sleep returns now, otherwise the next sleep will return immediately. This is similar behaviour to interrupting a maybe-sleeping thread in Java.

splut.bg.delay

Release files for splut 30

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

Source distribution (sdist)

Source distribution for splut 30
File Size Uploaded
splut-30.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for splut 30
File Interpreter ABI Platform
splut-30-py3-none-any.whl Python 3 none any Details

Total release size: 18.5 kB

Release files / splut-30.tar.gz

Download URL splut-30.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f929274db7e91439d05f99c4dcc7f4c19fac09b5537436d22db79d5d802b375f
BLAKE2b-256 checksum
How to use checksums
da62e50e491c519b28dd8303a362ea121cf602205f3cf0622de72766ed1576b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / splut-30-py3-none-any.whl

Download URL splut-30-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef927debaafede1e8ae518c759a6e1f2159f6a2fb01e1009c70e6fd87d1cb7c4
BLAKE2b-256 checksum
How to use checksums
3abb2c9058371d61e6c4cde6238d9e48d321797f8e0466ed5a448467095124a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

30 This release

2 release files

28

2 release files

27

2 release files

26

2 release files

25

2 release files

24

2 release files

23

2 release files

22

2 release files

21

2 release files

20

2 release files

19

2 release files

18

2 release files

17

2 release files

16

2 release files

15

2 release files

14

2 release files

13

2 release files

12

2 release files

11

2 release files

10

2 release files

8

2 release files

7

2 release files

6

2 release files

5

2 release files

4

2 release files

3

2 release files

2

2 release files

1

2 release files

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