{"id":22719604,"url":"https://github.com/lemariva/esp32micropython","last_synced_at":"2025-04-13T17:52:05.752Z","repository":{"id":109048802,"uuid":"107767783","full_name":"lemariva/ESP32MicroPython","owner":"lemariva","description":"Basic functions/libraries for ESP32 running MicroPython","archived":false,"fork":false,"pushed_at":"2020-06-21T13:54:00.000Z","size":30,"stargazers_count":32,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T08:48:19.598Z","etag":null,"topics":["esp32","libraries","micropython"],"latest_commit_sha":null,"homepage":"https://lemariva.com/blog/2017/10/micropython-getting-started","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lemariva.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":"2017-10-21T09:30:01.000Z","updated_at":"2024-12-09T19:17:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa5d9770-486b-4503-b64c-960a187db4e6","html_url":"https://github.com/lemariva/ESP32MicroPython","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemariva%2FESP32MicroPython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemariva%2FESP32MicroPython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemariva%2FESP32MicroPython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemariva%2FESP32MicroPython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemariva","download_url":"https://codeload.github.com/lemariva/ESP32MicroPython/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758446,"owners_count":21156957,"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":["esp32","libraries","micropython"],"created_at":"2024-12-10T14:11:36.734Z","updated_at":"2025-04-13T17:52:05.744Z","avatar_url":"https://github.com/lemariva.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32-MicroPython\nBasic functions/libraries for ESP32/ESP8266 and WiPy2.0/3.0 running MicroPython.\n\nMore info: [lemariva.com](https://lemariva.com/micropython)\n\nftp.py\n------------\nSmall FTP server\n\n#### Limitations\n* Passive mode only\n* A single data connection at a time\n* Data transfer is assumed to be in binary mode (ascii setting is ignored)\n* Operation blocks the thread\n* No authentication support\n\n#### Supports\n* Changing directories (cd/CWD)\n* Directory listing (ls/LIST with no parameters)\n* File retrievals (get/RETR)\n* File uploads (put/STOR)\n\n\nntptime.py\n-------------\nGet the epoch time from time1.google.com\n\n\ntimeutils.py\n------------\nImplements `machine.RTC()` with `ntp_sync()`, `gmtime()` and `formatdate()` -RFC 2822 date format- as functions\n\n\nmd5.py\n------------\nEncode a string using an MD5 algorithm.\n```\n\u003e\u003e\u003e import md5\n\u003e\u003e\u003e md5.digest('foo')\n'acbd18db4cc2f85cedef654fccc4a4d8\n```\n\nmd5hash.py\n------------\nEncode a string using an MD5 algorithm.\n```\n\u003e\u003e\u003e from md5hash import md5\n\u003e\u003e\u003e m = md5()\n\u003e\u003e\u003e m.update('foo')\n\u003e\u003e\u003e m.hexdigest()\n'acbd18db4cc2f85cedef654fccc4a4d8'\n```\n\nmaes.py\n------------\nSimple AES cipher implementation in pure Python following PEP-272 API\n\n```\nimport maes\nimport ubinascii\n\nclass AESCipher():\n    def __init__(self, key):\n        self.bs = 16\n        self.key = key\n\n    def encrypt(self, raw):\n        raw = self._pad(raw)\n        cipher = maes.new(self.key, maes.MODE_ECB)\n        crypted_text = cipher.encrypt(raw)\n        crypted_text_b64 = ubinascii.b2a_base64(crypted_text)\n        return crypted_text_b64\n\n    def decrypt(self, enc):\n        enc = ubinascii.a2b_base64(enc)\n        cipher = maes.new(self.key, maes.MODE_ECB)\n        raw = cipher.decrypt(enc)\n        return self._unpad(raw).decode('utf-8')\n\n    def _pad(self, s):\n        padnum = self.bs - len(s) % self.bs\n        return s + padnum * chr(padnum).encode()\n\n    @staticmethod\n    def _unpad(dec):\n        s = bytes(bytearray(dec))\n        return s[:-ord(s[len(s)-1:])]\n\n\n\u003e\u003e\u003e key = b'0cc103aaf3df5dff'\n\u003e\u003e\u003e cypher = AESCipher(key)\n\u003e\u003e\u003e enc = cypher.encrypt(b'foo')\n\u003e\u003e\u003e print(enc)\nb'S8IpdJ+PpVYutZB5sWXGkA==\\n'\n\u003e\u003e\u003e cypher.decrypt(enc)\n'foo'\n```\n\nChangelog\n------------\nRevision 0.3\n\n\nLicense\n-----------\nCheck files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemariva%2Fesp32micropython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemariva%2Fesp32micropython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemariva%2Fesp32micropython/lists"}