{"id":20238201,"url":"https://github.com/basilfx/python-tinylink","last_synced_at":"2026-02-25T18:02:29.294Z","repository":{"id":21336650,"uuid":"24653530","full_name":"basilfx/python-tinylink","owner":"basilfx","description":"Frame-based streaming protocol for embedded applications.","archived":false,"fork":false,"pushed_at":"2025-04-19T20:01:42.000Z","size":153,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T10:47:44.616Z","etag":null,"topics":["embedded","python","python-serial"],"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/basilfx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2014-09-30T20:03:28.000Z","updated_at":"2025-04-19T20:01:41.000Z","dependencies_parsed_at":"2025-06-10T11:10:32.164Z","dependency_job_id":"dae6d208-a04a-4790-9b8f-fc83a565af2c","html_url":"https://github.com/basilfx/python-tinylink","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/basilfx/python-tinylink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2Fpython-tinylink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2Fpython-tinylink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2Fpython-tinylink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2Fpython-tinylink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basilfx","download_url":"https://codeload.github.com/basilfx/python-tinylink/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2Fpython-tinylink/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29833665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T17:57:15.019Z","status":"ssl_error","status_checked_at":"2026-02-25T17:56:11.472Z","response_time":61,"last_error":"SSL_read: 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":["embedded","python","python-serial"],"created_at":"2024-11-14T08:32:19.781Z","updated_at":"2026-02-25T18:02:29.243Z","avatar_url":"https://github.com/basilfx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-tinylink\nFrame-based streaming protocol for embedded applications.\n\n[![Linting](https://github.com/basilfx/python-tinylink/actions/workflows/lint.yml/badge.svg)](https://github.com/basilfx/python-tinylink/actions/workflows/lint.yml)\n[![Testing](https://github.com/basilfx/python-tinylink/actions/workflows/test.yml/badge.svg)](https://github.com/basilfx/python-tinylink/actions/workflows/test.yml)\n\n## Introduction\nThis is a general purpose Python module to provide a bi-directional frame-based\nstreaming protocol for low-speed embedded applications, such as serial\nconnected devices. It allowes the receiver to 'jump into' a stream of data\nframes. Every frame starts with a preamble, so the receiver can synchronize.\n\nThe format of a frame is as follows:\n\n```\n| Preamble            | Header         | Body                                |\n| 0xAA 0x55 0xAA 0x55 | AA AA BB BB CC | XX XX .. .. .. .. XX XX YY YY YY YY |\n\nFields:\nA = Flags\nB = Length\nC = XOR checksum over header\nX = Payload (max. 65536 bytes)\nY = CRC32 checksum over header + payload\n```\n\nThe flags field can be used for arbitrary purposes. The payload is optional.\n\nEscaping of the header and body are performed using byte-stuffing, to ensure\nthat the header and body can contain bytes of the preamble.\n\nError correction is not implemented and the bytes are not strictly aligned. The\nendianness is customizable.\n\n## State chart diagram\nBelow is a simplified statechart diagram of the receiver.\n![Alt text](docs/statechart.png)\n\n## Installation\nThe latest development version can be installed via\n`pip install git+https://github.com/basilfx/python-tinylink`.\n\n## CLI\nA CLI is included to experiment with TinyLink. When installed, run\n`tinylink /dev/tty.PORT_HERE` to start it. You can use it to send raw bytes via\nthe link and display what comes back.\n\nThe CLI supports so-called modifiers to modify the outgoing data. For example,\nthe input `\\flags=16 hello world` would send a frame with the flags equal to 16\nand the payload 'hello world'\n\nThe CLI requires additional dependencies, that are installed using the `cli`\ndependency specification (`poetry install --extras cli`).\n\n## Tests\nTo run the tests, please clone this repository and run `poetry run pytest`.\n\n## Contributing\nSee the [`CONTRIBUTING.md`](CONTRIBUTING.md) file.\n\n## License\nSee the [`LICENSE.md`](LICENSE.md) file (MIT license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasilfx%2Fpython-tinylink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasilfx%2Fpython-tinylink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasilfx%2Fpython-tinylink/lists"}