{"id":13500210,"url":"https://github.com/python-greenlet/greenlet","last_synced_at":"2025-05-14T07:07:45.012Z","repository":{"id":2064571,"uuid":"3003137","full_name":"python-greenlet/greenlet","owner":"python-greenlet","description":"Lightweight in-process concurrent programming","archived":false,"fork":false,"pushed_at":"2025-04-22T14:21:50.000Z","size":1855,"stargazers_count":1696,"open_issues_count":21,"forks_count":245,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-04-30T00:03:01.540Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/python-greenlet.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-12-17T21:12:01.000Z","updated_at":"2025-04-29T05:17:16.000Z","dependencies_parsed_at":"2024-06-18T11:21:14.308Z","dependency_job_id":"6a3aa7bb-e557-4f73-837c-a228186a58f5","html_url":"https://github.com/python-greenlet/greenlet","commit_stats":{"total_commits":950,"total_committers":76,"mean_commits":12.5,"dds":0.54,"last_synced_commit":"9c210e0879b897ad6f1d1ce9e72ccdf6feeb9153"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-greenlet%2Fgreenlet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-greenlet%2Fgreenlet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-greenlet%2Fgreenlet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-greenlet%2Fgreenlet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python-greenlet","download_url":"https://codeload.github.com/python-greenlet/greenlet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252416508,"owners_count":21744448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:00:53.427Z","updated_at":"2025-05-06T16:22:18.526Z","avatar_url":"https://github.com/python-greenlet.png","language":"C++","readme":".. This file is included into docs/history.rst\n\n\nGreenlets are lightweight coroutines for in-process concurrent\nprogramming.\n\nThe \"greenlet\" package is a spin-off of `Stackless`_, a version of\nCPython that supports micro-threads called \"tasklets\". Tasklets run\npseudo-concurrently (typically in a single or a few OS-level threads)\nand are synchronized with data exchanges on \"channels\".\n\nA \"greenlet\", on the other hand, is a still more primitive notion of\nmicro-thread with no implicit scheduling; coroutines, in other words.\nThis is useful when you want to control exactly when your code runs.\nYou can build custom scheduled micro-threads on top of greenlet;\nhowever, it seems that greenlets are useful on their own as a way to\nmake advanced control flow structures. For example, we can recreate\ngenerators; the difference with Python's own generators is that our\ngenerators can call nested functions and the nested functions can\nyield values too. (Additionally, you don't need a \"yield\" keyword. See\nthe example in `test_generator.py\n\u003chttps://github.com/python-greenlet/greenlet/blob/adca19bf1f287b3395896a8f41f3f4fd1797fdc7/src/greenlet/tests/test_generator.py#L1\u003e`_).\n\nGreenlets are provided as a C extension module for the regular unmodified\ninterpreter.\n\n.. _`Stackless`: http://www.stackless.com\n\n\nWho is using Greenlet?\n======================\n\nThere are several libraries that use Greenlet as a more flexible\nalternative to Python's built in coroutine support:\n\n - `Concurrence`_\n - `Eventlet`_\n - `Gevent`_\n\n.. _Concurrence: http://opensource.hyves.org/concurrence/\n.. _Eventlet: http://eventlet.net/\n.. _Gevent: http://www.gevent.org/\n\nGetting Greenlet\n================\n\nThe easiest way to get Greenlet is to install it with pip::\n\n  pip install greenlet\n\n\nSource code archives and binary distributions are available on the\npython package index at https://pypi.org/project/greenlet\n\nThe source code repository is hosted on github:\nhttps://github.com/python-greenlet/greenlet\n\nDocumentation is available on readthedocs.org:\nhttps://greenlet.readthedocs.io\n","funding_links":[],"categories":["C++","Process, Thread \u0026 Coroutine","C","资源列表","Asynchronous Programming","Awesome Python"],"sub_categories":["C++/C Toolkit","并发和并行","Concurrency and Parallelism"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-greenlet%2Fgreenlet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython-greenlet%2Fgreenlet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-greenlet%2Fgreenlet/lists"}