{"id":16148659,"url":"https://github.com/cpainchaud/pylo","last_synced_at":"2026-04-09T16:20:28.319Z","repository":{"id":61166502,"uuid":"202294436","full_name":"cpainchaud/pylo","owner":"cpainchaud","description":"PYLO is a Python API framework and set of tools to interact with Illumio's PCE (Policy Compute Engine)","archived":false,"fork":false,"pushed_at":"2026-02-19T10:56:37.000Z","size":40425,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-02-19T15:22:39.248Z","etag":null,"topics":["api","illumio","pce","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpainchaud.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-08-14T07:07:19.000Z","updated_at":"2026-02-11T08:38:43.000Z","dependencies_parsed_at":"2024-04-18T12:47:00.717Z","dependency_job_id":"c4757a7f-d81d-4a32-9740-0f8ce220f02b","html_url":"https://github.com/cpainchaud/pylo","commit_stats":null,"previous_names":["cpainchaud/illumio_pharos","cpainchaud/pylo"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/cpainchaud/pylo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpainchaud%2Fpylo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpainchaud%2Fpylo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpainchaud%2Fpylo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpainchaud%2Fpylo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpainchaud","download_url":"https://codeload.github.com/cpainchaud/pylo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpainchaud%2Fpylo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29781880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","illumio","pce","python"],"created_at":"2024-10-10T00:34:30.845Z","updated_at":"2026-04-02T19:00:23.670Z","avatar_url":"https://github.com/cpainchaud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/cpainchaud/pylo)\n\n# Pylo\n\n## Overview / Index\nA quick index to help you navigate this repository:\n\n- [Introduction](#introduction) — what Pylo is and its intent.\n- [API Framework](#api-framework) — short code examples showing common tasks.\n- [CLI Tools](#cli-tools) — pointers to example scripts and how-to docs for automation utilities.\n- Docs: [docs/cli/label-delete-unused.md](docs/cli/label-delete-unused.md) — developer and CLI documentation (see `docs/cli/`).\n- Example scipts: [examples/](examples/) — runnable example scripts demonstrating library usage.\n- Tests: [tests/README_test_fixtures.md](tests/README_test_fixtures.md) — pytest-based tests and fixtures.\n- License: [LICENSE](LICENSE) — project license and attribution.\n\n\n## Introduction\nA Python API Framework and set of tools to interact with Illumio's PCE (Policy Compute Engine)\n\n\n## API Framework\n\n### Remove TCP/3389 from all rules using fully object oriented framework\n```python\nimport illumio_pylo as pylo\n\npce_hostname = 'pce212-beauty-contest.illumio.microsegment.io'\n\npylo.log_set_debug()\norg = pylo.Organization(1)\n\nprint(\"* Loading PCE objects from API: \", end='', flush=True)\norg.load_from_saved_credentials(pce_hostname, prompt_for_api_key=True)\nprint(\"OK!\")\n\nprint(\"* PCE statistics: \", end='', flush=True)\nprint(org.stats_to_str())\n\nprint()\n\nfor ruleset in org.RulesetStore.itemsByHRef.values():\n    for rule in ruleset.rules_byHref.values():\n        for service in rule.services.get_direct_services():\n            if service.is_tcp() and service.to_port is None and service.port == 3389:\n                print(\"Rule {} is concerned\".format(rule.href))\n                rule.services.remove_direct_service(service)\n                rule.services.api_sync()\n\n\n```\n\n### Creating an IPList using raw API calls and json payloads\n\n```python\nimport illumio_pylo as pylo\n\npce_hostname = 'pce212-beauty-contest.illumio.microsegment.io'\n\nconnector = pylo.APIConnector.create_from_credentials_in_file(pce_hostname, request_if_missing=True)\n\nif connector is None:\n    print(\"****ERROR**** No cached credentials found for PCE {}\".format(pce_hostname))\n    exit(1)\n\nprint(\"PCE Software version is {}\".format(connector.get_software_version_string()))\n\nprint(\"* Now downloading Workload JSON...\", end='', flush=True)\nall_workloads_json = connector.objects_workload_get(max_results=999999, async_mode=False)\nprint(\"OK\")\n\nprint()\n\nprint(\"* Now listing workloads names from JSON data:\", end='', flush=True)\nfor workload_json in all_workloads_json:\n    print(\" - {} / href:{}\".format(workload_json['name'], workload_json['href']))\n\nprint()\n\nprint(\"* attempting to create an IP¨List\", end='', flush=True)\ndata = {'name': 'an IPList 2', \"ip_ranges\": [\n    {\"from_ip\": \"192.168.0.0/24\"},\n    {\"from_ip\": \"172.16.0.0/24\"},\n]}\nresult = connector.objects_iplist_create(data)\n\nif 'href' not in result:\n    print(\"****ERROR**** Object was not created, PCE response was: \".format(result))\n    exit(1)\n\nprint(\"OK! created with HREF={}\".format(result['href']))\n\nprint()\n\n```\n\n## CLI Tools\n\nPylo includes several documented command-like utilities intended for operational tasks against an Illumio PCE. Full, detailed usage (options, examples, and flags) is available in the `docs/cli/` directory.\n\n## Binary distribution\nWindows binaries: Prebuilt standalone Windows executables are provided so you can run the CLI tools without installing Python or any dependencies. Check the project's [Releases page](https://github.com/cpainchaud/pylo/releases) for all numbered releases but also:\n- [Latest release](https://github.com/cpainchaud/pylo/releases/tag/latest) — includes the most recent stable version with all CLI tools and documentation.\n- [DEV release](https://github.com/cpainchaud/pylo/releases/tag/dev-latest) — includes the most recent development version with experimental features and bug fixes.\n\n## Documented CLI utilities\n- [`cred-manager`](docs/cli/cred-manager.md) — Manage cached PCE credentials used by the CLI utilities (create, update, delete, list).\n- [`iplist-analyzer`](docs/cli/iplist-analyzer.md) — Analyze IP lists to find overlaps, gaps, and statistics for IP range usage.\n- [`iplist-import`](docs/cli/iplist-import.md) — Import IP ranges into the PCE as IPList objects from CSV/JSON sources.\n- [`label-delete-unused`](docs/cli/label-delete-unused.md) — Identify unused labels across the PCE and optionally delete them; generates CSV/XLSX/JSON reports and runs in dry-run mode by default.\n- [`pce-objects-cache-updater`](docs/cli/pce-objects-cache-updater.md) — Refresh or rebuild the local cache of PCE objects used by offline/CLI tools.\n- [`rule-export`](docs/cli/rule-export.md) — Export firewall/security rules from the PCE into CSV/JSON formats for reporting or migration.\n- [`traffic-export`](docs/cli/traffic-export.md) — Export traffic records from the PCE with flexible filtering (labels, IP lists, time ranges), formatting, and column customization.\n- [`ven-compatibility-report-export`](docs/cli/ven-compatibility-report-export.md) — Generate compatibility reports for VENs (visibility/compatibility across versions or configurations).\n- [`ven-duplicate-remover`](docs/cli/ven-duplicate-remover.md) — Detect and help remove duplicate workload/VEN entries that share the same hostname; includes protection rules and dry-run by default.\n- [`ven-idle-to-visibility`](docs/cli/ven-idle-to-visibility.md) — Convert idle VENs to visible state or generate reports to recover idle VENs (visibility management utilities).\n- [`ven-upgrade`](docs/cli/ven-upgrade.md) — Assist with VEN upgrade workflows (reporting and helper steps to prepare VENs for upgrades).\n- [`workload-export`](docs/cli/workload-export.md) — Export workload objects and related metadata from the PCE.\n- [`workload-import`](docs/cli/workload-import.md) — Import workloads into the PCE from structured CSV/JSON inputs.\n- [`workload-resync-names`](docs/cli/workload-resync-names.md) — Resynchronize workload names (useful when hostnames or naming conventions change).\n\nWhere to find full usage\n- See the individual command docs in `docs/cli/` for complete option lists, examples, and recommended safe workflows (each doc contains usage examples and notes).\n- Most commands provide their own `--help` output; consult the corresponding `docs/cli/\u003ccommand\u003e.md` file for the exact invocation and flags.\n\n## System CA Certificates\nPylo loads the `pip-system-certs` helper by default so any HTTPS call understands and uses the operating system's CA certificate store; this ensures the bundled CLI and library mirror the host trust settings. Set `PYLO_DISABLE_SYSTEM_CA` to one of `true`, `yes`, `1`, or `on` to prevent the injection when you want to rely on the bundled CA file instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpainchaud%2Fpylo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpainchaud%2Fpylo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpainchaud%2Fpylo/lists"}