BSD Ports

net/py-duet 0.2.9_1 FreeBSD

Simple future-based async library for python

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
APACHE20
Categories
net, python
Package size
62.3 KiB, 327.5 KiB installed

Description

Duet takes inspiration from the amazing trio library and the structured concurrency approach to async programming that it uses. However, duet differs from trio in two major ways: * Instead of a full-blown implementation of asynchronous IO, duet relies on the Future interface for parallelism, and provides a way to run async/await coroutines around those Futures. This is useful if you are using an API that returns futures, such as RPC libraries like gRPC. The standard Future interface does not implement __await__ directly, so Future instances must be wrapped in duet.AwaitableFuture.

* duet is re-entrant. At the top level, you run async code by calling duet.run(foo). Inside foo suppose you call a function that has not yet been fully refactored to be asynchronous, but itself calls duet.run(bar). Most async libraries, including trio and asyncio, will raise an exception if you try to "re-enter" the event loop in this way, but duet allows it. We have found that this can simplify the process of refactoring code to be asynchronous because you don't have to completely separate the sync and async parts of your codebase all at once.

In the other systems

SystemPortVersion
FreeBSDnet/py-duet0.2.9_1
DragonFlynet/py-duet0.2.9_1

Install

Binary package:

pkg install py312-duet

From the ports tree:

cd /usr/ports/net/py-duet/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	py312-duet>0:net/py-duet

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.2.9_10.2.9_10.2.70.2.9_10.2.9_1
FreeBSD:14:quarterly0.2.9_10.2.9_1n/a0.2.9_10.2.9_1
FreeBSD:15:latest0.2.9_10.2.9_1n/a0.2.9_10.2.9_1
FreeBSD:15:quarterly0.2.9_10.2.9_1n/an/an/a
FreeBSD:16:latest0.2.9_10.2.9_1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Test 1

The full lists below include those, and their dependencies in turn.

Build dependencies 11
Run dependencies 7

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
duet-0.2.9.tar.gz24438d6fa39582e6a3dce1096c47e5fbcbda648a633eed94a38943e68662afa2587f3
Master sites 1
  • PYPI

Commit history 0

No commits in the history this site was built from.