{"id":15493273,"url":"https://github.com/eerimoq/mqttools","last_synced_at":"2025-09-04T07:43:35.409Z","repository":{"id":45873396,"uuid":"184444451","full_name":"eerimoq/mqttools","owner":"eerimoq","description":"MQTT version 5.0 client and broker using asyncio","archived":false,"fork":false,"pushed_at":"2021-12-24T12:15:07.000Z","size":570,"stargazers_count":63,"open_issues_count":0,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-21T18:36:36.283Z","etag":null,"topics":["asyncio","mqtt","mqtt-5","mqtt-broker","mqtt-client","python"],"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/eerimoq.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"eerimoq"}},"created_at":"2019-05-01T16:15:41.000Z","updated_at":"2025-05-07T20:01:14.000Z","dependencies_parsed_at":"2022-09-02T12:51:16.169Z","dependency_job_id":null,"html_url":"https://github.com/eerimoq/mqttools","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/eerimoq/mqttools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fmqttools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fmqttools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fmqttools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fmqttools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eerimoq","download_url":"https://codeload.github.com/eerimoq/mqttools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fmqttools/sbom","scorecard":{"id":367992,"data":{"date":"2025-08-11","repo":{"name":"github.com/eerimoq/mqttools","commit":"a28c86e89af0852249a5d6f33f9e67036c3eb8fe"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pythonpackage.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/eerimoq/mqttools/pythonpackage.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/eerimoq/mqttools/pythonpackage.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/eerimoq/mqttools/pythonpackage.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/eerimoq/mqttools/pythonpackage.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/eerimoq/mqttools/pythonpackage.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:40","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T12:19:27.613Z","repository_id":45873396,"created_at":"2025-08-18T12:19:27.614Z","updated_at":"2025-08-18T12:19:27.614Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273574125,"owners_count":25129882,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["asyncio","mqtt","mqtt-5","mqtt-broker","mqtt-client","python"],"created_at":"2024-10-02T08:05:14.887Z","updated_at":"2025-09-04T07:43:35.379Z","avatar_url":"https://github.com/eerimoq.png","language":"Python","funding_links":["https://github.com/sponsors/eerimoq"],"categories":[],"sub_categories":[],"readme":"MQTT Tools\n==========\n\nMQTT tools in Python 3.7 and later.\n\nBoth the client and the broker implements MQTT version 5.0 using\n``asyncio``.\n\nClient features:\n\n- Subscribe to and publish QoS level 0 topics.\n\n- Broker session resume (or clean start support) for less initial\n  communication.\n\n- Topic aliases for smaller publish packets.\n\n- ``monitor``, ``subscribe`` and ``publish`` command line commands.\n\nBroker features:\n\n- Subscribe to and publish QoS level 0 topics.\n\n- Session resume (or clean start support) for less initial\n  communication. Session state storage in RAM.\n\n- ``broker`` command line command.\n\nLimitations:\n\nThere are lots of limitations in both the client and the broker. Here\nare a few of them:\n\n- QoS level 1 and 2 messages are not supported. A session state storage\n  is required to do so, both in the client and the broker.\n\n- Authentication is not supported.\n\nMQTT version 5.0 specification:\nhttps://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html\n\nProject homepage: https://github.com/eerimoq/mqttools\n\nDocumentation: https://mqttools.readthedocs.io\n\nInstallation\n============\n\n.. code-block:: python\n\n    pip install mqttools\n\nExamples\n========\n\nThere are plenty of examples in the `examples folder`_.\n\nCommand line\n------------\n\nSubscribe\n^^^^^^^^^\n\nConnect to given MQTT broker and subscribe to a topic. All received\nmessages are printed to standard output.\n\n.. code-block:: text\n\n   $ mqttools subscribe /test/#\n   Connecting to 'localhost:1883'.\n   Connected.\n   Topic:   /test\n   Message: 11\n   Topic:   /test/mqttools/foo\n   Message: bar\n\nPublish\n^^^^^^^\n\nConnect to given MQTT broker and publish a message to a topic.\n\n.. code-block:: text\n\n   $ mqttools publish /test/mqttools/foo bar\n   Connecting to 'localhost:1883'.\n\n   Published 1 message(s) in 0 seconds from 1 concurrent task(s).\n\nPublish multiple messages as quickly as possible with ``--count`` to\nbenchmark the client and the broker.\n\n.. code-block:: text\n\n   $ mqttools publish --count 100 /test/mqttools/foo\n   Connecting to 'localhost:1883'.\n\n   Published 100 message(s) in 0.39 seconds from 10 concurrent task(s).\n\nMonitor\n^^^^^^^\n\nConnect to given MQTT broker and monitor given topics in a text based\nuser interface.\n\n.. code-block:: text\n\n   $ mqttools monitor /test/#\n\n.. image:: https://github.com/eerimoq/mqttools/raw/master/docs/monitor.png\n\nThe menu at the bottom of the monitor shows the available commands.\n\n- Quit: Quit the monitor. Ctrl-C can be used as well.\n\n- Play/Pause: Toggle between playing and paused (or running and freezed).\n\n- Format: Message formatting; `auto`, `binary` or `text`.\n\nBroker\n^^^^^^\n\nStart a broker to serve clients.\n\n.. code-block:: text\n\n   $ mqttools broker\n\nScripting\n---------\n\nSubscribe\n^^^^^^^^^\n\nAn example connecting to an MQTT broker, subscribing to the topic\n``/test/#``, and printing all published messaged.\n\n.. code-block:: python\n\n   import asyncio\n   import mqttools\n\n   async def subscriber():\n       client = mqttools.Client('localhost', 1883)\n\n       await client.start()\n       await client.subscribe('/test/#')\n\n       while True:\n           message = await client.messages.get()\n\n           if message is None:\n               print('Broker connection lost!')\n               break\n\n           print(f'Topic:   {message.topic}')\n           print(f'Message: {message.message}')\n\n   asyncio.run(subscriber())\n\nPublish\n^^^^^^^\n\nAn example connecting to an MQTT broker and publishing the message\n``bar`` to the topic ``/test/mqttools/foo``.\n\n.. code-block:: python\n\n   import asyncio\n   import mqttools\n\n   async def publisher():\n       async with mqttools.Client('localhost', 1883) as client:\n           client.publish(mqttools.Message('/test/mqttools/foo', b'bar'))\n\n   asyncio.run(publisher())\n\n.. _examples folder: https://github.com/eerimoq/mqttools/tree/master/examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feerimoq%2Fmqttools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feerimoq%2Fmqttools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feerimoq%2Fmqttools/lists"}