Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

117 строки
4.0 KiB

  1. Metadata-Version: 2.4
  2. Name: greenlet
  3. Version: 3.2.3
  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 AND Python-2.0
  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. Project-URL: Changes, https://greenlet.readthedocs.io/en/latest/changes.html
  15. Keywords: greenlet coroutine concurrency threads cooperative
  16. Platform: any
  17. Classifier: Development Status :: 5 - Production/Stable
  18. Classifier: Intended Audience :: Developers
  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.9
  25. Classifier: Programming Language :: Python :: 3.10
  26. Classifier: Programming Language :: Python :: 3.11
  27. Classifier: Programming Language :: Python :: 3.12
  28. Classifier: Programming Language :: Python :: 3.13
  29. Classifier: Operating System :: OS Independent
  30. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  31. Requires-Python: >=3.9
  32. Description-Content-Type: text/x-rst
  33. License-File: LICENSE
  34. License-File: LICENSE.PSF
  35. Provides-Extra: docs
  36. Requires-Dist: Sphinx; extra == "docs"
  37. Requires-Dist: furo; extra == "docs"
  38. Provides-Extra: test
  39. Requires-Dist: objgraph; extra == "test"
  40. Requires-Dist: psutil; extra == "test"
  41. Dynamic: author
  42. Dynamic: author-email
  43. Dynamic: classifier
  44. Dynamic: description
  45. Dynamic: description-content-type
  46. Dynamic: home-page
  47. Dynamic: keywords
  48. Dynamic: license
  49. Dynamic: license-file
  50. Dynamic: maintainer
  51. Dynamic: maintainer-email
  52. Dynamic: platform
  53. Dynamic: project-url
  54. Dynamic: provides-extra
  55. Dynamic: requires-python
  56. Dynamic: summary
  57. .. This file is included into docs/history.rst
  58. Greenlets are lightweight coroutines for in-process concurrent
  59. programming.
  60. The "greenlet" package is a spin-off of `Stackless`_, a version of
  61. CPython that supports micro-threads called "tasklets". Tasklets run
  62. pseudo-concurrently (typically in a single or a few OS-level threads)
  63. and are synchronized with data exchanges on "channels".
  64. A "greenlet", on the other hand, is a still more primitive notion of
  65. micro-thread with no implicit scheduling; coroutines, in other words.
  66. This is useful when you want to control exactly when your code runs.
  67. You can build custom scheduled micro-threads on top of greenlet;
  68. however, it seems that greenlets are useful on their own as a way to
  69. make advanced control flow structures. For example, we can recreate
  70. generators; the difference with Python's own generators is that our
  71. generators can call nested functions and the nested functions can
  72. yield values too. (Additionally, you don't need a "yield" keyword. See
  73. the example in `test_generator.py
  74. <https://github.com/python-greenlet/greenlet/blob/adca19bf1f287b3395896a8f41f3f4fd1797fdc7/src/greenlet/tests/test_generator.py#L1>`_).
  75. Greenlets are provided as a C extension module for the regular unmodified
  76. interpreter.
  77. .. _`Stackless`: http://www.stackless.com
  78. Who is using Greenlet?
  79. ======================
  80. There are several libraries that use Greenlet as a more flexible
  81. alternative to Python's built in coroutine support:
  82. - `Concurrence`_
  83. - `Eventlet`_
  84. - `Gevent`_
  85. .. _Concurrence: http://opensource.hyves.org/concurrence/
  86. .. _Eventlet: http://eventlet.net/
  87. .. _Gevent: http://www.gevent.org/
  88. Getting Greenlet
  89. ================
  90. The easiest way to get Greenlet is to install it with pip::
  91. pip install greenlet
  92. Source code archives and binary distributions are available on the
  93. python package index at https://pypi.org/project/greenlet
  94. The source code repository is hosted on github:
  95. https://github.com/python-greenlet/greenlet
  96. Documentation is available on readthedocs.org:
  97. https://greenlet.readthedocs.io