{"id":13710258,"url":"https://github.com/batfish/pybatfish","last_synced_at":"2026-02-01T18:34:21.451Z","repository":{"id":37336707,"uuid":"142918121","full_name":"batfish/pybatfish","owner":"batfish","description":"Python client for Batfish: https://github.com/batfish/batfish","archived":false,"fork":false,"pushed_at":"2026-01-19T00:59:53.000Z","size":4695,"stargazers_count":232,"open_issues_count":3,"forks_count":56,"subscribers_count":22,"default_branch":"master","last_synced_at":"2026-01-19T10:27:01.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/batfish.png","metadata":{"files":{"readme":"README.dev.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":"2018-07-30T19:16:59.000Z","updated_at":"2026-01-19T00:59:56.000Z","dependencies_parsed_at":"2024-01-18T20:49:38.711Z","dependency_job_id":"41e386ca-fbf0-4717-8b0c-c8c5563e4052","html_url":"https://github.com/batfish/pybatfish","commit_stats":{"total_commits":808,"total_committers":29,"mean_commits":"27.862068965517242","dds":0.7487623762376238,"last_synced_commit":"26aee457288158d390a63f70b5f549c5514200ab"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/batfish/pybatfish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batfish%2Fpybatfish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batfish%2Fpybatfish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batfish%2Fpybatfish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batfish%2Fpybatfish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/batfish","download_url":"https://codeload.github.com/batfish/pybatfish/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batfish%2Fpybatfish/sbom","scorecard":{"id":227193,"data":{"date":"2025-08-11","repo":{"name":"github.com/batfish/pybatfish","commit":"cbdf10bab41ba9adfa6c8c0faa16b89a60e50e31"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/30 approved changesets -- score normalized to 1","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":"Maintained","score":6,"reason":"7 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/precommit.yml:1","Warn: no topLevel permission defined: .github/workflows/reusable-precommit.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/precommit.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:113: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:118: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:126: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:161: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:162: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:166: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:170: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:174: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:188: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:189: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:193: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:206: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:213: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:214: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reusable-precommit.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/batfish/pybatfish/reusable-precommit.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:40","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:41","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:92","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:93","Warn: downloadThenRun not pinned by hash: .github/workflows/reusable-precommit.yml:100","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:141","Warn: downloadThenRun not pinned by hash: .github/workflows/reusable-precommit.yml:148","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:181","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:182","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:200","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:201","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:224","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:225","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:226","Warn: pipCommand not pinned by hash: .github/workflows/reusable-precommit.yml:29","Info:   0 out of  27 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of  13 pipCommand dependencies pinned","Info:   0 out of   2 downloadThenRun dependencies pinned"],"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 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-17T04:01:52.412Z","repository_id":37336707,"created_at":"2025-08-17T04:01:52.412Z","updated_at":"2025-08-17T04:01:52.412Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28985818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T18:17:03.387Z","status":"ssl_error","status_checked_at":"2026-02-01T18:16:57.287Z","response_time":56,"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":[],"created_at":"2024-08-02T23:00:53.643Z","updated_at":"2026-02-01T18:34:21.429Z","avatar_url":"https://github.com/batfish.png","language":"Jupyter Notebook","readme":"## Developer info\n\n### First steps\n\n#### Setup a virtual environment\nFor this purpose, you will likely want [virtualenv](https://virtualenv.pypa.io/en/stable/) or [Anaconda](https://www.anaconda.com/download/)\n\n#### Installing in development mode\nRun `pip install -e .[dev]`\n\nThis installs all the development and test dependencies.\n\n### Running tests\n\n- To run unit tests execute `python setup.py test`\n- To run end-to-end tests, start up an instance of batfish,\n  make it point to `\u003cstable_questions_dir\u003e` (as described above).\n\n  Run `py.test tests/integration`\n\n\n### Adding tests\nAdding integration tests exercising new functionality requires using special annotations to indicate what version of `Batfish` and `Pybatfish` are required in order for pre-deployment cross-version testing to work.\n\nFor example, if a new feature is added that is not supported by `Batfish` / `Pybatfish` until 2019/11/05, then `Pybatfish` integration tests exercising this functionality should be annotated like this:\n```\n@requires_bf('2019.11.05')\ndef test_something_new(session):\n    ...\n```\nThis annotation causes the test to run only if `Pybatfish` and `Batfish` versions are greater than or equal to `2019.11.05` or are dev versions (starting with `0`, e.g. `0.36.0`).\n\nAlso make sure that `Pybatfish` imports that did not exist in older versions of `Pybatfish` must be imported locally to avoid import errors when run against older versions, e.g.\n```\n@requires_bf('2019.11.05')\ndef test_something_new(session):\n    # Import locally to avoid import errors versus older Pybatfish\n    from pybatfish.client.session import new_thing\n    # Use new_thing\n    ...\n```\n\n### Code formatting\n\nNon-ambiguous automatic formatting using [black](https://github.com/psf/black#installation).\n\nRun `./fix-format.sh` to format everything automatically.\n\nInstructions for [editor integration](https://black.readthedocs.io/en/stable/editor_integration.html)\n\n\n#### Pre-commit hooks\n\nOptionally, you can install a pre-commit hook that will help with code formatting as well.\n\n1. `pip install pre-commit`\n2. `pre-commit install`\n\nThis will allow execution of formatting/validation/cleanup before committing code.\nCommit will fail if you have badly formatted files. They will be fixed automatically. Add them, commit again.\n\n[More docs on pre-commit](https://pre-commit.com/#usage)\n\n### Building documentation\n\n1. Ensure pybatfish is installed\n2. Ensure sphinx (the RTD theme) is installed by running `pip install sphinx sphinx_rtd_theme`\n\nRun:\n- `cd docs`\n- `python generate_questions_doc.py`\n- `make html` (or other format, such as `make pdf`)\n\nRead (for html format):\n- Open `docs/build/html/index.html`\n\n### Creating a distribution\n\nRun `python -m build`. This will create both a wheel package and a source\ndistribution inside the `dist` folder. These artifacts can be used for releases\nor the wheel can be distributed and then installed later using `pip`.\nFor example:\n\n`pip install ./dist/pybatfish-\u003cversion\u003e-py3-none-any.whl`\n","funding_links":[],"categories":["Overview","Jupyter Notebook"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatfish%2Fpybatfish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbatfish%2Fpybatfish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatfish%2Fpybatfish/lists"}