{"id":13725526,"url":"https://github.com/digidotcom/python-streamexpect","last_synced_at":"2026-01-22T11:42:52.287Z","repository":{"id":57471721,"uuid":"48452806","full_name":"digidotcom/python-streamexpect","owner":"digidotcom","description":"Python library providing cross-platform text matching for generic streams and sockets","archived":false,"fork":false,"pushed_at":"2024-02-22T21:30:47.000Z","size":276,"stargazers_count":41,"open_issues_count":5,"forks_count":8,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-09-19T20:12:34.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digidotcom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2015-12-22T20:36:53.000Z","updated_at":"2024-03-20T10:08:01.000Z","dependencies_parsed_at":"2024-08-03T01:28:19.529Z","dependency_job_id":null,"html_url":"https://github.com/digidotcom/python-streamexpect","commit_stats":{"total_commits":13,"total_committers":4,"mean_commits":3.25,"dds":"0.23076923076923073","last_synced_commit":"bafce092762fd9940c665d21268363a599c8cc48"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/digidotcom/python-streamexpect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digidotcom%2Fpython-streamexpect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digidotcom%2Fpython-streamexpect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digidotcom%2Fpython-streamexpect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digidotcom%2Fpython-streamexpect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digidotcom","download_url":"https://codeload.github.com/digidotcom/python-streamexpect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digidotcom%2Fpython-streamexpect/sbom","scorecard":{"id":341865,"data":{"date":"2025-08-11","repo":{"name":"github.com/digidotcom/python-streamexpect","commit":"5fc1919e2115b16f65bda0386aae4c5440caacd3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":-1,"reason":"No tokens found","details":null,"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":"Code-Review","score":0,"reason":"Found 1/15 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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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-18T06:05:51.349Z","repository_id":57471721,"created_at":"2025-08-18T06:05:51.349Z","updated_at":"2025-08-18T06:05:51.349Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28662306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":[],"created_at":"2024-08-03T01:02:26.113Z","updated_at":"2026-01-22T11:42:52.268Z","avatar_url":"https://github.com/digidotcom.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"streamexpect\n============\n\n[![Build Status](https://travis-ci.org/digidotcom/python-streamexpect.svg?branch=master)](https://travis-ci.org/digidotcom/python-streamexpect)\n[![Coverage Status](https://img.shields.io/coveralls/digidotcom/python-streamexpect.svg)](https://coveralls.io/r/digidotcom/python-streamexpect)\n[![Code Climate](https://img.shields.io/codeclimate/github/digidotcom/python-streamexpect.svg)](https://codeclimate.com/github/digidotcom/python-streamexpect)\n[![GitHub Issues](https://img.shields.io/github/issues/digidotcom/python-streamexpect.svg)](https://github.com/digidotcom/python-streamexpect/issues)\n[![PyPI](https://img.shields.io/pypi/v/streamexpect.svg)](https://pypi.python.org/pypi/streamexpect/)\n[![License](https://img.shields.io/badge/license-MPL%202.0-blue.svg)](https://github.com/digidotcom/python-streamexpect/blob/master/LICENSE.txt)\n\nstreamexpect is a library providing cross-platform \"expect-like\" functionality\nfor generic Python streams and sockets . It is similar to the\n[Pexpect](https://pexpect.readthedocs.org) library, except where Pexpect\nexplicitly requires an underlying file (usually a TTY), streamexpect uses\nduck-typing and requires only a `read` or `recv` method.\n\n[View the Full Documentation](https://digidotcom.github.io/python-streamexpect)\n\nThe original version of streamexpect was generously donated by\n[Digi](http://www.digi.com) [Wireless Design Services](http://www.digi.com/wds).\nThe software is provided as Alpha software and has not undergone formal\ntesting. It does, however, ship with extensive unit testing.\n\n[View the Changelog](https://github.com/digidotcom/python-streamexpect/blob/master/CHANGELOG.md)\n\nInstallation\n============\n\nInstallation is performed using pip. The latest released version of\nstreamexpect can be obtained with the following command:\n\n```sh\n$ pip install streamexpect\n```\n\nTo install the development version from GitHub:\n\n```sh\n$ pip install -U -e 'git+https://github.com/digidotcom/python-streamexpect#egg=streamexpect'\n```\n\nExample\n=======\n\nThe following example shows opening a serial port (on a Windows PC), sending\nthe `uname` command, and verifying that _Linux_ is in the returned data.\n\n```python\nimport serial\nimport streamexpect\n\n# timeout=0 is essential, as streams are required to be non-blocking\nser = serial.Serial('COM1', baudrate=115200, timeout=0)\n\nwith streamexpect.wrap(ser) as stream:\n  stream.write('\\r\\nuname -a\\r\\n')\n  match = stream.expect_bytes('Linux', timeout=1.0)\n  print(u'Found Linux at index {}'.format(match.start))\n```\n\n\nDesign Goals\n============\n\n* Be Cross-Platform\n\n  The library should not depend on any features (besides Python) that exclude a\n  platform. Yes, that means Windows is a first-class citizen.\n\n* Be Explicit In Encoding\n\n  When dealing with streams of data, the distinction between when the stream\n  goes from being a series of binary bytes to a set of encoded characters can\n  be unclear. The library should be explicit in the handling of binary versus\n  characters, such that mixing the two types is not allowed without explicit\n  options to enable encoding and decoding.\n\n* Common Use Cases Should Be Simple\n\n  For 95% of users, the `streamexpect.wrap` function should accomplish the\n  desired goals. Intelligent default options should be used so the library just\n  \"does the right thing\".\n\n* Complicated Use Cases Should Be Possible\n\n  The objects returned by the `streamexpect.wrap` function should themselves be\n  easy to use and extend. Protocol requirements between classes should be\n  explicit and documented.\n\n\nDevelopment\n===========\n\nDevelopment of streamexpect takes place in the open on GitHub. Please use pull\nrequests to submit changes to code and documentation.\n\nThe process for building and testing streamexpect has been automated as much as\npossible. [tox](https://testrun.org/tox/) handles building and testing the\ncode, as well as generating documentation and automatically testing for code\nstyle issues. tox can be installed with pip:\n\n    pip install tox\n\nThe generic tox command looks like:\n\n    tox\n\nThis will attempt to build and test streamexpect against multiple different\nversions of Python, and will error on versions not found. To test against only\na single version of Python, specify the version at the tox command line. For\nexample, to test only Python 2.7:\n\n    tox -e py27\n\nMultiple versions may be specified, separated by a comma:\n\n    tox -e py27,py35\n\nDocumentation generation and code style checking are not performed by default,\nand so must be explicitly provided to the tox command. Documentation generation\nrequires either Python 2.7, or Python 3.3 or greater.\n\n    tox -e docs,style\n\n\nLicense\n=======\n\nThis software is open-source software. Copyright Digi International, 2015.\n\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this file,\nyou can obtain one at http://mozilla.org/MPL/2.0/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigidotcom%2Fpython-streamexpect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigidotcom%2Fpython-streamexpect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigidotcom%2Fpython-streamexpect/lists"}