METADATA 3.7 KB

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