{"id":24994299,"url":"https://github.com/deathaxe/sublime-asyncio","last_synced_at":"2025-03-29T14:17:21.517Z","repository":{"id":274530693,"uuid":"922641267","full_name":"deathaxe/sublime-asyncio","owner":"deathaxe","description":"Show case how to use asyncio to drive Sublime Text plugins","archived":false,"fork":false,"pushed_at":"2025-03-23T18:16:46.000Z","size":297,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T18:34:30.403Z","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/deathaxe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-26T18:28:51.000Z","updated_at":"2025-03-23T18:16:50.000Z","dependencies_parsed_at":"2025-01-27T21:50:39.402Z","dependency_job_id":null,"html_url":"https://github.com/deathaxe/sublime-asyncio","commit_stats":null,"previous_names":["deathaxe/sublime-asyncio"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2Fsublime-asyncio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2Fsublime-asyncio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2Fsublime-asyncio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2Fsublime-asyncio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deathaxe","download_url":"https://codeload.github.com/deathaxe/sublime-asyncio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246193251,"owners_count":20738452,"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-02-04T14:51:20.408Z","updated_at":"2025-03-29T14:17:21.492Z","avatar_url":"https://github.com/deathaxe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AsyncIO for Sublime Text\n\nThis package demonstrates power of asyncio and [simdjson](https://pypi.org/project/pysimdjson/)\nto handle hundrets of thousands of completions smoothly,\nwithout blocking Sublime Text's UI in any way.\n\nIt also show cases how to turn any ST event handler\ninto an asyncio coroutine by just decorating it.\n\n```py\nfrom __future__ import annotations\nimport simdjson\nimport sublime_plugin\n\nfrom .vendor import aio_sublime\n\n\ndef plugin_loaded():\n    aio_sublime.setup_event_loop()\n\n\ndef plugin_unloaded():\n    aio_sublime.shutdown_event_loop()\n\n\nclass CompletionListener(sublime_plugin.ViewEventListener):\n    parser = simdjson.Parser()\n\n    @aio_sublime.asyncio_completions\n    async def on_query_completions(self, prefix, locations):\n        doc = self.parser.parse(data)\n        return (i[\"label\"] for i in doc[\"items\"])\n\n    @aio_sublime.asyncio_event\n    async def on_modified(self):\n        print(f\"{self.view!r} got modified on io loop!\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathaxe%2Fsublime-asyncio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeathaxe%2Fsublime-asyncio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathaxe%2Fsublime-asyncio/lists"}