Skip to main content

A toolbox for asyncio services

Project description

https://github.com/facebookincubator/later/actions/workflows/ci.yml/badge.svg?branch=main https://img.shields.io/badge/code%20style-black-000000.svg

What is later?

later is a play on Async not happening now but at some point in the future. It was also an awesome name for a toolkit for writing AsyncIO applications. The batteries if you will for AsyncIO.

later is a collection of asyncio batteries created at Meta for supporting asyncio services.

later offers the following:
  • Unittesting
    • later.unittest.TestCase - An IsolatedAsyncioTestCase that insures tasks are not left orphaned and asyncio never calls its error handler.

    • later.unittest.mock.AsyncContextManager - A factory for easy mocking out AsyncContextManager

  • Tasks*
    • later.cancel - The correct way to cancel a Task/Future and insure it is awaited

    • later.as_task - Decorator to turn coroutines into Tasks.

    • later.Watcher - Watch tasks and ensure they don’t die - take action when they do. This is kinda like a asyncio.TaskGroup

    • later.herd - A Decorator that provides coroutines with basic thundering herd protection.

    • later.task.TaskSentinel - A Completed Future, a default value for a asyncio.Task argument so you don’t also have to accept None.

  • Synchronization
    • later.event.BiDirectionalEvent - two way asyncio.Event for Handshake style synchronization.

License

later is Apache licensed, as found in the LICENSE file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

later-26.6.1.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

later-26.6.1-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

Details for the file later-26.6.1.tar.gz.

File metadata

  • Download URL: later-26.6.1.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for later-26.6.1.tar.gz
Algorithm Hash digest
SHA256 5f22cc9878b50749abcdba669b78dd9c84fa5c8178fe8c8bde0d0c19c5db9471
MD5 38f36941b64a00cfbe78108de92c0903
BLAKE2b-256 1a52d541e9bed77ab6a14c2c0f84fcc88fdd3d099624d45501ea78b4bca026ba

See more details on using hashes here.

File details

Details for the file later-26.6.1-py3-none-any.whl.

File metadata

  • Download URL: later-26.6.1-py3-none-any.whl
  • Upload date:
  • Size: 42.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for later-26.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 15681917dba6abd927f873a224bbc2cb8de612e59d8bd57500095c039b3edc23
MD5 c97a9a87a270ae10d5f4189176045a9d
BLAKE2b-256 80c3ef5abc995cc489d1c69653f640dc162a804db208776a3c2c44e5dd96bf6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page