mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 01:26:51 +03:00
docs update
This commit is contained in:
parent
219932d9cc
commit
8ee9378dda
12
README.rst
12
README.rst
|
@ -42,21 +42,21 @@ source systems, frameworks, libraries and some turnkey functionality.
|
|||
When application goes bigger, its amount of objects and their dependencies
|
||||
also increased extremely fast and became hard to maintain.
|
||||
|
||||
**Objects** is designed to be developer's friendly tool for managing objects
|
||||
and their dependencies in formal, pretty way. Main idea of **Objects** is to
|
||||
*Objects* is designed to be developer's friendly tool for managing objects
|
||||
and their dependencies in formal, pretty way. Main idea of *Objects* is to
|
||||
keep dependencies under control.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
**Objects** library is available on PyPi_::
|
||||
*Objects* library is available on PyPi_::
|
||||
|
||||
pip install objects
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
**Objects** documentation is hosted on ReadTheDocs:
|
||||
*Objects* documentation is hosted on ReadTheDocs:
|
||||
|
||||
- `Stable version`_
|
||||
- `Latest version`_
|
||||
|
@ -137,7 +137,7 @@ Examples
|
|||
|
||||
example()
|
||||
|
||||
You can get more **Objects** examples in ``/examples`` directory on
|
||||
You can get more *Objects* examples in ``/examples`` directory on
|
||||
GitHub:
|
||||
|
||||
https://github.com/rmk135/objects
|
||||
|
@ -147,7 +147,7 @@ Feedback
|
|||
--------
|
||||
|
||||
Feel free to post questions, bugs, feature requests, proposals etc. on
|
||||
**Objects** GitHub Issues:
|
||||
*Objects* GitHub Issues:
|
||||
|
||||
https://github.com/rmk135/objects/issues
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
Advanced usage
|
||||
==============
|
||||
|
||||
Below you can find some variants of advanced usage of **Objects**.
|
||||
Below you can find some variants of advanced usage of *Objects*.
|
||||
|
||||
@inject decorator
|
||||
-----------------
|
||||
|
||||
``@inject`` decorator could be used for patching any callable with injection.
|
||||
Any Python object will be injected *as is*, except **Objects** providers,
|
||||
Any Python object will be injected *as is*, except *Objects* providers,
|
||||
that will be called to provide injectable value.
|
||||
|
||||
.. code-block:: python
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Entities
|
||||
========
|
||||
|
||||
Current section describes main **Objects** entities and their interaction.
|
||||
Current section describes main *Objects* entities and their interaction.
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
@ -45,10 +45,10 @@ dependencies of objects.
|
|||
|
||||
Objects can take dependencies in various forms. Some objects take init
|
||||
arguments, other are using attributes or methods to be initialized. Injection,
|
||||
in terms of **Objects**, is an instruction how to provide dependency for the
|
||||
in terms of *Objects*, is an instruction how to provide dependency for the
|
||||
particular object.
|
||||
|
||||
Every Python object could be an injection's value. Special case is a **Objects**
|
||||
Every Python object could be an injection's value. Special case is a *Objects*
|
||||
provider as an injection's value. In such case, injection value is a result of
|
||||
injectable provider call (every time injection is done).
|
||||
|
||||
|
@ -107,7 +107,7 @@ Catalogs
|
|||
|
||||
Catalogs are named set of providers.
|
||||
|
||||
**Objects** catalogs can be used for grouping of providers by some
|
||||
*Objects* catalogs can be used for grouping of providers by some
|
||||
kind of rules. In example below, there are two catalogs:
|
||||
``Resources`` and ``Models``.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Examples
|
||||
========
|
||||
|
||||
You can get more **Objects** examples in ``/examples`` directory on
|
||||
You can get more *Objects* examples in ``/examples`` directory on
|
||||
GitHub:
|
||||
|
||||
https://github.com/rmk135/objects
|
||||
|
|
|
@ -2,7 +2,7 @@ Feedback
|
|||
========
|
||||
|
||||
Feel free to post questions, bugs, feature requests, proposals etc. on
|
||||
**Objects** GitHub Issues:
|
||||
*Objects* GitHub Issues:
|
||||
|
||||
https://github.com/rmk135/objects/issues
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
Latest stable version of **Objects** library can be installed from PyPi_::
|
||||
Latest stable version of *Objects* library can be installed from PyPi_::
|
||||
|
||||
pip install objects
|
||||
|
||||
|
@ -9,7 +9,7 @@ Sources can be cloned from GitHub_::
|
|||
|
||||
git clone https://github.com/rmk135/objects.git
|
||||
|
||||
All **Objects** releases can be found on GitHub: https://github.com/rmk135/objects/releases
|
||||
All *Objects* releases can be found on GitHub: https://github.com/rmk135/objects/releases
|
||||
|
||||
.. _PyPi: https://pypi.python.org/pypi/Objects
|
||||
.. _GitHub: https://github.com/rmk135/objects
|
||||
|
|
|
@ -11,6 +11,6 @@ source systems, frameworks, libraries and some turnkey functionality.
|
|||
When application goes bigger, its amount of objects and their dependencies
|
||||
also increased extremely fast and became hard to maintain.
|
||||
|
||||
**Objects** is designed to be developer's friendly tool for managing objects
|
||||
and their dependencies in formal, pretty way. Main idea of **Objects** is to
|
||||
*Objects* is designed to be developer's friendly tool for managing objects
|
||||
and their dependencies in formal, pretty way. Main idea of *Objects* is to
|
||||
keep dependencies under control.
|
||||
|
|
|
@ -51,15 +51,15 @@ There are few *Instance* providers:
|
|||
Objects can take dependencies in various forms. Some objects take init
|
||||
arguments, other are using attributes or methods to be initialized. It affects
|
||||
how such objects need to be created and initialized, and that is the place
|
||||
where **Injections** need to be used.
|
||||
where *Injections* need to be used.
|
||||
|
||||
In terms of computer science, **Injection** of dependency is a way how
|
||||
In terms of computer science, *Injection* of dependency is a way how
|
||||
dependency can be coupled with dependent object.
|
||||
|
||||
In terms of **Objects**, **Injection** is an instruction how to provide
|
||||
In terms of *Objects*, *Injection* is an instruction how to provide
|
||||
dependency for the particular object.
|
||||
|
||||
Every Python object could be an injection's value. Special case is an **Objects**
|
||||
Every Python object could be an injection's value. Special case is an *Objects*
|
||||
provider as an injection's value. In such case, injection value is a result of
|
||||
injectable provider call (every time injection is done).
|
||||
|
||||
|
@ -126,7 +126,7 @@ Example:
|
|||
Static providers
|
||||
----------------
|
||||
|
||||
Static providers are family of providers that returns its values "as is".
|
||||
Static providers are family of providers that return their values "as is".
|
||||
There are four of static providers: ``Class``, ``Object``, ``Function`` and
|
||||
``Value``. All of them has the same behaviour, but usage of anyone is
|
||||
predicted by readability and providable object's type.
|
||||
|
@ -194,6 +194,8 @@ callable.
|
|||
External dependency provider
|
||||
----------------------------
|
||||
|
||||
``ExternalDependency`` provider can be useful for
|
||||
|
||||
Config provider
|
||||
---------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user