{"id":43053186,"url":"https://github.com/mrogaski/pygopher-interfaces","last_synced_at":"2026-01-31T10:38:44.955Z","repository":{"id":52984006,"uuid":"356653063","full_name":"mrogaski/pygopher-interfaces","owner":"mrogaski","description":"Go-style interfaces for Python","archived":false,"fork":false,"pushed_at":"2024-09-04T03:30:54.000Z","size":103,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T19:14:33.485Z","etag":null,"topics":["interfaces","python"],"latest_commit_sha":null,"homepage":"https://pygopher-interfaces.readthedocs.io/en/latest/","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/mrogaski.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-10T17:38:16.000Z","updated_at":"2024-09-04T03:28:59.000Z","dependencies_parsed_at":"2023-02-01T04:17:33.897Z","dependency_job_id":null,"html_url":"https://github.com/mrogaski/pygopher-interfaces","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mrogaski/pygopher-interfaces","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrogaski%2Fpygopher-interfaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrogaski%2Fpygopher-interfaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrogaski%2Fpygopher-interfaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrogaski%2Fpygopher-interfaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrogaski","download_url":"https://codeload.github.com/mrogaski/pygopher-interfaces/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrogaski%2Fpygopher-interfaces/sbom","scorecard":{"id":664574,"data":{"date":"2025-08-11","repo":{"name":"github.com/mrogaski/pygopher-interfaces","commit":"3118f7dd3f8b9b30edc1db59e79b9d1677f265e0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":0,"reason":"Found 0/18 approved changesets -- score normalized to 0","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/publish.yml:11","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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/mrogaski/pygopher-interfaces/publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:45","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:29","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand 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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 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-21T17:32:16.577Z","repository_id":52984006,"created_at":"2025-08-21T17:32:16.577Z","updated_at":"2025-08-21T17:32:16.577Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28938867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["interfaces","python"],"created_at":"2026-01-31T10:38:44.233Z","updated_at":"2026-01-31T10:38:44.948Z","avatar_url":"https://github.com/mrogaski.png","language":"Python","readme":"pygopher-interfaces\n===================\n\n.. rubric:: Go-style interfaces for Python\n\n|status| |pypi| |license| |documentation| |coverage| |analysis|\n\nInterfaces in the Go programming language are a bit different than those found in Java or C++, as they\nare `implicit \u003chttps://tour.golang.org/methods/10\u003e`_.  This means that there is no explicit \"implements\" relationship\nbetween the interface definition and an implementation of the defined interface.  A type implements an interface by\nimplementing all of the methods defined.  When we wish to define an interface in Python, we typically use abstract\nbase classes to define them because we can enforce implementation of methods.  This requires us to use inheritance,\nwhich couples the interface and the implementation.\n\nThis package emulates Go-style interfaces by creating an ``Interface`` metaclass that can be used to construct Python\nclasses that override ``issubclass`` to test whether a class implements the methods of the interface class, rather than\nwhether it inherits from the interface class.\n\nThis is a tiny package that emulates on of my favorite features of Go.\n\n\nInstallation\n------------\n\n.. code-block:: console\n\n    pip install pygopher-interfaces\n    # or:\n    # pipenv install pygopher-interfaces\n    # poetry add pygopher-interfaces\n\nUsage\n-----\n\nTo create an interface class, use the ``Interface`` metaclass.\n\n.. code-block:: python\n\n    from pygopher.interfaces import Interface\n\n\n    class RepositoryInterface(metaclass=Interface):\n        def get(account_id: int) -\u003e Account:\n            raise NotImplementedError\n\n        def add(account: Account):\n            raise NotImplementedError\n\n\n    class MysqlRepository:\n        def get(account_id: int) -\u003e Account:\n            ...\n\n        def add(account: Account):\n            ...\n\n\n    \u003e\u003e\u003e issubclass(MysqlRepository, RepositoryInterface)\n    True\n\n\n.. |status| image:: https://github.com/mrogaski/pygopher-interfaces/workflows/CI/badge.svg?branch=main\n    :alt: Status\n    :target: https://github.com/mrogaski/pygopher-interfaces/actions?workflow=CI\n\n.. |pypi| image:: https://img.shields.io/pypi/pyversions/pygopher-interfaces\n    :alt: PyPI - Python Version\n    :target: https://pypi.org/project/pygopher-interfaces/\n\n.. |license| image:: https://img.shields.io/pypi/l/pygopher-interfaces\n    :alt: PyPI - License\n    :target: https://github.com/mrogaski/pygopher-interfaces/blob/main/LICENSE\n\n.. |documentation| image:: https://img.shields.io/readthedocs/pygopher-interfaces\n    :alt: Read the Docs\n    :target: https://pygopher-interfaces.readthedocs.io/en/latest/\n\n.. |coverage| image:: https://codecov.io/gh/mrogaski/pygopher-interfaces/branch/main/graph/badge.svg?token=cu6sNIlaWt\n    :alt: Test Coverage\n    :target: https://codecov.io/gh/mrogaski/pygopher-interfaces\n\n.. |analysis| image:: https://app.codacy.com/project/badge/Grade/0516015cd3f94d66b7a7c8203255b6de\n    :alt: Code Quality\n    :target: https://www.codacy.com/gh/mrogaski/pygopher-interfaces/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=mrogaski/pygopher-interfaces\u0026amp;utm_campaign=Badge_Grade\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrogaski%2Fpygopher-interfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrogaski%2Fpygopher-interfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrogaski%2Fpygopher-interfaces/lists"}