Skip to content

Commit

Permalink
Mention difference
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Jul 19, 2023
1 parent 14b66b9 commit 885cb33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ registry.register_factory(Database, create_database)

The generator-based setup and cleanup may remind you of [Pytest fixtures](https://docs.pytest.org/en/stable/explanation/fixtures.html).

Unlike typical dependency injection that passes your dependencies as arguments, the active obtainment of resources by calling `get()` when you *know* you're going to need it avoids the conundrum of either having to pass a factory (e.g., a connection pool -- which also puts the onus of cleanup on you), or eagerly creating resources that are never used.

<!-- end-pypi -->


Expand Down

0 comments on commit 885cb33

Please sign in to comment.