{"id":13699489,"url":"https://github.com/saghul/python-fibers","last_synced_at":"2025-04-06T01:10:51.543Z","repository":{"id":9922956,"uuid":"11934599","full_name":"saghul/python-fibers","owner":"saghul","description":"Lightweight cooperative microthreads for Python","archived":false,"fork":false,"pushed_at":"2024-09-05T08:00:32.000Z","size":152,"stargazers_count":160,"open_issues_count":1,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-11T01:46:49.758Z","etag":null,"topics":["coroutines","greenlet","python","stacklet","tasklet"],"latest_commit_sha":null,"homepage":"https://python-fibers.readthedocs.io","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/saghul.png","metadata":{"files":{"readme":"README.rst","changelog":"ChangeLog","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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-06T21:06:34.000Z","updated_at":"2024-09-05T08:00:30.000Z","dependencies_parsed_at":"2022-09-14T05:01:43.618Z","dependency_job_id":"5ad69b84-55b2-4a90-a057-7e458dc3a64a","html_url":"https://github.com/saghul/python-fibers","commit_stats":{"total_commits":138,"total_committers":8,"mean_commits":17.25,"dds":"0.13043478260869568","last_synced_commit":"e96200d1bd058fb3e5931f37af68b2e18f3043d5"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saghul%2Fpython-fibers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saghul%2Fpython-fibers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saghul%2Fpython-fibers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saghul%2Fpython-fibers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saghul","download_url":"https://codeload.github.com/saghul/python-fibers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419861,"owners_count":20936012,"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":["coroutines","greenlet","python","stacklet","tasklet"],"created_at":"2024-08-02T20:00:34.597Z","updated_at":"2025-04-06T01:10:51.520Z","avatar_url":"https://github.com/saghul.png","language":"C","readme":"===========================================\nfibers: lightweight concurrent multitasking\n===========================================\n\n.. image:: https://badge.fury.io/py/fibers.png\n    :target: http://badge.fury.io/py/fibers\n\nOverview\n========\n\nFibers are lightweight primitives for cooperative multitasking in Python. They\nprovide means for running pieces of code that can be paused and resumed. Unlike\nthreads, which are preemptively scheduled, fibers are scheduled cooperatively,\nthat is, only one fiber will be running at a given point in time, and no other\nfiber will run until the user explicitly decides so.\n\nWhen a fiber is created it will not run automatically. A fiber must be 'switched'\ninto for it to run. Fibers can switch control to other fibers by way of the `switch`\nor `throw` functions, which switch control or raise and exception in the target\nfiber respectively.\n\nExample:\n\n::\n\n    import fibers\n\n    def func1():\n        print \"1\"\n        f2.switch()\n        print \"3\"\n        f2.switch()\n\n    def func2():\n        print \"2\"\n        f1.switch()\n        print \"4\"\n\n    f1 = fibers.Fiber(target=func1)\n    f2 = fibers.Fiber(target=func2)\n    f1.switch()\n\n\nThe above example will print \"1 2 3 4\", but the result was obtained by the\ncooperative work of 2 fibers yielding control to each other.\n\n\nCI status\n=========\n\n.. image:: https://github.com/saghul/python-fibers/actions/workflows/python-package.yml/badge.svg\n    ::target: https://github.com/saghul/python-fibers/actions/\n\n\nDocumentation\n=============\n\nhttp://readthedocs.org/docs/python-fibers/\n\n\nInstalling\n==========\n\nfibers can be installed via pip as follows:\n\n::\n\n    pip install fibers\n\n\nBuilding\n========\n\nGet the source:\n\n::\n\n    git clone https://github.com/saghul/python-fibers\n\n\nLinux:\n\n::\n\n    ./build_inplace\n\nMac OSX:\n\n::\n\n    (XCode needs to be installed)\n    export ARCHFLAGS=\"-arch x86_64\"\n    ./build_inplace\n\nMicrosoft Windows:\n\n::\n\n    python setup.py build_ext --inplace\n\n\nRunning the test suite\n======================\n\nThe test suite can be run using pytest:\n\n::\n\n    python -m pytest -v .\n\n\nAuthor\n======\n\nSaúl Ibarra Corretgé \u003cs@saghul.net\u003e\n\nThis project would not have been possible without the previous work done in\nthe `greenlet \u003chttp://greenlet.readthedocs.org\u003e`_ and stacklet (part of\n`PyPy \u003chttp://pypy.org\u003e`_) projects.\n\n\nLicense\n=======\n\nUnless stated otherwise on-file fibers uses the MIT license, check LICENSE file.\n\n\nSupported Python versions\n=========================\n\nPython \u003e= 3.7 are supported. Other older Python versions might work, but\nthey are not actively tested. CPython and PyPy are supported.\n\n\nSupported architectures\n=======================\n\nx86, x86-64, ARM, ARM64, MIPS64, PPC64 and s390x are supported.\n\n\nContributing\n============\n\nIf you'd like to contribute, fork the project, make a patch and send a pull\nrequest. Have a look at the surrounding code and please, make yours look\nalike.\n\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaghul%2Fpython-fibers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaghul%2Fpython-fibers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaghul%2Fpython-fibers/lists"}