{"id":23684006,"url":"https://github.com/shawwwn/micropython-ainput","last_synced_at":"2026-04-29T07:34:55.397Z","repository":{"id":69404029,"uuid":"119764678","full_name":"shawwwn/micropython-ainput","owner":"shawwwn","description":"Asynchronous user input libraries using the MicroPython uasyncio","archived":false,"fork":false,"pushed_at":"2018-09-22T07:45:22.000Z","size":18,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T19:06:42.510Z","etag":null,"topics":["input","micropython","repl","telnet","uasyncio"],"latest_commit_sha":null,"homepage":"","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/shawwwn.png","metadata":{"files":{"readme":"README.md","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":"2018-02-01T01:15:18.000Z","updated_at":"2024-01-15T16:42:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"5958bedb-236f-49ca-b044-bd6ca0f3203e","html_url":"https://github.com/shawwwn/micropython-ainput","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shawwwn/micropython-ainput","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawwwn%2Fmicropython-ainput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawwwn%2Fmicropython-ainput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawwwn%2Fmicropython-ainput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawwwn%2Fmicropython-ainput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shawwwn","download_url":"https://codeload.github.com/shawwwn/micropython-ainput/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawwwn%2Fmicropython-ainput/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["input","micropython","repl","telnet","uasyncio"],"created_at":"2024-12-29T20:32:02.252Z","updated_at":"2026-04-29T07:34:55.380Z","avatar_url":"https://github.com/shawwwn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# micropython-ainput\nAsynchronous user input libraries using MicroPython [uasyncio](https://github.com/micropython/micropython-lib/tree/master/uasyncio) library\n\n\n\n## uaioinput \u003cesp32(**\\***), esp8266\u003e\nLibrary for for getting user input inside uasyncio event-loop\n\nNOTE(**\\***):\\\nFor this to work on esp32, you need to use [my fork of micropython](https://github.com/shawwwn/micropython) which incorperates a hack on the UART console.\n\n#### Usage\n```python\nimport uasyncio\nfrom uaioinput import ainput\ns = await ainput(prompt=\"User Input: \", password=False)\nprint(s)\n```\n\nTo prevent two `ainput()` being called at the same time, a global **lock** is \nimplemented at the module level.\\\nTo check **lock** status,\n```python\nimport uaioinput\nprint(uaioinput.input_lock.locked)\n```\n\n#### Dependencies\n * [micropython-uasyncio.synchro](https://github.com/micropython/micropython-lib/tree/master/uasyncio.synchro)\n\n\n\n## uaiorepl \u003cesp32(**\\***), esp8266\u003e\nA simple(dumb) REPL console that runs inside uasyncio event-loop.\\\nFeatures are severely limited comparing to the standard REPL, \nonly basic operations are supported.\n\nNOTE(**\\***):\\\n`ctrl+b` for manual linebreak\\\nFor this to work on esp32, you need to use [my fork of micropython](https://github.com/shawwwn/micropython) which incorperates a hack on the UART console.\n\n#### Usage\n```python\nimport uasyncio\nimport uaiorepl\nloop = uasyncio.get_event_loop()\nloop.call_soon(uaiorepl.start())\nloop.run_forever()\n```\n\n\n\n## uaiotelnet \u003cesp32(**\\***), esp8266\u003e\nModified telnet server that runs inside uasyncio event-loop.\\\nAdapted from **cpopp**'s [MicroTelnetServer](https://github.com/cpopp/MicroTelnetServer)\n\nNOTE(**\\***):\\\nMust run concurrently with a `uaiorepl` or `uaioinput` otherwise user input will still be blocked.\n\nNOTE:\\\nIf you are using Putty in windows as your telnet client, then you must set the following parameters:\\\n* Terminal - Local echo - force off\n* Terminal - Local line editing - force off\n* Connection - Telnet - [UNCHECK] Return key sends Telnet New Line instead of ^M\n\n#### Usage\n```python\nimport uasyncio, uaiotelnet, uaiorepl\nloop = uasyncio.get_event_loop()\nloop.call_soon(uaiotelnet.start(ip=\"0.0.0.0\", port=23))\nloop.call_soon(uaiorepl.start()) # uasyncio repl will process telnet input\nloop.run_forever()\n```\n\n\n\n## uaiowebrepl \u003cesp32(**\\***), esp8266\u003e\nThe offical implementation of WebREPL relies on socket interrupt and can be horribly slow.\nThis modified WebREPL runs inside uasyncio event-loop and is way faster than the official one.\\\nAdapted from [the offical WebREPL for ESP8266](https://github.com/micropython/micropython/blob/master/ports/esp8266/modules/webrepl.py)\n\nNOTE:\\\nMust run concurrently with `uaiorepl` or `uaioinput` otherwise user input will still be blocked.\n\n#### Usage\n```python\nimport uasyncio, uaiowebrepl, uaiorepl\nloop = uasyncio.get_event_loop()\nloop.call_soon(uaiowebrepl.start(ip=\"0.0.0.0\", port=8266, password=123))\nloop.call_soon(uaiorepl.start()) # uasyncio repl will process webrepl input\nloop.run_forever()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawwwn%2Fmicropython-ainput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshawwwn%2Fmicropython-ainput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawwwn%2Fmicropython-ainput/lists"}