Skip to content

Experimental extensions to Trio, the friendly Python async I/O library

License

Notifications You must be signed in to change notification settings

mikenerone/tricycle

 
 

Repository files navigation

tricycle: experimental extensions for Trio

Latest PyPI version Automated test status Documentation status Test coverage Code style: black Checked with mypy

This is a library of interesting-but-maybe-not-yet-fully-proven extensions to Trio, the friendly Python library for async concurrency and I/O.

While we won't release known-broken code, and we strive for cleanliness and good test coverage, please be advised that tricycle is mostly one person's box of tools that seemed like a good idea at the time, and should be treated with according skepticism if you're contemplating using it in production. It hasn't necessarily been reviewed or tested to Trio's standards, it supports at minimum Python 3.7, and some features might not be available on PyPy or on Windows.

  • If you find that it meets your needs, you're welcome to use it. We'll endeavor to provide a (short) deprecation period on API changes, but no guarantees on that yet.
  • If you find that it doesn't meet your needs, feel free to let us know, but don't say you weren't warned. :-)

Currently we have:

  • a readers-writer lock (tricycle.RWLock)
  • slightly higher-level stream wrappers (tricycle.BufferedReceiveStream and tricycle.TextReceiveStream)
  • some tools for managing cancellation (tricycle.open_service_nursery() and tricycle.MultiCancelScope)
  • a way to make objects that want to keep background tasks running during the object's lifetime (tricycle.BackgroundObject and the more general tricycle.ScopedObject)
  • [watch this space!]

License and history

tricycle is licensed under your choice of the MIT or Apache 2.0 license. See LICENSE for details.

This library has its origins in a package of utilities that the author wrote at Hudson River Trading while building things for them with Trio. Many thanks to HRT for supporting open source in this way!

About

Experimental extensions to Trio, the friendly Python async I/O library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.4%
  • Shell 3.6%