mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 11:04:01 +03:00
Updating doc styles
This commit is contained in:
parent
bbc5e83e07
commit
1673a11022
|
@ -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,
|
||||
``@inject`` decorator could be used for patching any callable with injection.
|
||||
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,12 +107,12 @@ 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`.
|
||||
``Resources`` and ``Models``.
|
||||
|
||||
`Resources` catalog is used to group all common application resources like
|
||||
database connection and various api clients, while `Models` catalog is used
|
||||
``Resources`` catalog is used to group all common application resources like
|
||||
database connection and various api clients, while ``Models`` catalog is used
|
||||
for application model providers only.
|
||||
|
||||
.. code-block:: python
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
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
|
||||
|
||||
Sources can be cloned from GitHub: https://github.com/rmk135/objects
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user