Usage:
regs = [container.registry]+list(container.child_registries)
x = render(regs, type(container))
print(x)
from collections.abc import AsyncIterator, Iterator | |
from contextlib import contextmanager | |
from typing import TypeVar | |
from dishka import ( | |
DEFAULT_COMPONENT, | |
AsyncContainer, | |
Container, | |
make_async_container, | |
make_container, |
# logic | |
MOD x = y | |
x = MOD.__transform__(t"{y}") # lazy evaluation | |
x = MOD(y) # general case | |
# unpack | |
MOD1 x, MOD2 y = z | |
_x, _y = z | |
x = MOD1(x), MOD2(y) |
import asyncio | |
import logging | |
import os | |
from dataclasses import dataclass | |
from typing import Any | |
from aiogram import Bot, Dispatcher, Router, F | |
from aiogram.filters import CommandStart | |
from aiogram.fsm.state import State | |
from aiogram.types import Message, CallbackQuery |
import http | |
import json | |
import logging | |
from dataclasses import dataclass | |
from datetime import datetime | |
from typing import Any | |
import aiohttp | |
from adaptix import Retort |
from enum import auto | |
from dishka import BaseScope | |
try: | |
from dishka.entities.scope import new_scope | |
except ImportError: | |
new_scope = str | |
class B: | |
def __init__(self, x: int): |
import re | |
class R: | |
def __init__(self, value): | |
self._value = value | |
class MatchRegex(type): | |
def __instancecheck__(cls, obj): |
from dataclasses import dataclass | |
from adaptix import Retort, Chain, loader, dumper | |
@dataclass | |
class A: | |
field: str |
Usage:
regs = [container.registry]+list(container.child_registries)
x = render(regs, type(container))
print(x)
from collections import defaultdict | |
from dataclasses import dataclass | |
from uuid import uuid4 | |
from dishka.dependency_source.factory import Factory | |
from dishka.entities.key import DependencyKey | |
from dishka.entities.scope import BaseScope | |
from dishka.registry import Registry | |
import hashlib | |
from timeit import timeit | |
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor | |
a = b'1 2 3 4' * 1024 * 1024 * 100 | |
funcs = [ | |
hashlib.sha1, | |
hashlib.sha256, | |
hashlib.sha384, |