A bag of objects for Python
For when your object graph is too big
class A:
def __init__(self, b: B):
self.b = b
class B:
pass
svc = {
'a': A,
'b': B,
}
context = Pytel(svc)
assert context.a.b == context.b
See usage for more cases
Features
Build a graph of objects based on init methods or factory functions
- Initialize from
- a dictionary of string to any of:
callable
type
value
- Object containing any of:
object fields with objects or types (or callables)
class fields with objects or types (or callables)
methods
static methods
An Iterable of the above
Verify integrity of the dependency graph using type annotations
Recurrently resolve all dependencies at the first reference
Works as a Context Manager, on __exit__ close all objects that are Context Managers
Because of strict type checking this package is probably quite unpythonic.
Metadata
Release files for pytel-inject 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytel-inject-0.5.1.tar.gz | 8.4 kB | Without provenance | Details for pytel-inject-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytel_inject-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for pytel_inject-0.5.1-py3-none-any.whl |
Total release size: 17.3 kB
Release files / pytel-inject-0.5.1.tar.gz
| Download URL | pytel-inject-0.5.1.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f876ab7155e8f7d480dd626ba20946ab21e7d7c4bd1284d547c340ae4e35da4b
|
|
BLAKE2b-256 checksum How to use checksums |
6444e5555d2973f9aef6c3d51f6002ef6f42772fdcfde4ce8145ab18abee0dc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.6 Linux/5.0.0-1031-gcp
|
Release files / pytel_inject-0.5.1-py3-none-any.whl
| Download URL | pytel_inject-0.5.1-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52c960b07f9dfadcacc190a22328100c3b0011a0eba67e46894c08d81a1df925
|
|
BLAKE2b-256 checksum How to use checksums |
5476db2389715168e7c881b50681c6abbd4c650d58504331d69e1da712f62cbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.6 Linux/5.0.0-1031-gcp
|
Security for pytel-inject 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.