{"id":28906290,"url":"https://github.com/xmonader/expectless","last_synced_at":"2025-07-08T18:37:04.934Z","repository":{"id":77980713,"uuid":"93251177","full_name":"xmonader/expectless","owner":"xmonader","description":"Simple expect library for python","archived":false,"fork":false,"pushed_at":"2017-06-18T16:01:17.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T14:39:17.064Z","etag":null,"topics":["automation","expect","pexpect","python3","sysadmin"],"latest_commit_sha":null,"homepage":null,"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/xmonader.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,"zenodo":null}},"created_at":"2017-06-03T13:52:41.000Z","updated_at":"2021-04-15T13:31:15.000Z","dependencies_parsed_at":"2023-05-17T03:00:47.775Z","dependency_job_id":null,"html_url":"https://github.com/xmonader/expectless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xmonader/expectless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmonader%2Fexpectless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmonader%2Fexpectless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmonader%2Fexpectless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmonader%2Fexpectless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmonader","download_url":"https://codeload.github.com/xmonader/expectless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmonader%2Fexpectless/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264324674,"owners_count":23590934,"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":["automation","expect","pexpect","python3","sysadmin"],"created_at":"2025-06-21T14:30:53.760Z","updated_at":"2025-07-08T18:37:04.928Z","avatar_url":"https://github.com/xmonader.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# expectless\nSimple expect library for python\n\n\n## Usage\nwe have a script called `test_expect.py` which asks the user for a name and a password to continue. you can easily automate that by creating `expectations list` like the following\n\n```\n    expectations = [\n        ('name:', 'ahmed'),\n        ('password:', 'ahardpassword'),\n    ]\n```\nand then invoke the script \n```\np = expect([\"./test_expect.py\"], expectations=expectations)\n```\n\nYou can also use networked applications as well for instance talking to ssh on a remote machine\n```python\n    p = expect([\"ssh\", \"-T\", \"mie@10.147.19.169\", \"ls /home\"], expectations=[(\"mie@10.147.19.169's password:\", 'apa')])\n```\n\n## Interactivity\nYou can interact with the application \n```\n    p = expect([\"python3\"])    \n    interact(p[0])\n```\n## expectless In action\n[![asciicast](https://asciinema.org/a/2uek7k78ldtfw6s0as15dtepd.png)](https://asciinema.org/a/2uek7k78ldtfw6s0as15dtepd)\n\n## But why?\nI wanted to learn about PTYs `Pseudoterminal` and I always liked `expect` tool\n\n\n## Next steps:\n    - Regular expressions expectations.\n\n## Operating systems support?\nIt's only developed and tested on GNU/Linux operating system, and I've no idea about other operating systems. PRs are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmonader%2Fexpectless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmonader%2Fexpectless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmonader%2Fexpectless/lists"}