{"id":28628273,"url":"https://github.com/sqlalchemy/awaitlet","last_synced_at":"2025-07-05T09:02:25.134Z","repository":{"id":244120515,"uuid":"814294858","full_name":"sqlalchemy/awaitlet","owner":"sqlalchemy","description":"invoke asyncio awaitables from non-async functions","archived":false,"fork":false,"pushed_at":"2024-07-01T13:24:52.000Z","size":116,"stargazers_count":57,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-21T04:27:53.016Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sqlalchemy.png","metadata":{"files":{"readme":"README.rst","changelog":null,"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":"2024-06-12T18:10:17.000Z","updated_at":"2025-04-12T16:46:53.000Z","dependencies_parsed_at":"2024-06-25T20:06:26.332Z","dependency_job_id":null,"html_url":"https://github.com/sqlalchemy/awaitlet","commit_stats":null,"previous_names":["sqlalchemy/awaitlet"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sqlalchemy/awaitlet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlalchemy%2Fawaitlet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlalchemy%2Fawaitlet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlalchemy%2Fawaitlet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlalchemy%2Fawaitlet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sqlalchemy","download_url":"https://codeload.github.com/sqlalchemy/awaitlet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlalchemy%2Fawaitlet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259444983,"owners_count":22858553,"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":"2025-06-12T10:11:56.576Z","updated_at":"2025-06-12T10:11:57.087Z","avatar_url":"https://github.com/sqlalchemy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"========\nawaitlet\n========\n\nAllow non-async defs that invoke awaitables inside of asyncio applications.\n\nawaitlet allows existing programs written to use threads and blocking\nAPIs to be ported to asyncio, by replacing frontend and backend code with\nasyncio compatible approaches, but allowing intermediary code to remain\ncompletely unchanged.  Its primary use is to support code that is cross-compatible\nwith asyncio and non-asyncio runtime environments.\n\nThe entire API demonstrated in three lines, where a non ``async`` def can\nbe invoked in an asyncio context and can then call upon real awaitables\ndirectly::\n\n    import asyncio\n\n    import awaitlet\n\n    def asyncio_sleep():\n        return awaitlet.awaitlet(asyncio.sleep(5, result='hello'))\n\n    print(asyncio.run(awaitlet.async_def(asyncio_sleep)))\n\nawaitlet is spun out from SQLAlchemy's own `asyncio mediation layer\n\u003chttps://docs.sqlalchemy.org/en/latest/orm/extensions/asyncio.html\u003e`_, with no\ndependencies on SQLAlchemy itself.  awaitlet may be compared with another\nequivalent library `greenback \u003chttps://pypi.org/project/greenback/\u003e`_ which was\nreleased at roughly the same time as SQLAlchemy's asyncio API.\n\nawaitlet is intentionally fully compatible with SQLAlchemy's asyncio mediation\nlayer, and includes API patterns for:\n\n* Converting any threaded program (no SQLAlchemy dependency necessary) to use\n  asyncio patterns for front facing APIs and backends, without modifying\n  intermediary code\n* Converting threaded database-enabled programs to use asyncio patterns for\n  front facing APIs and backends, where those backends use SQLAlchemy's asyncio\n  API for database access\n* Converting threaded database-enabled programs to use asyncio patterns for\n  front facing APIs and backends, without modifying intermediary code that uses\n  SQLAlchemy's synchronous API for database access\n\nDocumentation for awaitlet is within this source distribution and availble on\nthe web at https://awaitlet.sqlalchemy.org .\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqlalchemy%2Fawaitlet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqlalchemy%2Fawaitlet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqlalchemy%2Fawaitlet/lists"}