{"id":15170245,"url":"https://github.com/gbiondo1310/esp32_server","last_synced_at":"2026-01-24T04:33:50.535Z","repository":{"id":241382307,"uuid":"806127152","full_name":"GBiondo1310/esp32_server","owner":"GBiondo1310","description":"ESP32 Micropython access point server package","archived":false,"fork":false,"pushed_at":"2024-06-16T11:29:53.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-25T12:21:57.859Z","etag":null,"topics":["access-point","micropython","micropython-esp32","python","python3","server","socket"],"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/GBiondo1310.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":"2024-05-26T13:00:45.000Z","updated_at":"2024-06-16T11:29:55.000Z","dependencies_parsed_at":"2024-06-16T12:55:12.633Z","dependency_job_id":null,"html_url":"https://github.com/GBiondo1310/esp32_server","commit_stats":null,"previous_names":["gbiondo1310/esp32_server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GBiondo1310%2Fesp32_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GBiondo1310%2Fesp32_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GBiondo1310%2Fesp32_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GBiondo1310%2Fesp32_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GBiondo1310","download_url":"https://codeload.github.com/GBiondo1310/esp32_server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239195270,"owners_count":19598034,"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":["access-point","micropython","micropython-esp32","python","python3","server","socket"],"created_at":"2024-09-27T08:01:05.624Z","updated_at":"2026-01-24T04:33:50.495Z","avatar_url":"https://github.com/GBiondo1310.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32 Server\n\nEasily set up a simple server on your ESP32\n\n## Pre-requisites\n\n* Flash Micropython on your ESP32\n    * Install esptool.py with ```pip install esptool``` to flash Micropython firmware\n    * Check [esptool documentation](https://docs.espressif.com/projects/esptool/en/latest/esp32/) to find out how to flash Micropython firmware\n\n* Install ampy with ```pip install ampy``` to be able to upload files to the board\n    * You can upload files with ```ampy -p PORT put filename```\n\n## Upload files\n\n1. Connect your board and set it to BOOT mode;\n2. Modify SSID and PASSWORD in consts file\n3. Upload the required files with:\n    ```\n    ampy -p PORT put src/_consts.py\n    ampy -p PORT put src/endpoint.py\n    ampy -p PORT put src/exceptions.py\n    ampy -p PORT put src/server.py\n    ampy -p PORT put src/status_codes.py\n    ```\n4. You're good to go\n\n## Example\n\n```boot.py```\n```py\nimport ujson as json\n\nfrom new_server import Server\nfrom endpoint import Endpoint\nfrom status_codes import StatusCode\nfrom exceptions import InternalServerError\n\nserver = Server()\ntest_endpoint = server.add_endpoint(\"/test_endpoint/\")\n\n@test1\ndef endpoint_function(value, **kw):\n    if int(value)\u003e5:\n        raise InternalServerError(\"Should raise InternalServerError\")\n\n    return StatusCode._200, json.dumps({\"esit\":str(value)})\n\n@test1.on_exception(InternalServerError)\ndef onInternalServerError():\n    print(\"Internal server error raised\")\n    return None, None\n\n\n@test1.on_finished()\ndef onFinished():\n    print(\"Finished\")\n\nserver.start()\n```\n\nTo test that the server is running correctly:\n\n1. Connect to the newly created network\n\n2. Open up your browser and search for this URL: ```http://192.168.4.1/test_endpoint/?value=4```\n\n3. You should receive back ```{\"esit\":\"4\"}``` from the endpoint_function function\n\nIf the query parameter \"value\" is greater than 5, InternalServerError will be raised and status code 500 will be returned.\nCheck out example folder for more examples\n\n## NOTES\n\n* This package is currently under developement and is not intended for handling complex requests\n* This package currently handles only GET requests, you can implement it on your own to handle other kinds of request\n* The src directory contains two versions of every file, one is documented and the other is not in order to save space on the board\n\n---\n\n## Bonus\nIf you're using an IDE with autocompletion for Micropython developement, you can check out my library [micropython_libraries](https://github.com/GBiondo1310/micropython_libraries.git)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbiondo1310%2Fesp32_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbiondo1310%2Fesp32_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbiondo1310%2Fesp32_server/lists"}