Metadata-Version: 2.1
Name: pyramid-blacksmith
Version: 2.0.1
Summary: Pyramid Bindings for Blacksmith
Home-page: https://github.com/mardiros/pyramid-blacksmith
Author: Guillaume Gauvrit
Author-email: guillaume@gauvr.it
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pyramid
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: prometheus
Requires-Dist: blacksmith (>=2.0.0,<3.0.0)
Requires-Dist: prometheus-client (>0.14); extra == "prometheus"
Requires-Dist: pyramid (>1.10,<3)
Project-URL: Repository, https://github.com/mardiros/pyramid-blacksmith
Description-Content-Type: text/x-rst

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

.. image:: https://readthedocs.org/projects/pyramid-blacksmith/badge/?version=latest
   :target: https://pyramid-blacksmith.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status

.. image:: https://github.com/mardiros/pyramid-blacksmith/actions/workflows/main.yml/badge.svg
   :target: https://github.com/mardiros/pyramid-blacksmith/actions/workflows/main.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://python-blacksmith.readthedocs.io/en/latest/index.html
.. _`Blacksmith Factory`: https://python-blacksmith.readthedocs.io/en/latest/user/instanciating_client.html#instanciating-client
.. _`get familiar with the documentation`: https://pyramid-blacksmith.readthedocs.io/


