-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recipes for trio and async_generator
- Loading branch information
1 parent
c5c1cd8
commit 12a8384
Showing
2 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{% set name = "async_generator" %} | ||
{% set version = "1.9" %} | ||
{% set hash_type = "sha256" %} | ||
{% set hash_value = "b7d5465c6174fe86dba498ececb175f93a6097ffb7cc91946405e1f05b848371" %} | ||
|
||
package: | ||
name: '{{ name|lower }}' | ||
version: '{{ version }}' | ||
|
||
source: | ||
fn: '{{ name }}-{{ version }}.tar.gz' | ||
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz | ||
'{{ hash_type }}': '{{ hash_value }}' | ||
|
||
build: | ||
number: 0 | ||
script: python setup.py install --single-version-externally-managed --record=record.txt | ||
noarch: python | ||
|
||
requirements: | ||
build: | ||
- python | ||
- setuptools | ||
run: | ||
- python | ||
|
||
test: | ||
imports: | ||
- async_generator | ||
- async_generator._tests | ||
|
||
about: | ||
home: https://github.com/python-trio/async_generator | ||
license: MIT | ||
license_family: MIT | ||
license_file: '' | ||
summary: Async generators and context managers for Python 3.5+ | ||
description: ".. image:: https://img.shields.io/badge/chat-join%20now-blue.svg\n :target: https://gitter.im/python-trio/general\n :alt: Join chatroom\n\n.. image:: https://img.shields.io/badge/docs-read%20now-blue.svg\n\ | ||
\ :target: https://async-generator.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://travis-ci.org/njsmith/async_generator.svg?branch=master\n :target:\ | ||
\ https://travis-ci.org/njsmith/async_generator\n :alt: Automated test status\n\n.. image:: https://ci.appveyor.com/api/projects/status/af4eyed8o8tc3t0r/branch/master?svg=true\n :target: https://ci.appveyor.com/project/python-trio/trio/history\n\ | ||
\ :alt: Automated test status (Windows)\n\n.. image:: https://codecov.io/gh/njsmith/async_generator/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/njsmith/async_generator\n :alt:\ | ||
\ Test coverage\n\nThe async_generator library\n===========================\n\nPython 3.6 added `async generators\n<https://www.python.org/dev/peps/pep-0525/>`__. (What's an async\ngenerator? `Check\ | ||
\ out my 5-minute lightning talk demo from PyCon 2016\n<https://youtu.be/PulzIT8KYLk?t=24m30s>`__.) Python 3.7 adds some more\ntools to make them usable, like ``contextlib.asynccontextmanager``.\n\n\ | ||
This library gives you all that back to Python 3.5.\n\nFor example, this code only works in Python 3.6+:\n\n.. code-block:: python3\n\n async def load_json_lines(stream_reader):\n async for\ | ||
\ line in stream_reader:\n yield json.loads(line)\n\nBut this code does the same thing, and works on Python 3.5+:\n\n.. code-block:: python3\n\n from async_generator import async_generator,\ | ||
\ yield_\n\n @async_generator\n async def load_json_lines(stream_reader):\n async for line in stream_reader:\n await yield_(json.loads(line))\n\nOr in Python 3.7, you can write:\n\ | ||
\n.. code-block:: python3\n\n from contextlib import asynccontextmanager\n\n @asynccontextmanager\n async def background_server():\n async with trio.open_nursery() as nursery:\n \ | ||
\ value = await nursery.start(my_server)\n try:\n yield value\n finally:\n # Kill the server when the scope exits\n nursery.cancel_scope.cancel()\n\ | ||
\nThis is the same, but back to 3.5:\n\n.. code-block:: python3\n\n from async_generator import async_generator, yield_, asynccontextmanager\n\n @asynccontextmanager\n @async_generator\n async\ | ||
\ def background_server():\n async with trio.open_nursery() as nursery:\n value = await nursery.start(my_server)\n try:\n await yield_(value)\n finally:\n\ | ||
\ # Kill the server when the scope exits\n nursery.cancel_scope.cancel()\n\n(And if you're on 3.6, you can use ``@asynccontextmanager`` with\nnative generators.)\n\n\nLet's\ | ||
\ do this\n=============\n\n* Install: ``python3 -m pip install -U async_generator`` (or on Windows,\n maybe ``py -3 -m pip install -U async_generator``\n\n* Manual: https://async-generator.readthedocs.io/\n\ | ||
\n* Bug tracker and source code: https://github.com/python-trio/async_generator\n\n* Real-time chat: https://gitter.im/python-trio/general\n\n* License: MIT or Apache 2, your choice\n\n* Contributor\ | ||
\ guide: https://trio.readthedocs.io/en/latest/contributing.html\n\n* Code of conduct: Contributors are requested to follow our `code of\n conduct\n <https://trio.readthedocs.io/en/latest/code-of-conduct.html>`__\ | ||
\ in\n all project spaces.\n\n\nHow come some of those links talk about \"trio\"?\n===============================================\n\n`Trio <https://trio.readthedocs.io>`__ is a new async concurrency\n\ | ||
library for Python that's obsessed with usability and correctness \u2013 we\nwant to make it *easy* to get things *right*. The ``async_generator``\nlibrary is maintained by the Trio project as part\ | ||
\ of that mission, and\nbecause Trio uses ``async_generator`` internally.\n\nYou can use ``async_generator`` with any async library. It works great\nwith ``asyncio``, or Twisted, or whatever you like.\ | ||
\ (But we think Trio\nis pretty sweet.)\n\n\n" | ||
doc_url: '' | ||
dev_url: '' | ||
|
||
extra: | ||
recipe-maintainers: | ||
- nicoddemus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{% set name = "trio" %} | ||
{% set version = "0.3.0" %} | ||
{% set hash_type = "sha256" %} | ||
{% set hash_value = "d54fcfb12305bbdaa11843efe22c130acdbc72fa7dafb9c5d777051de3fbd72e" %} | ||
|
||
package: | ||
name: '{{ name|lower }}' | ||
version: '{{ version }}' | ||
|
||
source: | ||
fn: '{{ name }}-{{ version }}.tar.gz' | ||
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz | ||
'{{ hash_type }}': '{{ hash_value }}' | ||
|
||
build: | ||
skip: True # [py27] | ||
number: 0 | ||
script: python setup.py install --single-version-externally-managed --record=record.txt | ||
|
||
requirements: | ||
build: | ||
- python | ||
- setuptools | ||
run: | ||
- python | ||
- attrs | ||
- sortedcontainers | ||
- async_generator >=1.6 | ||
- idna | ||
- cffi # [win] | ||
|
||
test: | ||
imports: | ||
- trio | ||
- trio._core | ||
- trio._core.tests | ||
- trio._core.tests.test_multierror_scripts | ||
- trio.testing | ||
- trio.tests | ||
|
||
about: | ||
home: https://github.com/python-trio/trio | ||
license: MIT | ||
license_family: MIT | ||
license_file: '' | ||
summary: An async/await-native I/O library for humans and snake people | ||
description: ".. image:: https://cdn.rawgit.com/python-trio/trio/9b0bec646a31e0d0f67b8b6ecc6939726faf3e17/logo/logo-with-background.svg\n :width: 200px\n :align: right\n\nThe Trio project's goal is\ | ||
\ to produce a production-quality, `permissively\nlicensed <https://github.com/python-trio/trio/blob/master/LICENSE>`__,\nasync/await-native I/O library for Python. Like all async libraries,\nits main\ | ||
\ purpose is to help you write programs that do **multiple\nthings at the same time** with **parallelized I/O**. A web spider that\nwants to fetch lots of pages in parallel, a web server that needs\ | ||
\ to\njuggle lots of downloads and websocket connections at the same time, a\nprocess supervisor monitoring multiple subprocesses... that sort of\nthing. Compared to other libraries, Trio attempts to\ | ||
\ distinguish\nitself with an obsessive focus on **usability** and\n**correctness**. Concurrency is complicated; we try to make it *easy*\nto get things *right*.\n\nTrio was built from the ground up\ | ||
\ to take advantage of the `latest\nPython features <https://www.python.org/dev/peps/pep-0492/>`__, and\ndraws inspiration from `many sources\n<https://github.com/python-trio/trio/wiki/Reading-list>`__,\ | ||
\ in\nparticular Dave Beazley's `Curio <https://curio.readthedocs.io/>`__.\nThe resulting design is radically simpler than older competitors like\n`asyncio <https://docs.python.org/3/library/asyncio.html>`__\ | ||
\ and\n`Twisted <https://twistedmatrix.com/>`__, yet just as capable. Trio is\nthe Python I/O library I always wanted; I find it makes building\nI/O-oriented programs easier, less error-prone, and just\ | ||
\ plain more\nfun. Perhaps you'll find the same.\n\nThis project is young and still somewhat experimental: the overall\ndesign is solid and the existing features are fully tested and\ndocumented, but\ | ||
\ you may encounter missing functionality or rough\nedges. We *do* encourage you do use it, but you should `read and\nsubscribe to issue #1\n<https://github.com/python-trio/trio/issues/1>`__ to get\ | ||
\ warning and a\nchance to give feedback about any compatibility-breaking changes.\n\nVital statistics:\n\n* Supported environments: Linux, MacOS, or Windows running some kind of Python\n 3.5-or-better\ | ||
\ (either CPython or PyPy3 is fine). \\*BSD and illumus likely\n work too, but are not tested.\n\n* Install: ``python3 -m pip install -U trio`` (or on Windows, maybe\n ``py -3 -m pip install -U trio``).\ | ||
\ No compiler needed.\n\n* Tutorial and reference manual: https://trio.readthedocs.io\n\n* Bug tracker and source code: https://github.com/python-trio/trio\n\n* License: MIT or Apache 2, your choice\n\ | ||
\n* Contributor guide: https://trio.readthedocs.io/en/latest/contributing.html\n\n* Code of conduct: Contributors are requested to follow our `code of\n conduct\n <https://trio.readthedocs.io/en/latest/code-of-conduct.html>`_\n\ | ||
\ in all project spaces.\n\n\n" | ||
doc_url: '' | ||
dev_url: '' | ||
|
||
extra: | ||
recipe-maintainers: | ||
- nicoddemus |