{"id":22687360,"url":"https://github.com/cablehead/vanilla","last_synced_at":"2025-08-22T01:32:44.593Z","repository":{"id":17344686,"uuid":"20116072","full_name":"cablehead/vanilla","owner":"cablehead","description":"Straightforward concurrency for Python","archived":false,"fork":false,"pushed_at":"2016-06-13T20:05:34.000Z","size":466,"stargazers_count":111,"open_issues_count":17,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-16T18:29:13.587Z","etag":null,"topics":["concurrency","networking","python"],"latest_commit_sha":null,"homepage":"http://vanillapy.readthedocs.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cablehead.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-23T22:32:35.000Z","updated_at":"2024-11-28T16:29:22.000Z","dependencies_parsed_at":"2022-09-24T15:30:28.006Z","dependency_job_id":null,"html_url":"https://github.com/cablehead/vanilla","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fvanilla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fvanilla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fvanilla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fvanilla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cablehead","download_url":"https://codeload.github.com/cablehead/vanilla/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230547678,"owners_count":18243227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrency","networking","python"],"created_at":"2024-12-09T23:18:05.626Z","updated_at":"2024-12-20T07:07:04.682Z","avatar_url":"https://github.com/cablehead.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"|Vanilla| Welcome to Vanilla!\n=============================\n\n*If Go and ZeroMQ had a baby, and that baby grew up and started dating PyPy,\nand they had a baby, it might look like Vanilla.*\n\nOverview\n--------\n\nVanilla allows you to build concurrent software in Python. Vanilla programs are\nstructured around independent coroutines (greenlets) which communicate with\neach other via Pipes. Pipes are similar to channels in Go programming.\n\nThere's no callback crazyness and no monkey patching. Vanilla strives to be as\nexplict and straightforward as possible.\n\nDocumentation\n-------------\n\n`Read the Docs`_\n\n\nHere's how it looks:\n--------------------\n\nYou spawn coroutines:\n\n.. code:: python\n\n    h = vanilla.Hub()\n\n    def beat(message):\n        while True:\n            print(message)\n            h.sleep(1000)\n\n    h.spawn(beat, 'Tick')\n    h.spawn_later(500, beat, 'Tock')\n    # Tick / Tock / Tick / Tock\n\nCoroutines communicate via Pipes:\n\n.. code:: python\n\n    h = vanilla.Hub()\n    sender, recver = h.pipe()\n    h.spawn(sender.send, 'Hello World')\n    recver.recv()\n    # 'Hello World'\n\nPipe-fu; inspired by reactive functional patterns, Pipes can be chained:\n\n.. code:: python\n\n    h = vanilla.Hub()\n    p = h.pipe().map(lambda x: x*2)\n    h.spawn(p.send, 4)\n    p.recv()\n    # 8\n\nIn Vanilla, everything is a Pipe. Here's how TCP looks:\n\n.. code:: python\n\n    h = vanilla.Hub()\n\n    server = h.tcp.listen(port=9000)\n    # server is a Recver which dispenses new TCP connections\n\n    conn = server.recv()\n    # conn is a Pipe you can recv and send on\n\n    message = conn.recv()\n    conn.send(\"Echo: \" + message)\n\nInstallation\n------------\n\nVanilla works with Python 2.6 - 2.9 and PyPy.\n\n::\n\n    pip install vanilla\n\nStatus\n------\n\n|Build Status|\\ |Coverage Status|\n\n.. _Read the Docs: http://vanillapy.readthedocs.org/\n.. |Vanilla| image:: https://raw.githubusercontent.com/cablehead/vanilla/master/docs/_static/logo2.png\n.. |Build Status| image:: https://img.shields.io/travis/cablehead/vanilla.svg?style=flat-square\n   :target: https://travis-ci.org/cablehead/vanilla\n.. |Coverage Status| image:: https://img.shields.io/codecov/c/github/cablehead/vanilla.svg?style=flat-square\n   :target: https://codecov.io/github/cablehead/vanilla?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcablehead%2Fvanilla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcablehead%2Fvanilla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcablehead%2Fvanilla/lists"}