You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
3.5KB

  1. Metadata-Version: 2.1
  2. Name: greenlet
  3. Version: 1.1.0
  4. Summary: Lightweight in-process concurrent programming
  5. Home-page: https://greenlet.readthedocs.io/
  6. License: MIT License
  7. Project-URL: Bug Tracker, https://github.com/python-greenlet/greenlet/issues
  8. Project-URL: Source Code, https://github.com/python-greenlet/greenlet/
  9. Project-URL: Documentation, https://greenlet.readthedocs.io/
  10. Platform: any
  11. Classifier: Intended Audience :: Developers
  12. Classifier: License :: OSI Approved :: MIT License
  13. Classifier: Natural Language :: English
  14. Classifier: Programming Language :: C
  15. Classifier: Programming Language :: Python
  16. Classifier: Programming Language :: Python :: 2
  17. Classifier: Programming Language :: Python :: 2.7
  18. Classifier: Programming Language :: Python :: 3
  19. Classifier: Programming Language :: Python :: 3.5
  20. Classifier: Programming Language :: Python :: 3.6
  21. Classifier: Programming Language :: Python :: 3.7
  22. Classifier: Programming Language :: Python :: 3.8
  23. Classifier: Programming Language :: Python :: 3.9
  24. Classifier: Programming Language :: Python :: 3.10
  25. Classifier: Operating System :: OS Independent
  26. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  27. Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
  28. Description-Content-Type: text/x-rst
  29. Provides-Extra: docs
  30. Requires-Dist: Sphinx ; extra == 'docs'
  31. Provides-Extra: test
  32. .. This file is included into docs/history.rst
  33. .. image:: https://github.com/python-greenlet/greenlet/workflows/tests/badge.svg
  34. :target: https://github.com/python-greenlet/greenlet/actions
  35. Greenlets are lightweight coroutines for in-process concurrent
  36. programming.
  37. The "greenlet" package is a spin-off of `Stackless`_, a version of
  38. CPython that supports micro-threads called "tasklets". Tasklets run
  39. pseudo-concurrently (typically in a single or a few OS-level threads)
  40. and are synchronized with data exchanges on "channels".
  41. A "greenlet", on the other hand, is a still more primitive notion of
  42. micro-thread with no implicit scheduling; coroutines, in other words.
  43. This is useful when you want to control exactly when your code runs.
  44. You can build custom scheduled micro-threads on top of greenlet;
  45. however, it seems that greenlets are useful on their own as a way to
  46. make advanced control flow structures. For example, we can recreate
  47. generators; the difference with Python's own generators is that our
  48. generators can call nested functions and the nested functions can
  49. yield values too. (Additionally, you don't need a "yield" keyword. See
  50. the example in `test_generator.py
  51. <https://github.com/python-greenlet/greenlet/blob/adca19bf1f287b3395896a8f41f3f4fd1797fdc7/src/greenlet/tests/test_generator.py#L1>`_).
  52. Greenlets are provided as a C extension module for the regular unmodified
  53. interpreter.
  54. .. _`Stackless`: http://www.stackless.com
  55. Who is using Greenlet?
  56. ======================
  57. There are several libraries that use Greenlet as a more flexible
  58. alternative to Python's built in coroutine support:
  59. - `Concurrence`_
  60. - `Eventlet`_
  61. - `Gevent`_
  62. .. _Concurrence: http://opensource.hyves.org/concurrence/
  63. .. _Eventlet: http://eventlet.net/
  64. .. _Gevent: http://www.gevent.org/
  65. Getting Greenlet
  66. ================
  67. The easiest way to get Greenlet is to install it with pip::
  68. pip install greenlet
  69. Source code archives and binary distributions are vailable on the
  70. python package index at https://pypi.org/project/greenlet
  71. The source code repository is hosted on github:
  72. https://github.com/python-greenlet/greenlet
  73. Documentation is available on readthedocs.org:
  74. https://greenlet.readthedocs.io