{"id":19059226,"url":"https://github.com/h4l/prybar","last_synced_at":"2025-07-08T15:05:25.141Z","repository":{"id":57455251,"uuid":"179889366","full_name":"h4l/prybar","owner":"h4l","description":"Create temporary pkg_resources entry points at runtime","archived":false,"fork":false,"pushed_at":"2019-04-07T11:39:18.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-05T22:46:42.457Z","etag":null,"topics":["entrypoints","modularity","testing"],"latest_commit_sha":null,"homepage":"https://prybar.readthedocs.io/","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/h4l.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2019-04-06T21:37:35.000Z","updated_at":"2019-04-07T17:45:55.000Z","dependencies_parsed_at":"2022-09-10T00:40:43.806Z","dependency_job_id":null,"html_url":"https://github.com/h4l/prybar","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/h4l/prybar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h4l%2Fprybar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h4l%2Fprybar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h4l%2Fprybar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h4l%2Fprybar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h4l","download_url":"https://codeload.github.com/h4l/prybar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h4l%2Fprybar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264178659,"owners_count":23569082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["entrypoints","modularity","testing"],"created_at":"2024-11-09T00:07:08.761Z","updated_at":"2025-07-08T15:05:25.108Z","avatar_url":"https://github.com/h4l.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"prybar: Create temporary ``pkg_resources`` entry points at runtime\n======================================================================\n\n.. image:: https://travis-ci.org/h4l/prybar.svg?branch=master\n    :target: https://travis-ci.org/h4l/prybar\n    :alt: CI Status\n.. image:: https://readthedocs.org/projects/prybar/badge/?version=latest\n    :target: https://prybar.readthedocs.io/en/latest/\n    :alt: Documentation Status\n.. image:: https://img.shields.io/pypi/status/prybar.svg\n    :target: https://pypi.org/project/prybar/\n    :alt: PyPI - Status\n\nA Python library to temporarily define ``pkg_resources`` `entry points \u003cep intro_\u003e`_\nat runtime. The primary use case is testing code which works with entry points.\n\n.. _ep intro: https://packaging.python.org/guides/creating-and-discovering-plugins/#using-package-metadata\n\nInstalling\n----------\n\n.. code:: console\n\n    $ pip install prybar\n\nprybar requires Python 3.6 or greater.\n\nUsage\n-----\n\n.. code:: pycon\n\n    \u003e\u003e\u003e import prybar\n    \u003e\u003e\u003e from pkg_resources import iter_entry_points\n    \u003e\u003e\u003e # Entry point doesn't exist\n    \u003e\u003e\u003e list(iter_entry_points('example.hash_types', 'sha256'))\n    []\n    \u003e\u003e\u003e # With prybar's context manager we can create entry points temporarily\n    \u003e\u003e\u003e with prybar.dynamic_entrypoint('example.hash_types',\n    ...                                name='sha256', module='hashlib'):\n    ...     hash = next(iter_entry_points('example.hash_types', 'sha256')).load()\n    ...     hash(b'foo').hexdigest()[:6]\n    '2c26b4'\n    \u003e\u003e\u003e # And it's gone again\n    \u003e\u003e\u003e list(iter_entry_points('example.hash_types', 'sha256'))\n    []\n\nSee the `full documentation \u003chttps://prybar.readthedocs.io/\u003e`_ for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh4l%2Fprybar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh4l%2Fprybar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh4l%2Fprybar/lists"}