{"id":17876274,"url":"https://github.com/tehmaze/xmodem","last_synced_at":"2025-04-04T16:17:09.997Z","repository":{"id":4104197,"uuid":"5213355","full_name":"tehmaze/xmodem","owner":"tehmaze","description":"XMODEM protocol implementation for Python","archived":false,"fork":false,"pushed_at":"2023-06-11T19:39:11.000Z","size":217,"stargazers_count":104,"open_issues_count":8,"forks_count":59,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-28T15:11:21.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/xmodem/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"donmate/jenkins-butler","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tehmaze.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2012-07-28T09:22:27.000Z","updated_at":"2025-01-25T17:08:22.000Z","dependencies_parsed_at":"2023-07-05T19:49:11.727Z","dependency_job_id":null,"html_url":"https://github.com/tehmaze/xmodem","commit_stats":{"total_commits":101,"total_committers":17,"mean_commits":"5.9411764705882355","dds":0.7623762376237624,"last_synced_commit":"4590465d36354b8323c70ca46980b41b3b8ae299"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tehmaze%2Fxmodem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tehmaze%2Fxmodem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tehmaze%2Fxmodem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tehmaze%2Fxmodem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tehmaze","download_url":"https://codeload.github.com/tehmaze/xmodem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208190,"owners_count":20901570,"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":"2024-10-28T11:29:38.818Z","updated_at":"2025-04-04T16:17:09.975Z","avatar_url":"https://github.com/tehmaze.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://travis-ci.org/tehmaze/xmodem.png?branch=master\n   :target: https://travis-ci.org/tehmaze/xmodem\n\n.. image:: https://coveralls.io/repos/tehmaze/xmodem/badge.png\n   :target: https://coveralls.io/r/tehmaze/xmodem\n\n================================\n XMODEM protocol implementation\n================================\n\nDocumentation available at http://packages.python.org/xmodem/\n\nPython Package Index (PyPI) page is available at https://pypi.python.org/pypi/xmodem\n\nxmodem has been tested with python 2.7 through python 3.11\n\nUsage\n=====\n\nCreate a function to get and put character data (to a serial line for\nexample)::\n\n    \u003e\u003e\u003e import serial\n    \u003e\u003e\u003e from xmodem import XMODEM\n    \u003e\u003e\u003e ser = serial.Serial('/dev/ttyUSB0', timeout=0) # or whatever port you need\n    \u003e\u003e\u003e def getc(size, timeout=1):\n    ...     return ser.read(size) or None\n    ...\n    \u003e\u003e\u003e def putc(data, timeout=1):\n    ...     return ser.write(data)  # note that this ignores the timeout\n    ...\n    \u003e\u003e\u003e modem = XMODEM(getc, putc)\n\nNow, to upload a file, use the ``send`` method::\n\n    \u003e\u003e\u003e stream = open('/etc/fstab', 'rb')\n    \u003e\u003e\u003e modem.send(stream)\n\nTo download a file, use the ``recv`` method::\n\n    \u003e\u003e\u003e stream = open('output', 'wb')\n    \u003e\u003e\u003e modem.recv(stream)\n\nFor more information, take a look at the documentation_.\n\n.. _documentation: http://packages.python.org/xmodem/xmodem.html\n\nChanges\n=======\n0.4.7:\n   * bugfix: stall on some kinds of error in ``recv()``, `PR #56\n     \u003chttps://github.com/tehmaze/xmodem/pull/56\u003e`_.\n   * bugfix: sequence number miscalculation in ``send()``, `PR #52\n     \u003chttps://github.com/tehmaze/xmodem/pull/52\u003e`_.\n   * enhancement: callback function added for ``recv()``, `PR #53\n     \u003chttps://github.com/tehmaze/xmodem/pull/53\u003e`_.\n   * bugfix: receiving empty file and stall condition in ``recv()``, `PR #50\n     \u003chttps://github.com/tehmaze/xmodem/pull/50\u003e`_.\n   * bugfix: callback is now called for some kinds of errors\n     and some CLI fixes, `8a798e8b\n     \u003chttps://github.com/tehmaze/xmodem/commit/8a798e8b2af2a9cd6f9e789ef154a23a6467f98b\u003e`_.\n   * bugfix: remove DepreactionWarning for ``logging.warn()``, `PR #49\n     \u003chttps://github.com/tehmaze/xmodem/pull/49\u003e`_.\n\n0.4.6:\n  * bugfix: Abort send on EOT in startup-sequence `Issue #34 \n    \u003chttps://github.com/tehmaze/xmodem/issues/34\u003e`_.\n  * enhancement: Include LICENSE file in the source distribution.\n\n0.4.5:\n  * bugfix: Remove bogus `assert False` code in ``recv()`` that resulted in\n    `AssertionError` introduced in version 0.4.0 commit-id `9b03fc20`, `PR #29\n    \u003chttps://github.com/tehmaze/xmodem/pull/29\u003e`_.\n\n0.4.4:\n  * bugfix: Large file transfers in ``send()`` were more likely to fail for\n    small values of ``retry``: This value should be the maximum failures per\n    block transfer as documented, but was improperly implemented as the number\n    of failures allowed for the total duration of the transfer, `PR #21\n    \u003chttps://github.com/tehmaze/xmodem/pull/21\u003e`_.\n  * bugfix: ``send(retry=n)`` and ``recv(retry=n)`` should retry ``n`` times\n    as documented, was retrying ``n - 1``.\n\n0.4.3:\n  * bugfix: ``putc()`` callback was called in series, 3 times for each part of\n    xmodem block header, data, and checksum during block transfer.  Now all\n    three data blocks are sent by single ``putc()`` call.  This resolves issues\n    when integrating with microcontrollers or equipment sensitive to timing\n    issues at stream boundaries, `PR #19\n    \u003chttps://github.com/tehmaze/xmodem/pull/19\u003e`_.\n\n0.4.2:\n  * bugfix: documentation files missing from the release tarball\n    `Issue #16 \u003chttps://github.com/tehmaze/xmodem/issues/16\u003e`_.\n\n0.4.1\n  * bugfix: re-transmit in ``send()`` on ``NAK`` or timeout, previously\n    re-transmissions (wrongly) occurred only on garbage bytes.\n    `PR #12 \u003chttps://github.com/tehmaze/xmodem/pull/12\u003e`_.\n\n0.4.0\n  * enhancement: support for python 3\n    `PR #8 \u003chttps://github.com/tehmaze/xmodem/pull/8\u003e`_.\n  * bugfix: CRC failures in XMODEM.recv() were not renegotiated correctly\n    `PR #11 \u003chttps://github.com/tehmaze/xmodem/issues/11\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftehmaze%2Fxmodem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftehmaze%2Fxmodem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftehmaze%2Fxmodem/lists"}