2020-09-07 18:50:32 +03:00
|
|
|
Password hashing example
|
|
|
|
========================
|
|
|
|
|
2020-09-07 19:34:49 +03:00
|
|
|
.. meta::
|
|
|
|
:keywords: Python,Dependency Injection,Inversion of Control,Container,Example,Application,
|
|
|
|
Framework,Callable
|
|
|
|
:description: This example demonstrates a usage of the Callable provider.
|
|
|
|
|
2020-09-07 18:50:32 +03:00
|
|
|
This example demonstrates an injection of the ``Callable`` provider.
|
|
|
|
|
2020-09-07 19:31:59 +03:00
|
|
|
The source code is available on the `Github <https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/password-hashing>`_.
|
|
|
|
|
2020-09-08 04:57:43 +03:00
|
|
|
Sample code
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Listing of the pattern example:
|
2020-09-07 18:50:32 +03:00
|
|
|
|
|
|
|
.. literalinclude:: ../../examples/miniapps/password-hashing/example.py
|
|
|
|
:language: python
|
|
|
|
|
2020-09-08 04:57:43 +03:00
|
|
|
Run the example
|
|
|
|
---------------
|
|
|
|
|
2020-09-07 18:50:32 +03:00
|
|
|
Instructions for running:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
python example.py
|
|
|
|
|
|
|
|
.. disqus::
|