METADATA 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. Metadata-Version: 2.4
  2. Name: greenlet
  3. Version: 3.3.2
  4. Summary: Lightweight in-process concurrent programming
  5. Author-email: Alexey Borzenkov <snaury@gmail.com>
  6. Maintainer-email: Jason Madden <jason@seecoresoftware.com>
  7. License-Expression: MIT AND PSF-2.0
  8. Project-URL: Homepage, https://greenlet.readthedocs.io
  9. Project-URL: Documentation, https://greenlet.readthedocs.io
  10. Project-URL: Repository, https://github.com/python-greenlet/greenlet
  11. Project-URL: Issues, https://github.com/python-greenlet/greenlet/issues
  12. Project-URL: Changelog, https://greenlet.readthedocs.io/en/latest/changes.html
  13. Keywords: greenlet,coroutine,concurrency,threads,cooperative
  14. Classifier: Development Status :: 5 - Production/Stable
  15. Classifier: Intended Audience :: Developers
  16. Classifier: Natural Language :: English
  17. Classifier: Programming Language :: C
  18. Classifier: Programming Language :: Python
  19. Classifier: Programming Language :: Python :: 3
  20. Classifier: Programming Language :: Python :: 3.10
  21. Classifier: Programming Language :: Python :: 3.11
  22. Classifier: Programming Language :: Python :: 3.12
  23. Classifier: Programming Language :: Python :: 3.13
  24. Classifier: Programming Language :: Python :: 3.14
  25. Classifier: Operating System :: OS Independent
  26. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  27. Requires-Python: >=3.10
  28. Description-Content-Type: text/x-rst
  29. License-File: LICENSE
  30. License-File: LICENSE.PSF
  31. Provides-Extra: docs
  32. Requires-Dist: Sphinx; extra == "docs"
  33. Requires-Dist: furo; extra == "docs"
  34. Provides-Extra: test
  35. Requires-Dist: objgraph; extra == "test"
  36. Requires-Dist: psutil; extra == "test"
  37. Requires-Dist: setuptools; extra == "test"
  38. Dynamic: license-file
  39. .. This file is included into docs/history.rst
  40. Greenlets are lightweight coroutines for in-process concurrent
  41. programming.
  42. The "greenlet" package is a spin-off of `Stackless`_, a version of
  43. CPython that supports micro-threads called "tasklets". Tasklets run
  44. pseudo-concurrently (typically in a single or a few OS-level threads)
  45. and are synchronized with data exchanges on "channels".
  46. A "greenlet", on the other hand, is a still more primitive notion of
  47. micro-thread with no implicit scheduling; coroutines, in other words.
  48. This is useful when you want to control exactly when your code runs.
  49. You can build custom scheduled micro-threads on top of greenlet;
  50. however, it seems that greenlets are useful on their own as a way to
  51. make advanced control flow structures. For example, we can recreate
  52. generators; the difference with Python's own generators is that our
  53. generators can call nested functions and the nested functions can
  54. yield values too. (Additionally, you don't need a "yield" keyword. See
  55. the example in `test_generator.py
  56. <https://github.com/python-greenlet/greenlet/blob/adca19bf1f287b3395896a8f41f3f4fd1797fdc7/src/greenlet/tests/test_generator.py#L1>`_).
  57. Greenlets are provided as a C extension module for the regular unmodified
  58. interpreter.
  59. .. _`Stackless`: http://www.stackless.com
  60. Who is using Greenlet?
  61. ======================
  62. There are several libraries that use Greenlet as a more flexible
  63. alternative to Python's built in coroutine support:
  64. - `Concurrence`_
  65. - `Eventlet`_
  66. - `Gevent`_
  67. .. _Concurrence: http://opensource.hyves.org/concurrence/
  68. .. _Eventlet: http://eventlet.net/
  69. .. _Gevent: http://www.gevent.org/
  70. Getting Greenlet
  71. ================
  72. The easiest way to get Greenlet is to install it with pip::
  73. pip install greenlet
  74. Source code archives and binary distributions are available on the
  75. python package index at https://pypi.org/project/greenlet
  76. The source code repository is hosted on github:
  77. https://github.com/python-greenlet/greenlet
  78. Documentation is available on readthedocs.org:
  79. https://greenlet.readthedocs.io