{"id":16114747,"url":"https://github.com/solarliner/python-call","last_synced_at":"2026-02-01T23:02:07.878Z","repository":{"id":50203040,"uuid":"143877285","full_name":"SolarLiner/python-call","owner":"SolarLiner","description":"Thread-based, JS-like asynchronous calls for Python. Works in both Python 2.7 and Python 3.5+.","archived":false,"fork":false,"pushed_at":"2022-12-08T02:24:25.000Z","size":45,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-06-16T03:39:19.164Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SolarLiner.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-07T13:29:44.000Z","updated_at":"2021-09-15T15:20:02.000Z","dependencies_parsed_at":"2023-01-24T05:40:15.556Z","dependency_job_id":null,"html_url":"https://github.com/SolarLiner/python-call","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/SolarLiner/python-call","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpython-call","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpython-call/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpython-call/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpython-call/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolarLiner","download_url":"https://codeload.github.com/SolarLiner/python-call/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpython-call/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-09T20:15:39.401Z","updated_at":"2026-02-01T23:02:07.861Z","avatar_url":"https://github.com/SolarLiner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Call\n====\n\n.. image:: https://api.codacy.com/project/badge/Grade/91959f98ff34469884415e96ba2ff763    :target: https://www.codacy.com/app/solarliner/call?utm_source=gitlab.com\u0026amp;utm_medium=referral\u0026amp;utm_content=solarliner/call\u0026amp;utm_campaign=Badge_Grade\n\nThread-based, JS-like asynchronous calls for Python. Works in both\nPython 2.7 and Python 3.5+.\n\nInstall\n-------\n\nRelease version:\n\n.. code:: bash\n\tpip install call\n\nDevelopment version\n\n.. code:: bash\n\n    git clone https://gitlab.com/solarliner/call.git\n    cd call\n    # Activate virtualenv if needed\n    python setup.py install\n\nThe library requires no other dependencies, and (will soon) support\nPython's ``await`` keyword.\n\nUse\n---\n\nCreate a call:\n\n.. code:: python\n\n    def cb(resolve, reject):\n        result = factorial(100)\n        resolve(result)\n        \n    call = Call(cb)\n\nWrap a synchronous function in a Call:\n\n.. code:: python\n    call = Call.from_function(factorial, 10)\n\nChain calls with the ``then`` keyword\n\n.. code:: python\n\n    call = Call(cb).then(lambda val: print(val))\n\nCatch errors:\n\n.. code:: python\n\n    call = Call(cb)\\\n        .then(lambda val: raise Exception())\\\n        .catch(lambda err: print('Whoops'))\n\nCompose calls:\n\n.. code:: python\n\n    results = Call.all([Call(cb) for _ in range(10)])\n\nBlock thread until resolved (or raises on failure):\n\n.. code:: python\n\n    result = call.wait()\n\nWait for call to either resolve or reject. Note that it is not recommended to get the data directly, as it may be\n``None``, which may or may not indicate that an error has occurred.\n\n.. code:: python\n\n    call.join()\n    result = call.data  # Not recommended\n\nContribute\n----------\n\nThe repository follows the ``git flow`` standards. Create a feature branch, then ask for a pull/merge request.\n\nThe main repository is on GitLab, however the GitHub mirror is functional and you should be able to ask for pull\nrequests. However, they will be processed in GitLab.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolarliner%2Fpython-call","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolarliner%2Fpython-call","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolarliner%2Fpython-call/lists"}