from types import ModuleType
from typing import Callable
from ..system.types.he import He


class HeEro(Exception, list):
    def __init__(self, he:type|He=None, func:str|Callable=None, feature:str=None, dec:str=None, dec_kwargs:dict[str, str|int|bool|None]=None, error:str|list[str]=None):
        self.es:list[str] = ...
        self.he:type = ...
        self.dec = ...
        self.dec_kwargs:dict = ...
        self.func = ...
        self.feature:str = ...
    def add(self, *e:str|Exception): ...

def parse_attribute_by_path_name(pyobj: object, name: str): ...

def join_url(*names) -> str: ...
def join_mod_path(*names) -> str: ...

def parse_pycls_name_by_mod_path(modnam: str) -> str: ...
def parse_mod_path_by_rel_path(mod_path: str, rel_path: str)-> str: ...
def parse_dirpath_by_pymod(pymod: ModuleType)-> str: ...
def parse_mod_path_by_pycls(pycls: type, *sub_names) -> str: ...
def parse_mod_path_by_pyobj(pyobj: object, *sub_names) -> str: ...
def parse_dirpath_by_pycls(cls: type) -> str: ...
def parse_dirpath_by_pyobj(obj: He) -> str: ...
def import_pymod_by_mod_path(module_path: str) -> ModuleType | None: ...
def import_pycls_by_mod_path(module_path: str) -> type | None: ...
def instance_pyobj_by_pycls(pycls: type, args=None, kwargs=None) -> He | object | None: ...
def instance_pyobj_by_mod_path(module_path: str, args=None, kwargs=None) -> He | object | None: ...
def import_webapp_pycls_by_mod_path(module_path: str) -> type | None: ...

def timestamp_days()-> int: ...
def timestamp_hours()-> int: ...
def timestamp_seconds()-> int: ...
def timestamp_milliseconds()-> int: ...
def timestamp_microseconds()-> int: ...
def timestamp_nanoseconds()-> int: ...


####################################################################################################################
BASE64URL: str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_"
def base_convert(value: str, base_from: int = 10, base_to: int = 32): ...
def uid_generater(prefix: str=None)-> str: ...
# COMPRESS_ID 字符必须相等长度
COMPRESS_ID_STR: str = 'ST'
COMPRESS_ID_INT: str = 'IN'
COMPRESS_ID_FLT: str = 'FT'
COMPRESS_ID_DIT: str = 'DT'
COMPRESS_ID_LST: str = 'LT'
COMPRESS_ID_BOL: str = 'BL'
COMPRESS_ID_NON: str = 'NO'
def compress(data: dict | list | int | float | bool | str | None) -> str: ...
def decompress(data: str) -> dict | list | int | float | bool | str | None: ...
def var2ui(value)-> str: ...
