Skip to main content

Fast, concurrent, micro server Python library http://vanillapy.readthedocs.org/

Project description

If Go and ZeroMQ had a baby, and that baby grew up and started dating PyPy, and they had a baby, it might look like Vanilla.

Build Status Coverage Status

Example

>>> h = vanilla.Hub()
>>> sender, recver = h.pipe()
>>> h.spawn(sender.send, 'Hello World')
>>> recver.recv()
'Hello World'

Documentation

Read the Docs

Overview

Vanilla is a fast, concurrent, micro server-library. It’s designed to be used with PyPy and with CPython 2.6 or 2.7. Vanilla is:

  • lightweight: requires no external dependencies when using PyPy. When using CPython you’ll just need to install the Greenlet and CFFI packages.

  • concurrent: for creating highly concurrent actor based architectures taking inspiration from Go to use coroutines and message passing as core building blocks.

  • utilitarian: a swiss army knife for assembling services. Vanilla abstracts multiplexing push/pull and request/reply message passing patterns over TCP and UDP; signal handling; thread pools; process creation, control and inter-communication

  • predictable: Vanilla’s concurrency model is based on coroutines or green threads, via the Greenlet package. Arguably this model allows a more natural and testable coding style than asynchronous callback models used by Twisted, Tornado and Node.

    However, green threads have been popularized in the Python world by Eventlet and Gevent, resulting in this model becoming synonymous with monkey patching. Vanilla is strict about never monkey patching, with a focus on being explicit and easy to reason about.

  • pragmatic: it let’s you quickly assemble services which will run on Linux. But only Linux. This makes it easier to avoid introducing dependencies on cross platform asynchronous UI libraries like libevent, libev and libuv making vanilla PyPy support simple.

Installation

pip install vanilla

Project Status

The current status is experimental. Vanilla can do a lot of interesting things, but it’s APIs, particularly it’s message passing APIs are under rapid iteration. The HTTP implementation is very incomplete.

However, I think the current status is suitable for hobby projects and it’d be great to have people using it for non-critical things to help shape how the APIs develop!

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

vanilla-0.0.3.tar.gz (19.9 kB view hashes)

Uploaded Source

Supported by

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