{"id":17787922,"url":"https://github.com/zmievsa/pysh","last_synced_at":"2026-04-01T21:05:00.204Z","repository":{"id":62583448,"uuid":"471599016","full_name":"zmievsa/pysh","owner":"zmievsa","description":"A library of small functions that simplify scripting in python","archived":false,"fork":false,"pushed_at":"2023-10-28T15:28:23.000Z","size":88,"stargazers_count":19,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-11T06:59:26.138Z","etag":null,"topics":["bash","pysh","python","script","scripting","shell"],"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/zmievsa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-03-19T05:16:33.000Z","updated_at":"2024-09-12T09:52:36.000Z","dependencies_parsed_at":"2023-10-31T16:43:46.026Z","dependency_job_id":null,"html_url":"https://github.com/zmievsa/pysh","commit_stats":{"total_commits":30,"total_committers":1,"mean_commits":30.0,"dds":0.0,"last_synced_commit":"209a6fed1511f277b90d84130d5e00b2c6fe3ae9"},"previous_names":["zmievsa/pysh","ovsyanka83/pysh"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zmievsa/pysh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fpysh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fpysh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fpysh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fpysh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmievsa","download_url":"https://codeload.github.com/zmievsa/pysh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fpysh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31014723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T02:58:54.984Z","status":"ssl_error","status_checked_at":"2026-03-27T02:58:46.993Z","response_time":164,"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":["bash","pysh","python","script","scripting","shell"],"created_at":"2024-10-27T10:13:22.269Z","updated_at":"2026-03-27T03:28:35.950Z","avatar_url":"https://github.com/zmievsa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pysh\n\nA library of small functions that simplify scripting in python\n\n## Installation\n\n```bash\npip install pysh\n```\n\n## Usage\n\n### sh\n\nRun a shell command and display the output:\n\n```python\nsh(\"git status\")\n```\n\nCapture the output of a shell command:\n\n```python\nres = sh(\"git status\", capture=True)\nprint(res.stdout)\n```\n\n### cd\n\nChange the current working directory:\n\n```python\ncd(\"path/to/dir\")\n```\n\nChange the current working directory temporarily:\n\n```python\nwith cd(\"path/to/dir\"):\n    sh(\"git status\")\n```\n\n### env\n\nSet an environment variable:\n\n```python\nenv(var=\"value\")\n```\n\nSet an environment variable temporarily:\n\n```python\nwith env(PGPASSWORD=\"MyPassword\", PGUSER=\"postgres\"):\n    sh(\"createdb -h localhost -p 5432 -O postgres mydb\")\n```\n\n### which\n\nChecks whether an executable/script/builtin is available:\n\n```python\ngit_is_installed = which(\"git\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmievsa%2Fpysh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmievsa%2Fpysh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmievsa%2Fpysh/lists"}