pypotage 0.2.0a0

Last updated:

0 purchases

pypotage 0.2.0a0 Image
pypotage 0.2.0a0 Images
Add to Cart

Description:

pypotage 0.2.0a0

pypotage




A simple Python package that provides an easy way to use Dependency Injection in your projects.

Key Features

Easy to use
Supports both function and class-based dependency
injection
Allows customizing the way dependencies are resolved
Allows for the use of custom containers

Installing
To install the latest pypotage version, run the following command:
python3 -m pip install -U pypotage

Development
To install the development version:
git clone https://github.com/pavalso/potage.git
cd potage
python3 -m pip install -U .

Quick Examples
Basic usage
import pypotage
import logging

@pypotage.prepare
def logger():
logging.basicConfig(level=logging.DEBUG)
return logging.getLogger(__name__)

pypotage.cook(logging.Logger).take_out().info("Hello World!")

Using classes
import pypotage

class A:
def __init__(self):
...

@pypotage.prepare
class B(A):
def __init__(self):
...

pypotage.cook(A).take_out() # returns an instance of B

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.