Metadata-Version: 2.1
Name: pyramid-blacksmith
Version: 5.0.1
Summary: Pyramid Bindings for Blacksmith
Author-Email: Guillaume Gauvrit <guillaume@gauvr.it>
License: MIT License
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pyramid
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Networking
Classifier: Typing :: Typed
Project-URL: Homepage, https://github.com/mardiros/pyramid-blacksmith
Project-URL: Documentation, https://mardiros.github.io/pyramid-blacksmith
Project-URL: Repository, https://github.com/mardiros/pyramid-blacksmith.git
Project-URL: Issues, https://github.com/mardiros/pyramid-blacksmith/issues
Project-URL: Changelog, https://mardiros.github.io/pyramid-blacksmith/user/changelog.html
Requires-Python: >=3.10
Requires-Dist: blacksmith<6,>=5.0.0
Requires-Dist: pyramid<3,>1.10
Requires-Dist: prometheus-client<1,>=0.17
Requires-Dist: zk<0.10,>=0.8
Provides-Extra: docs
Requires-Dist: sphinx>=7.0.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints<2,>=1.12.0; extra == "docs"
Requires-Dist: furo>=2024.8.6; extra == "docs"
Description-Content-Type: text/x-rst

pyramid-blacksmith
==================

.. image:: https://github.com/mardiros/pyramid-blacksmith/actions/workflows/publish-doc.yml/badge.svg
   :target: https://mardiros.github.io/pyramid-blacksmith/
   :alt: Documentation

.. image:: https://github.com/mardiros/pyramid-blacksmith/actions/workflows/tests.yml/badge.svg
   :target: https://github.com/mardiros/pyramid-blacksmith/actions/workflows/tests.yml
   :alt: Continuous Integration

.. image:: https://codecov.io/gh/mardiros/pyramid-blacksmith/branch/main/graph/badge.svg?token=9IRABRO2LN
   :target: https://codecov.io/gh/mardiros/pyramid-blacksmith
   :alt: Coverage

Pyramid bindings for `Blacksmith`_ rest api client.


Introduction
------------

This plugin create a request proterty named ``blacksmith`` that bind
clients to do API Call using `Blacksmith`_.


Clients are configured via the pyramid configurator and its settings.

Then you can access the client factory behind a blacksmith property of
the request.


::

   def my_view(request):
      api_dummy = request.blacksmith.client("api_dummy")
      dummy = api_dummy.dummies.get({"name": "alice"})


In the example above, a dummy resource has been fetch using the service api_dummy.
The client method is a configured `Blacksmith Factory`_.

The configuration of the factory is simply made throw the pyramid configurator.

Go ahead and `get familiar with the documentation`_.


.. _`Blacksmith`: https://mardiros.github.io/blacksmith/index.html
.. _`Blacksmith Factory`: https://mardiros.github.io/blacksmith/user/instanciating_clients.html
.. _`get familiar with the documentation`: https://mardiros.github.io/blacksmith/index.html
