All Projects → pytest-dev → Pluggy

pytest-dev / Pluggy

Licence: mit
A minimalist production ready plugin system

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Pluggy

Easy Peasy
Vegetarian friendly state for React
Stars: ✭ 4,525 (+691.08%)
Mutual labels:  hooks
Atomico
Atomico a micro-library for creating webcomponents using only functions, hooks and virtual-dom.
Stars: ✭ 481 (-15.91%)
Mutual labels:  hooks
Usedimensions
A React Hook to measure DOM nodes
Stars: ✭ 537 (-6.12%)
Mutual labels:  hooks
React Recipes
👩‍🍳 A React Hooks utility library containing popular customized hooks
Stars: ✭ 452 (-20.98%)
Mutual labels:  hooks
Winxp
🏁 Web based Windows XP desktop recreation.
Stars: ✭ 4,717 (+724.65%)
Mutual labels:  hooks
Maily
📫 Rails Engine to preview emails in the browser
Stars: ✭ 502 (-12.24%)
Mutual labels:  hooks
Openpbs
An HPC workload manager and job scheduler for desktops, clusters, and clouds.
Stars: ✭ 427 (-25.35%)
Mutual labels:  hooks
React Fetching Library
Simple and powerful API client for react 👍 Use hooks or FACCs to fetch data in easy way. No dependencies! Just react under the hood.
Stars: ✭ 561 (-1.92%)
Mutual labels:  hooks
React Hook
↩ Strongly typed, concurrent mode-safe React hooks
Stars: ✭ 472 (-17.48%)
Mutual labels:  hooks
React Hooks Cheatsheet
🦖 React hooks cheatsheet with live editable examples
Stars: ✭ 520 (-9.09%)
Mutual labels:  hooks
The Platform
Web. Components. 😂
Stars: ✭ 4,355 (+661.36%)
Mutual labels:  hooks
React Use Gesture
👇Bread n butter utility for component-tied mouse/touch gestures in React and Vanilla Javascript.
Stars: ✭ 5,704 (+897.2%)
Mutual labels:  hooks
Animavita
Trigger life-saving alerts, register animals for adoption and find the closest pet friend to adopt 🐶
Stars: ✭ 508 (-11.19%)
Mutual labels:  hooks
Beautiful React Hooks
🔥 A collection of beautiful and (hopefully) useful React hooks to speed-up your components and hooks development 🔥
Stars: ✭ 5,242 (+816.43%)
Mutual labels:  hooks
Gear
A lightweight, composable and high performance web service framework for Go.
Stars: ✭ 544 (-4.9%)
Mutual labels:  hooks
Vscode Es7 Javascript React Snippets
Extension for Javascript/React snippets with search supporting ES7 and babel features
Stars: ✭ 435 (-23.95%)
Mutual labels:  hooks
Mobx Router
A simple router for MobX + React apps
Stars: ✭ 489 (-14.51%)
Mutual labels:  hooks
Stop Runaway React Effects
🏃 Catches situations when a react use(Layout)Effect runs repeatedly in rapid succession
Stars: ✭ 574 (+0.35%)
Mutual labels:  hooks
Husky
Git hooks made easy 🐶 woof!
Stars: ✭ 25,056 (+4280.42%)
Mutual labels:  hooks
React Hooks
Essential set of React Hooks for convenient Web API consumption and state management.
Stars: ✭ 515 (-9.97%)
Mutual labels:  hooks

==================================================== pluggy - A minimalist production ready plugin system

|pypi| |conda-forge| |versions| |github-actions| |travis| |gitter| |black| |codecov|

This is the core framework used by the pytest, tox, and devpi_ projects.

Please read the docs_ to learn more!

A definitive example

.. code-block:: python

import pluggy

hookspec = pluggy.HookspecMarker("myproject")
hookimpl = pluggy.HookimplMarker("myproject")


class MySpec:
    """A hook specification namespace.
    """

    @hookspec
    def myhook(self, arg1, arg2):
        """My special little hook that you can customize.
        """


class Plugin_1:
    """A hook implementation namespace.
    """

    @hookimpl
    def myhook(self, arg1, arg2):
        print("inside Plugin_1.myhook()")
        return arg1 + arg2


class Plugin_2:
    """A 2nd hook implementation namespace.
    """

    @hookimpl
    def myhook(self, arg1, arg2):
        print("inside Plugin_2.myhook()")
        return arg1 - arg2


# create a manager and add the spec
pm = pluggy.PluginManager("myproject")
pm.add_hookspecs(MySpec)

# register plugins
pm.register(Plugin_1())
pm.register(Plugin_2())

# call our ``myhook`` hook
results = pm.hook.myhook(arg1=1, arg2=2)
print(results)

Running this directly gets us::

$ python docs/examples/toy-example.py
inside Plugin_2.myhook()
inside Plugin_1.myhook()
[-1, 3]

.. badges

.. |pypi| image:: https://img.shields.io/pypi/v/pluggy.svg :target: https://pypi.org/pypi/pluggy

.. |versions| image:: https://img.shields.io/pypi/pyversions/pluggy.svg :target: https://pypi.org/pypi/pluggy

.. |github-actions| image:: https://github.com/pytest-dev/pluggy/workflows/main/badge.svg :target: https://github.com/pytest-dev/pluggy/actions

.. |travis| image:: https://img.shields.io/travis/pytest-dev/pluggy/master.svg :target: https://travis-ci.org/pytest-dev/pluggy

.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg :target: https://anaconda.org/conda-forge/pytest

.. |gitter| image:: https://badges.gitter.im/pytest-dev/pluggy.svg :alt: Join the chat at https://gitter.im/pytest-dev/pluggy :target: https://gitter.im/pytest-dev/pluggy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black

.. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/master/graph/badge.svg :target: https://codecov.io/gh/pytest-dev/pluggy :alt: Code coverage Status

.. links .. _pytest: http://pytest.org .. _tox: https://tox.readthedocs.org .. _devpi: http://doc.devpi.net .. _read the docs: https://pluggy.readthedocs.io/en/latest/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].