All Projects → itamarst → Crochet

itamarst / Crochet

Licence: mit
Crochet: use Twisted anywhere!

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Crochet

Arsenic
Async WebDriver implementation for asyncio and asyncio-compatible frameworks
Stars: ✭ 209 (-2.34%)
Mutual labels:  async, twisted
Falcon
A high-performance web server for Ruby, supporting HTTP/1, HTTP/2 and TLS.
Stars: ✭ 2,058 (+861.68%)
Mutual labels:  async, asynchronous
Rubico
[a]synchronous functional programming
Stars: ✭ 133 (-37.85%)
Mutual labels:  async, asynchronous
Mioco
[no longer maintained] Scalable, coroutine-based, fibers/green-threads for Rust. (aka MIO COroutines).
Stars: ✭ 125 (-41.59%)
Mutual labels:  async, asynchronous
Agkozak Zsh Prompt
A fast, asynchronous ZSH prompt with color ASCII indicators of Git, exit, SSH, virtual environment, and vi mode status. Framework-agnostic and customizable.
Stars: ✭ 182 (-14.95%)
Mutual labels:  async, asynchronous
Kitchen Async
A Promise library for ClojureScript, or a poor man's core.async
Stars: ✭ 128 (-40.19%)
Mutual labels:  async, asynchronous
Kubernetes asyncio
Python asynchronous client library for Kubernetes http://kubernetes.io/
Stars: ✭ 147 (-31.31%)
Mutual labels:  async, asynchronous
Ws Machine
WS-Machine is a websocket finite state machine for client websocket connections (Go)
Stars: ✭ 110 (-48.6%)
Mutual labels:  async, asynchronous
Mlua
High level Lua 5.4/5.3/5.2/5.1 (including LuaJIT) bindings to Rust with async/await support
Stars: ✭ 176 (-17.76%)
Mutual labels:  async, asynchronous
Thenextquant
Asynchronous driven quantitative trading framework.
Stars: ✭ 172 (-19.63%)
Mutual labels:  async, asynchronous
Drone
CLI utility for Drone, an Embedded Operating System.
Stars: ✭ 114 (-46.73%)
Mutual labels:  async, asynchronous
Iguazu
✨ Iguazu is a simple Redux-powered Async Query engine
Stars: ✭ 186 (-13.08%)
Mutual labels:  async, asynchronous
Async Backplane
Simple, Erlang-inspired fault-tolerance framework for Rust Futures.
Stars: ✭ 113 (-47.2%)
Mutual labels:  async, asynchronous
Spotify.py
🌐 API wrapper for Spotify 🎶
Stars: ✭ 131 (-38.79%)
Mutual labels:  async, asynchronous
Aiormq
Pure python AMQP 0.9.1 asynchronous client library
Stars: ✭ 112 (-47.66%)
Mutual labels:  async, asynchronous
Tascalate Concurrent
Implementation of blocking (IO-Bound) cancellable java.util.concurrent.CompletionStage and related extensions to java.util.concurrent.ExecutorService-s
Stars: ✭ 144 (-32.71%)
Mutual labels:  async, asynchronous
Base64 Async
Non-blocking chunked Base64 encoding
Stars: ✭ 98 (-54.21%)
Mutual labels:  async, asynchronous
Datastore
🐹 Bloat free and flexible interface for data store and database access.
Stars: ✭ 99 (-53.74%)
Mutual labels:  async, asynchronous
Metasync
Asynchronous Programming Library for JavaScript & Node.js
Stars: ✭ 164 (-23.36%)
Mutual labels:  async, asynchronous
Asyncorm
Fully Async ORM inspired in django's
Stars: ✭ 182 (-14.95%)
Mutual labels:  async, asynchronous

Crochet: Use Twisted anywhere!

Crochet is an MIT-licensed library that makes it easier to use Twisted from regular blocking code. Some use cases include:

  • Easily use Twisted from a blocking framework like Django or Flask.
  • Write a library that provides a blocking API, but uses Twisted for its implementation.
  • Port blocking code to Twisted more easily, by keeping a backwards compatibility layer.
  • Allow normal Twisted programs that use threads to interact with Twisted more cleanly from their threaded parts. For example, this can be useful when using Twisted as a WSGI container_.

.. _WSGI container: https://twistedmatrix.com/documents/current/web/howto/web-in-60/wsgi.html

Crochet is maintained by Itamar Turner-Trauring.

Note: Crochet development is pretty slow these days because mostly it Just Works. PyPI shows about 30,000 downloads a month, so existing users seem happy: https://pypistats.org/packages/crochet

You can install Crochet by running::

$ pip install crochet

Downloads are available on PyPI_.

Documentation can be found on Read The Docs_.

Bugs and feature requests should be filed at the project Github page_.

.. _Read the Docs: https://crochet.readthedocs.org/ .. _Github page: https://github.com/itamarst/crochet/ .. _PyPI: https://pypi.python.org/pypi/crochet

API and features

.. image:: https://travis-ci.org/itamarst/crochet.png?branch=master :target: http://travis-ci.org/itamarst/crochet :alt: Build Status

Crochet supports Python 2.7, 3.5, 3.6, 3.7, and 3.8 as well as PyPy and PyPy3.

Crochet provides the following basic APIs:

  • Allow blocking code to call into Twisted and block until results are available or a timeout is hit, using the crochet.wait_for decorator.
  • A lower-level API (crochet.run_in_reactor) allows blocking code to run code "in the background" in the Twisted thread, with the ability to repeatedly check if it's done.

Crochet will do the following on your behalf in order to enable these APIs:

  • Transparently start Twisted's reactor in a thread it manages.
  • Shut down the reactor automatically when the process' main thread finishes.
  • Hook up Twisted's log system to the Python standard library logging framework. Unlike Twisted's built-in logging bridge, this includes support for blocking Handler instances.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].