{"id":21849071,"url":"https://github.com/wils0ns/saltypie","last_synced_at":"2026-05-18T02:33:17.593Z","repository":{"id":37382351,"uuid":"290996902","full_name":"wils0ns/saltypie","owner":"wils0ns","description":"Saltstack API wrapper and state return parser.","archived":false,"fork":false,"pushed_at":"2020-08-28T08:45:14.000Z","size":543,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-10T10:29:50.609Z","etag":null,"topics":["salt","salt-api","saltstack","table"],"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/wils0ns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-28T08:44:45.000Z","updated_at":"2023-11-16T09:04:08.000Z","dependencies_parsed_at":"2022-09-14T21:21:36.532Z","dependency_job_id":null,"html_url":"https://github.com/wils0ns/saltypie","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/wils0ns/saltypie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wils0ns%2Fsaltypie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wils0ns%2Fsaltypie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wils0ns%2Fsaltypie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wils0ns%2Fsaltypie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wils0ns","download_url":"https://codeload.github.com/wils0ns/saltypie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wils0ns%2Fsaltypie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"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":["salt","salt-api","saltstack","table"],"created_at":"2024-11-28T00:10:40.208Z","updated_at":"2026-05-18T02:33:17.578Z","avatar_url":"https://github.com/wils0ns.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Saltypie - salt-api client and state return parser.\n\n\n\n## Installation\n\n```bash\n   pip install saltypie\n```\n\n## Local client example\n\nCode:\n\n```python\nfrom saltypie import Salt\nfrom saltypie.output import StateOutput\n\n\nsalt = Salt(\n    url='https://192.168.70.11:8000',\n    username='saltapiuser',\n    passwd='abc123',\n    trust_host=True\n)\n\nret = salt.execute(\n    client=Salt.CLIENT_LOCAL,\n    target='*',\n    fun='state.apply',\n    pillar={'sleep': 1}\n)\n\nsout = StateOutput(ret)\nprint(sout)\n```\n\nOutput:\n\n```\n+ minion01 ---------------------------------------------------------+\n| State                         Plot          %       ms     Result |\n+-------------------------------------------------------------------+\n| test succeed with changes     ||||||||||||  42.13%  0.404  True   |\n| test succeed without changes  ||||||||      29.61%  0.284  True   |\n| test no operation             ||||||||      28.26%  0.271  True   |\n+-------------------------------------------------------------------+\n| Total elapsed time: 0.96ms                                        |\n+-------------------------------------------------------------------+\n```\n\n## Runner client example\n\nCode:\n\n```python\nfrom saltypie import Salt\nfrom saltypie.output import OrchestrationOutput\n\nsalt = Salt(\n    url='https://192.168.70.10:8000',\n    username='saltapiuser',\n    passwd='abc123',\n    trust_host=True\n)\nsalt.eauth = 'pam'\n\nret = salt.execute(\n    client=Salt.CLIENT_RUNNER,\n    fun='state.orch',\n    args=['orch_fail'],\n    pillar={'sleep': 1}\n)\n\norchout = OrchestrationOutput(ret, salt)\nprint(orchout.summary_table(max_bar_size=100, time_unit='s'))\n```\n\nOutput:\n\n```\n   + Orchestration -----------------------------------------------------------------+\n   | Step                        Plot                       %       Time(s)  Result |\n   +--------------------------------------------------------------------------------+\n   | Step01                      |||||||||||||||||||||||||  25.20%   5.13    True   |\n   | Step02                      ||||||||||||||||||||||||   24.69%   5.03    True   |\n   | Step03                      ||||||||||||||||||||||||   24.79%   5.05    True   |\n   | Step04                      |||||||||||||||||||||||||  25.32%   5.16    False  |\n   +--------------------------------------------------------------------------------+\n   | Total elapsed time: 20.37s                                                     |\n   +--------------------------------------------------------------------------------+\n```\n\n## Terminal safe mode\n\nAll output classes have the `safe` property that is set to `False` if the terminal encoding is dectected to be *utf-8*. To always use safe mode set it to `True`:\n\nExample:\n\n```python\nfrom saltypie import Salt\nfrom saltypie.output import StateOutput, OrchestrationOutput\n\nsout = StateOutput(ret)\nsout.safe = True\n# play with the tables here ...\n\norchout = OrchestrationOutput(ret, salt)\norchout.safe = True\n# play with the tables here ...\n```\n\n## Disable table coloring\nSet the output object `colored` property to `False`:\n\nExample:\n```python\nfrom saltypie import Salt\nfrom saltypie.output import OrchestrationOutput\n\norchout = OrchestrationOutput(ret, salt)\norchout.colored = False\n# play with the tables here ...\n```\n\nMore examples\n=============\n\nhttps://gitlab.com/cathaldallan/saltypie/tree/master/examples\n\n\nDocumentation\n=============\n\nhttps://cathaldallan.gitlab.io/saltypie/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwils0ns%2Fsaltypie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwils0ns%2Fsaltypie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwils0ns%2Fsaltypie/lists"}