libuseful 0.3.4__py38-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- libuseful/__init__.pyc +0 -0
- libuseful/__init__.pyi +1 -0
- libuseful/exception.pyc +0 -0
- libuseful/exception.pyi +15 -0
- libuseful/lib_args.pyc +0 -0
- libuseful/lib_args.pyi +23 -0
- libuseful/lib_async_loop.pyc +0 -0
- libuseful/lib_async_loop.pyi +25 -0
- libuseful/lib_cam_record.pyc +0 -0
- libuseful/lib_cam_record.pyi +17 -0
- libuseful/lib_dynamic_import.pyc +0 -0
- libuseful/lib_dynamic_import.pyi +10 -0
- libuseful/lib_enum.pyc +0 -0
- libuseful/lib_enum.pyi +6 -0
- libuseful/lib_excel.pyc +0 -0
- libuseful/lib_excel.pyi +66 -0
- libuseful/lib_fatal.pyc +0 -0
- libuseful/lib_fatal.pyi +24 -0
- libuseful/lib_file.pyc +0 -0
- libuseful/lib_file.pyi +18 -0
- libuseful/lib_logger.pyc +0 -0
- libuseful/lib_logger.pyi +37 -0
- libuseful/lib_math_geometry.pyc +0 -0
- libuseful/lib_math_geometry.pyi +31 -0
- libuseful/lib_path.pyc +0 -0
- libuseful/lib_path.pyi +34 -0
- libuseful/lib_path_remote_linux.pyc +0 -0
- libuseful/lib_path_remote_linux.pyi +10 -0
- libuseful/lib_processor.pyc +0 -0
- libuseful/lib_processor.pyi +30 -0
- libuseful/lib_retry.pyc +0 -0
- libuseful/lib_retry.pyi +5 -0
- libuseful/lib_shell.pyc +0 -0
- libuseful/lib_shell.pyi +29 -0
- libuseful/lib_singleton.pyc +0 -0
- libuseful/lib_singleton.pyi +5 -0
- libuseful/lib_thread.pyc +0 -0
- libuseful/lib_thread.pyi +19 -0
- libuseful/lib_threadsM.pyc +0 -0
- libuseful/lib_threadsM.pyi +14 -0
- libuseful/lib_time.pyc +0 -0
- libuseful/lib_time.pyi +13 -0
- libuseful/lib_usermng.pyc +0 -0
- libuseful/lib_usermng.pyi +37 -0
- libuseful/lib_watchdog.pyc +0 -0
- libuseful/lib_watchdog.pyi +13 -0
- libuseful/py.typed +0 -0
- libuseful-0.3.4.dist-info/LICENSE +19 -0
- libuseful-0.3.4.dist-info/METADATA +37 -0
- libuseful-0.3.4.dist-info/RECORD +52 -0
- libuseful-0.3.4.dist-info/WHEEL +5 -0
- libuseful-0.3.4.dist-info/top_level.txt +1 -0
libuseful/__init__.pyc
ADDED
|
Binary file
|
libuseful/__init__.pyi
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__: str
|
libuseful/exception.pyc
ADDED
|
Binary file
|
libuseful/exception.pyi
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
__all__ = ['CEOutOfRange', 'CEInvalidArguments', 'CENotInitialized', 'CEOutOfLeagueException', 'CECannotRecoveryException', 'CEInvalidValueException', 'CEMissMatchedException', 'CENullException', 'CENotFoundException', 'CECommunicationError', 'CEMandatoryError', 'CENotSupportException', 'CELogicErrorException']
|
|
2
|
+
|
|
3
|
+
class CEOutOfRange(Exception): ...
|
|
4
|
+
class CEInvalidArguments(Exception): ...
|
|
5
|
+
class CENotInitialized(Exception): ...
|
|
6
|
+
class CEOutOfLeagueException(Exception): ...
|
|
7
|
+
class CECannotRecoveryException(Exception): ...
|
|
8
|
+
class CEInvalidValueException(Exception): ...
|
|
9
|
+
class CEMissMatchedException(Exception): ...
|
|
10
|
+
class CENullException(Exception): ...
|
|
11
|
+
class CENotFoundException(Exception): ...
|
|
12
|
+
class CECommunicationError(Exception): ...
|
|
13
|
+
class CEMandatoryError(Exception): ...
|
|
14
|
+
class CENotSupportException(Exception): ...
|
|
15
|
+
class CELogicErrorException(Exception): ...
|
libuseful/lib_args.pyc
ADDED
|
Binary file
|
libuseful/lib_args.pyi
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
from _typeshed import Incomplete
|
|
3
|
+
|
|
4
|
+
logger: Incomplete
|
|
5
|
+
|
|
6
|
+
class CArgParserCommon:
|
|
7
|
+
__inst__: Incomplete
|
|
8
|
+
__arg_info__: Incomplete
|
|
9
|
+
def __init__(self, name: str, desc: str = 'No Description.', sign_log: str = 'No Sign') -> None: ...
|
|
10
|
+
def get_parser_instance(self): ...
|
|
11
|
+
def get_info_handler(self): ...
|
|
12
|
+
def extract_arg_info(self): ...
|
|
13
|
+
def get_arg_info(self, item_name) -> None: ...
|
|
14
|
+
def post_proc_of_parse(self, arg_info) -> None: ...
|
|
15
|
+
|
|
16
|
+
class CHargs:
|
|
17
|
+
__cmd__: Incomplete
|
|
18
|
+
__arg_leng__: Incomplete
|
|
19
|
+
__arg_parser__: Incomplete
|
|
20
|
+
def __init__(self, class_inst: CArgParserCommon) -> None: ...
|
|
21
|
+
def get_cmd(self): ...
|
|
22
|
+
def get_arg_leng(self): ...
|
|
23
|
+
def get_arg_data(self, item_name): ...
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
import asyncio
|
|
3
|
+
from typing import Callable
|
|
4
|
+
|
|
5
|
+
__all__ = ['CAsyncLoop']
|
|
6
|
+
|
|
7
|
+
class CAsyncLoop:
|
|
8
|
+
THR_JOIN_TIMEOUT: float
|
|
9
|
+
GATHER_TASK_NAME: str
|
|
10
|
+
MAJOR_TASK_NAME: str
|
|
11
|
+
class KEY:
|
|
12
|
+
NAME: str
|
|
13
|
+
FUNC: str
|
|
14
|
+
ARGS: str
|
|
15
|
+
KWARGS: str
|
|
16
|
+
CALLBACK: str
|
|
17
|
+
def register_task(self, name: str, func, callback: Callable[[asyncio.Task], None] = None, *args, **kwargs): ...
|
|
18
|
+
def unregister_task(self, name: str = None): ...
|
|
19
|
+
def start(self) -> None: ...
|
|
20
|
+
def start_onece(self, name: str, func, callback: Callable[[asyncio.Task], None] = None, *args, **kwargs): ...
|
|
21
|
+
def start_n_wait_done(self): ...
|
|
22
|
+
def wait_done(self, hook: Callable[[], None] = None): ...
|
|
23
|
+
async def run_inline_thread(self, func, *args, **kwargs): ...
|
|
24
|
+
def __init__(self) -> None: ...
|
|
25
|
+
def __del__(self) -> None: ...
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
from _typeshed import Incomplete
|
|
3
|
+
|
|
4
|
+
__all__ = ['CamRecoder']
|
|
5
|
+
|
|
6
|
+
class CamRecoder:
|
|
7
|
+
@property
|
|
8
|
+
def cam(self): ...
|
|
9
|
+
@property
|
|
10
|
+
def output(self): ...
|
|
11
|
+
@property
|
|
12
|
+
def is_running(self): ...
|
|
13
|
+
def start(self) -> None: ...
|
|
14
|
+
def stop(self) -> None: ...
|
|
15
|
+
def __init__(self, cam_idx: int, dir_path: str, file_name: str, mirror: bool = False, func_uptime: Incomplete | None = None) -> None: ...
|
|
16
|
+
def __del__(self) -> None: ...
|
|
17
|
+
def __clean__(self) -> None: ...
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
import types
|
|
3
|
+
from _typeshed import Incomplete
|
|
4
|
+
|
|
5
|
+
logger: Incomplete
|
|
6
|
+
|
|
7
|
+
def import_module(absolute_path: str): ...
|
|
8
|
+
def import_class(module: types.ModuleType, class_name: str): ...
|
|
9
|
+
def get_path_class(data: dict): ...
|
|
10
|
+
def get_class_reference(data: dict, local_root: str): ...
|
libuseful/lib_enum.pyc
ADDED
|
Binary file
|
libuseful/lib_enum.pyi
ADDED
libuseful/lib_excel.pyc
ADDED
|
Binary file
|
libuseful/lib_excel.pyi
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
from openpyxl.styles import *
|
|
2
|
+
from openpyxl.chart import *
|
|
3
|
+
from openpyxl.utils import *
|
|
4
|
+
from openpyxl.utils.exceptions import *
|
|
5
|
+
from .exception import *
|
|
6
|
+
from .lib_logger import *
|
|
7
|
+
import openpyxl as xl
|
|
8
|
+
import pandas as pd
|
|
9
|
+
from _typeshed import Incomplete
|
|
10
|
+
from openpyxl.worksheet.worksheet import Worksheet as Worksheet
|
|
11
|
+
|
|
12
|
+
logger: Incomplete
|
|
13
|
+
|
|
14
|
+
class Cexcel:
|
|
15
|
+
class Color:
|
|
16
|
+
BLACK: Incomplete
|
|
17
|
+
WHITE: Incomplete
|
|
18
|
+
RED: Incomplete
|
|
19
|
+
GREEN: Incomplete
|
|
20
|
+
BLUE: Incomplete
|
|
21
|
+
YELLOW: Incomplete
|
|
22
|
+
DARKRED: Incomplete
|
|
23
|
+
DARKGREEN: Incomplete
|
|
24
|
+
DARKBLUE: Incomplete
|
|
25
|
+
DARKYELLOW: Incomplete
|
|
26
|
+
JSON_POSTFIX: str
|
|
27
|
+
@staticmethod
|
|
28
|
+
def create_simple_df(data: dict | list, columns: list): ...
|
|
29
|
+
@staticmethod
|
|
30
|
+
def create_df(data: list, columns: list = None, indexes: list = None): ...
|
|
31
|
+
def create_cell_style(self, font_size: int, font_color: Color, font_bold: bool = False, font_italic: bool = False, _border: Border = ..., _alignment: Alignment = ..., _fill: PatternFill = None): ...
|
|
32
|
+
def get_sheet(self, name: str, not_exist_then_create: bool = True): ...
|
|
33
|
+
def get_sheet_names(self): ...
|
|
34
|
+
def remove_sheet(self, name: str): ...
|
|
35
|
+
def save(self, file_path: str): ...
|
|
36
|
+
def close(self) -> None: ...
|
|
37
|
+
def __init__(self, file_path: str = None, wb: xl.Workbook = None) -> None: ...
|
|
38
|
+
|
|
39
|
+
class _Csheet_:
|
|
40
|
+
class MERGE_DIR:
|
|
41
|
+
COLUMNS: int
|
|
42
|
+
ROWS: int
|
|
43
|
+
def append_message(self, msg: str, start_col_name: str, end_col_name: str, gap_blank: int = 1, gap_post: int = 0, border_rows: int = 1, style: NamedStyle = ...): ...
|
|
44
|
+
def append_df(self, df: pd.DataFrame, title: str = None, start_col_name: str = 'A', gap_blank: int = 1, gap_title: int = 1, title_border_rows: int = 3, title_style: NamedStyle = ..., skip_column: bool = False, column_style: NamedStyle = None, column_space: list = None, index_style: NamedStyle = ..., base_style: NamedStyle = ..., desp_text: str = None): ...
|
|
45
|
+
def extract_dfs(self): ...
|
|
46
|
+
@property
|
|
47
|
+
def name(self): ...
|
|
48
|
+
@property
|
|
49
|
+
def json_data(self): ...
|
|
50
|
+
def __init__(self, sheet: Worksheet, excel_path: str = None) -> None: ...
|
|
51
|
+
|
|
52
|
+
class _CjsonSheet_:
|
|
53
|
+
class KEY:
|
|
54
|
+
SHEET: str
|
|
55
|
+
TITLE: str
|
|
56
|
+
DESP: str
|
|
57
|
+
DATA: str
|
|
58
|
+
TABLES: str
|
|
59
|
+
FORMAT_TYPE: str
|
|
60
|
+
@property
|
|
61
|
+
def data(self): ...
|
|
62
|
+
@property
|
|
63
|
+
def table_cnt(self): ...
|
|
64
|
+
def append_table(self, title: str, df: pd.DataFrame, desp: str = None): ...
|
|
65
|
+
def get_table(self, idx: int): ...
|
|
66
|
+
def __init__(self, name: str, json_path: str = None) -> None: ...
|
libuseful/lib_fatal.pyc
ADDED
|
Binary file
|
libuseful/lib_fatal.pyi
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from .lib_singleton import *
|
|
2
|
+
from .lib_logger import *
|
|
3
|
+
|
|
4
|
+
__all__ = ['CFatalErr']
|
|
5
|
+
|
|
6
|
+
class CFatalErr(Singleton):
|
|
7
|
+
class KEY:
|
|
8
|
+
ID: str
|
|
9
|
+
TYPE: str
|
|
10
|
+
MODE: str
|
|
11
|
+
PC_STAMP: str
|
|
12
|
+
MSG: str
|
|
13
|
+
class TYPE:
|
|
14
|
+
NONE: str
|
|
15
|
+
ADB: str
|
|
16
|
+
class MODE:
|
|
17
|
+
BROKEN: str
|
|
18
|
+
INFINITE_WAIT: str
|
|
19
|
+
OFFLINE: str
|
|
20
|
+
def get_infos(self, type: TYPE = ...) -> dict: ...
|
|
21
|
+
def get_info(self, id: str) -> dict: ...
|
|
22
|
+
def set_info(self, type: TYPE, mode: MODE, err: str) -> str: ...
|
|
23
|
+
def __init__(self) -> None: ...
|
|
24
|
+
def __del__(self) -> None: ...
|
libuseful/lib_file.pyc
ADDED
|
Binary file
|
libuseful/lib_file.pyi
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
from .exception import CENullException as CENullException
|
|
3
|
+
from _typeshed import Incomplete
|
|
4
|
+
|
|
5
|
+
logger: Incomplete
|
|
6
|
+
LINE_ENDING_WINDOW: bytes
|
|
7
|
+
LINE_ENDING_LINUX: bytes
|
|
8
|
+
CODEC: str
|
|
9
|
+
|
|
10
|
+
def append_text(text: str, contents: str) -> str: ...
|
|
11
|
+
def create_text_file(file_path: str, contents: str): ...
|
|
12
|
+
def create_json_file(file_path: str, data: dict): ...
|
|
13
|
+
def delete_file(file_path: str): ...
|
|
14
|
+
def read_text_file(file_path: str, encoder: str = ...) -> list[str]: ...
|
|
15
|
+
def read_json_file(file_path: str, with_annotation: bool = False) -> dict: ...
|
|
16
|
+
def read_json(contents: str, with_annotation: bool = False, replace_str_indicator: bool = False) -> dict: ...
|
|
17
|
+
def write_string(contents: dict): ...
|
|
18
|
+
def copy_json_file(src_path: str, dest_path: str, with_annotation: bool = False): ...
|
libuseful/lib_logger.pyc
ADDED
|
Binary file
|
libuseful/lib_logger.pyi
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from .lib_enum import ENUM_STR as myEnum
|
|
2
|
+
from .lib_watchdog import IWatchDog
|
|
3
|
+
from _typeshed import Incomplete
|
|
4
|
+
|
|
5
|
+
__all__ = ['CmyLogger', 'get_instance', 'assertMy', 'WTD_logSignal']
|
|
6
|
+
|
|
7
|
+
class WTD_logSignal(IWatchDog):
|
|
8
|
+
SIGNAL_ID: Incomplete
|
|
9
|
+
SIGNAL_LISTEN_ID: Incomplete
|
|
10
|
+
def start(self, sig_handler: Incomplete | None = None) -> None: ...
|
|
11
|
+
def __init__(self) -> None: ...
|
|
12
|
+
|
|
13
|
+
class CmyLogger:
|
|
14
|
+
DEBUG_MODE: Incomplete
|
|
15
|
+
RELEASE_MODE: Incomplete
|
|
16
|
+
DEBUG_LEVEL: Incomplete
|
|
17
|
+
INFO_LEVEL: Incomplete
|
|
18
|
+
WARN_LEVEL: Incomplete
|
|
19
|
+
ERROR_LEVEL: Incomplete
|
|
20
|
+
NONE_LEVEL: Incomplete
|
|
21
|
+
def set_project(self, prj: str): ...
|
|
22
|
+
def stop(self) -> None: ...
|
|
23
|
+
def __init__(self, level: myEnum = ..., mode: myEnum = ...) -> None: ...
|
|
24
|
+
def __get_frameInfo__(self, func_deepth: int = 0): ...
|
|
25
|
+
def __level_int_to_str__(self, level: int) -> myEnum: ...
|
|
26
|
+
def __level_str_to_int__(self, level: myEnum) -> int: ...
|
|
27
|
+
def __set_mode__(self, mode: myEnum): ...
|
|
28
|
+
def __set_level__(self, level: myEnum): ...
|
|
29
|
+
def __get_level__(self) -> myEnum: ...
|
|
30
|
+
def get_level(self) -> str: ...
|
|
31
|
+
def error(self, *args, **kwargs) -> None: ...
|
|
32
|
+
def warn(self, *args, **kwargs) -> None: ...
|
|
33
|
+
def info(self, *args, **kwargs) -> None: ...
|
|
34
|
+
def debug(self, *args, **kwargs) -> None: ...
|
|
35
|
+
|
|
36
|
+
def get_instance(level_of_file: myEnum = None, mode: myEnum = None) -> CmyLogger: ...
|
|
37
|
+
def assertMy(func, except_type, msg: str = '', debug_msg: str = None): ...
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
from _typeshed import Incomplete
|
|
3
|
+
|
|
4
|
+
logger: Incomplete
|
|
5
|
+
|
|
6
|
+
class MG_LINE:
|
|
7
|
+
@staticmethod
|
|
8
|
+
def slope_constant(p1: tuple, p2: tuple): ...
|
|
9
|
+
@staticmethod
|
|
10
|
+
def intersection_point(line1: tuple, line2: tuple): ...
|
|
11
|
+
|
|
12
|
+
class MG_RECT:
|
|
13
|
+
class MERGE_COND:
|
|
14
|
+
EQ_LEFT: str
|
|
15
|
+
EQ_RIGHT: str
|
|
16
|
+
@staticmethod
|
|
17
|
+
def check_validation(target: str, rect: list): ...
|
|
18
|
+
@staticmethod
|
|
19
|
+
def distinguish_intersected(src_rect: list, rect2: list): ...
|
|
20
|
+
@staticmethod
|
|
21
|
+
def calc_intersection(rect1: list, rect2: list): ...
|
|
22
|
+
@staticmethod
|
|
23
|
+
def is_intersection(rec1: list, rec2: list): ...
|
|
24
|
+
@staticmethod
|
|
25
|
+
def is_inner_point(rect: list, point: tuple): ...
|
|
26
|
+
@staticmethod
|
|
27
|
+
def is_include(parent: list, child: list): ...
|
|
28
|
+
@staticmethod
|
|
29
|
+
def max_area(rect_list: list): ...
|
|
30
|
+
@staticmethod
|
|
31
|
+
def merge_area(src: list, dest: list, cond: list[MERGE_COND] = ...): ...
|
libuseful/lib_path.pyc
ADDED
|
Binary file
|
libuseful/lib_path.pyi
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
from _typeshed import Incomplete
|
|
3
|
+
|
|
4
|
+
logger: Incomplete
|
|
5
|
+
|
|
6
|
+
class CPath:
|
|
7
|
+
@staticmethod
|
|
8
|
+
def join_paths(path1: str, path2: str) -> str: ...
|
|
9
|
+
@staticmethod
|
|
10
|
+
def get_rootpath(): ...
|
|
11
|
+
@staticmethod
|
|
12
|
+
def get_module_root(module, internal_path: Incomplete | None = None): ...
|
|
13
|
+
@staticmethod
|
|
14
|
+
def get_dirpath(filepath: str): ...
|
|
15
|
+
@staticmethod
|
|
16
|
+
def get_filename(filepath): ...
|
|
17
|
+
@staticmethod
|
|
18
|
+
def split_filename_ext(filepath): ...
|
|
19
|
+
@staticmethod
|
|
20
|
+
def is_abspath(path: str): ...
|
|
21
|
+
@staticmethod
|
|
22
|
+
def get_relpath(target_abs_path: str, base_path: str) -> str: ...
|
|
23
|
+
@staticmethod
|
|
24
|
+
def get_abspath(rel_path: str = None) -> str: ...
|
|
25
|
+
@staticmethod
|
|
26
|
+
def get_rear_path(full_path: str, rear_cnt: int): ...
|
|
27
|
+
@staticmethod
|
|
28
|
+
def check_exist(path: str, attribute: str): ...
|
|
29
|
+
@staticmethod
|
|
30
|
+
def classfy_files_dirs(dirpath: str): ...
|
|
31
|
+
@staticmethod
|
|
32
|
+
def make_dirs(dirpath: str): ...
|
|
33
|
+
@staticmethod
|
|
34
|
+
def send_local_to_linux(src: str, dest_dir: str, send_func): ...
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
from _typeshed import Incomplete
|
|
3
|
+
|
|
4
|
+
logger: Incomplete
|
|
5
|
+
|
|
6
|
+
def join_paths(path1: str, path2: str) -> str: ...
|
|
7
|
+
def get_dirpath(filepath: str): ...
|
|
8
|
+
def get_filename(filepath: str): ...
|
|
9
|
+
def split_filename_ext(filepath): ...
|
|
10
|
+
def get_relpath(target_abs_path: str, base_path: str) -> str: ...
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
import multiprocessing
|
|
3
|
+
import multiprocessing.synchronize
|
|
4
|
+
|
|
5
|
+
__all__ = ['CMprocessors', 'CProcessor']
|
|
6
|
+
|
|
7
|
+
class CProcessor(multiprocessing.Process):
|
|
8
|
+
@property
|
|
9
|
+
def is_continue(self) -> bool: ...
|
|
10
|
+
@is_continue.setter
|
|
11
|
+
def is_continue(self, value: bool): ...
|
|
12
|
+
def append_queue(self, qname: str): ...
|
|
13
|
+
def get_queue_list(self) -> list: ...
|
|
14
|
+
def get_queue(self, qname: str) -> multiprocessing.Queue: ...
|
|
15
|
+
def append_event(self, ename: str): ...
|
|
16
|
+
def get_event_list(self) -> list: ...
|
|
17
|
+
def get_event(self, ename: str) -> multiprocessing.synchronize.Event: ...
|
|
18
|
+
def thread_join(self) -> None: ...
|
|
19
|
+
def run(self) -> None: ...
|
|
20
|
+
def __init__(self, name: str, func, args: tuple = (), kwargs: dict = {}) -> None: ...
|
|
21
|
+
def __del__(self) -> None: ...
|
|
22
|
+
|
|
23
|
+
class CMprocessors:
|
|
24
|
+
def append_processor(self, name: str, run_func, args: tuple = (), kwargs: dict = {}, queue_names: list = None, event_names: list = None): ...
|
|
25
|
+
def start_all(self) -> None: ...
|
|
26
|
+
def remove_processor(self, tname: str): ...
|
|
27
|
+
def get_processor_list(self) -> list: ...
|
|
28
|
+
def get_processor_handler(self, tname: str) -> CProcessor: ...
|
|
29
|
+
def __init__(self) -> None: ...
|
|
30
|
+
def __del__(self) -> None: ...
|
libuseful/lib_retry.pyc
ADDED
|
Binary file
|
libuseful/lib_retry.pyi
ADDED
libuseful/lib_shell.pyc
ADDED
|
Binary file
|
libuseful/lib_shell.pyi
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from .lib_retry import *
|
|
2
|
+
from .exception import *
|
|
3
|
+
from .lib_logger import *
|
|
4
|
+
from _typeshed import Incomplete
|
|
5
|
+
|
|
6
|
+
logger: Incomplete
|
|
7
|
+
CODEC: str
|
|
8
|
+
|
|
9
|
+
class TYPE:
|
|
10
|
+
DIR: str
|
|
11
|
+
FILE: str
|
|
12
|
+
ALL_FILES: str
|
|
13
|
+
|
|
14
|
+
class TAR_TYPE:
|
|
15
|
+
GZ: str
|
|
16
|
+
TGZ: str
|
|
17
|
+
@staticmethod
|
|
18
|
+
def all(): ...
|
|
19
|
+
|
|
20
|
+
def local_shell(command: str, timeout_sec: int = 5): ...
|
|
21
|
+
def local_check_process(proc_name: str, user: str = None, kill: bool = False): ...
|
|
22
|
+
def local_execute_backend(command: str, working_dir: str = None): ...
|
|
23
|
+
def local_kill_adbd(): ...
|
|
24
|
+
def local_mkdir(dir_path: str): ...
|
|
25
|
+
def local_date() -> str: ...
|
|
26
|
+
def local_ping(ip: str, cnt: int = 5) -> str: ...
|
|
27
|
+
def local_copy(src: str, src_type: TYPE, dest: str, dest_type: TYPE = ...): ...
|
|
28
|
+
def local_remove(src: str, type: TYPE = ...): ...
|
|
29
|
+
def local_tar_compress(src: list[str], out: str, src_dir: str = None, out_type: TAR_TYPE = ..., timeout_sec: int = 5): ...
|
|
Binary file
|
libuseful/lib_thread.pyc
ADDED
|
Binary file
|
libuseful/lib_thread.pyi
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import threading
|
|
2
|
+
from queue import Queue
|
|
3
|
+
|
|
4
|
+
__all__ = ['CThread']
|
|
5
|
+
|
|
6
|
+
class CThread(threading.Thread):
|
|
7
|
+
@property
|
|
8
|
+
def is_continue(self): ...
|
|
9
|
+
@is_continue.setter
|
|
10
|
+
def is_continue(self, value: bool): ...
|
|
11
|
+
def append_queue(self, qname: str): ...
|
|
12
|
+
def get_queue_list(self) -> list: ...
|
|
13
|
+
def get_queue(self, qname: str) -> Queue: ...
|
|
14
|
+
def append_event(self, ename: str): ...
|
|
15
|
+
def get_event_list(self) -> list: ...
|
|
16
|
+
def get_event(self, ename: str) -> threading.Event: ...
|
|
17
|
+
def run(self) -> None: ...
|
|
18
|
+
def __init__(self, name: str, func, daemon: bool = False, args: tuple = (), kwargs: dict = {}) -> None: ...
|
|
19
|
+
def __del__(self) -> None: ...
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
from .lib_thread import CThread
|
|
3
|
+
|
|
4
|
+
__all__ = ['CMthreads']
|
|
5
|
+
|
|
6
|
+
class CMthreads:
|
|
7
|
+
def append_thread(self, name: str, run_func, args: tuple = (), kwargs: dict = {}, daemon: bool = False, queue_names: list = None, event_names: list = None): ...
|
|
8
|
+
def start_all(self) -> None: ...
|
|
9
|
+
def stop_all(self) -> None: ...
|
|
10
|
+
def remove_thread(self, tname: str): ...
|
|
11
|
+
def get_thread_list(self) -> list: ...
|
|
12
|
+
def get_thread_handler(self, tname: str) -> CThread: ...
|
|
13
|
+
def __init__(self) -> None: ...
|
|
14
|
+
def __del__(self) -> None: ...
|
libuseful/lib_time.pyc
ADDED
|
Binary file
|
libuseful/lib_time.pyi
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from datetime import tzinfo
|
|
2
|
+
|
|
3
|
+
def DATE(): ...
|
|
4
|
+
def TIME(): ...
|
|
5
|
+
def get_UTC(): ...
|
|
6
|
+
def get_DATE(date_format: str = '%Y-%m-%d %H:%M:%S'): ...
|
|
7
|
+
def get_ZONE() -> str: ...
|
|
8
|
+
def get_UTC_time(local_date: str, timezone: str, date_format: str = '%Y-%m-%d %H:%M:%S'): ...
|
|
9
|
+
def get_UTC_timestamp(local_date: str, timezone: str, date_format: str = '%Y-%m-%d %H:%M:%S') -> float: ...
|
|
10
|
+
def cvt_utc(utc: float, date_format: str = '%Y-%m-%d %H:%M:%S'): ...
|
|
11
|
+
def cvt_utc_DATE(utc: float, timezone: tzinfo = None, zone_utc: bool = False) -> tuple[str, str]: ...
|
|
12
|
+
def cvt_DATE(from_date: str, from_tz: str, to_tz: str, utc_gap: float = 0.0) -> tuple[str, str]: ...
|
|
13
|
+
def get_GAP(from_date: str, from_tz: str, to_date: str, to_tz: str) -> float: ...
|
|
Binary file
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from .lib_logger import *
|
|
2
|
+
from typing import Any, Callable
|
|
3
|
+
|
|
4
|
+
__all__ = ['UserManager', 'get_UTC', 'str_UTC']
|
|
5
|
+
|
|
6
|
+
def get_UTC(): ...
|
|
7
|
+
def str_UTC(utc: float): ...
|
|
8
|
+
|
|
9
|
+
class UserManager:
|
|
10
|
+
class CValue:
|
|
11
|
+
state: bool
|
|
12
|
+
unsub_func: Callable[[str], Any]
|
|
13
|
+
def __init__(self, state: bool, unsub_func: Callable[[str], Any]) -> None: ...
|
|
14
|
+
def __call__(self, state: bool, unsub_func: Callable[[str], Any]): ...
|
|
15
|
+
def __del__(self) -> None: ...
|
|
16
|
+
class State:
|
|
17
|
+
INSERTED: str
|
|
18
|
+
DUPLICATED: str
|
|
19
|
+
OVERFLOW: str
|
|
20
|
+
NOT_ALLOWED_USER: str
|
|
21
|
+
DEF_MAX_USERS: int
|
|
22
|
+
TIMESTAMP: str
|
|
23
|
+
@property
|
|
24
|
+
def uid_list(self): ...
|
|
25
|
+
def get_service_list(self, user_id: str): ...
|
|
26
|
+
def __init__(self, max_users: int = ...) -> None: ...
|
|
27
|
+
def __del__(self) -> None: ...
|
|
28
|
+
def join(self, timeout: float = 0.0): ...
|
|
29
|
+
def reg_user(self, user_id: str) -> State: ...
|
|
30
|
+
def unreg_user(self, user_id: str): ...
|
|
31
|
+
def reg_service(self, user_id: str, svc_name: str, func: Callable[[str], Any]) -> State: ...
|
|
32
|
+
def unreg_service(self, user_id: str, svc_name: str, force: bool = False): ...
|
|
33
|
+
def is_available_user(self, user_id: str): ...
|
|
34
|
+
def is_available(self, user_id: str, svc_name: str) -> bool: ...
|
|
35
|
+
def set_state(self, user_id: str, svc_name: str, stat: bool) -> bool: ...
|
|
36
|
+
def get_timestamp(self, user_id: str): ...
|
|
37
|
+
def update_timestamp(self, user_id: str): ...
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from abc import *
|
|
2
|
+
from .lib_singleton import Singleton as Singleton
|
|
3
|
+
from .lib_thread import CThread as CThread
|
|
4
|
+
|
|
5
|
+
class IWatchDog(Singleton, metaclass=ABCMeta):
|
|
6
|
+
DEF_MAX_SEC: int
|
|
7
|
+
def is_activated(self): ...
|
|
8
|
+
def start(self) -> None: ...
|
|
9
|
+
def stop(self) -> None: ...
|
|
10
|
+
def reset(self) -> None: ...
|
|
11
|
+
def __init__(self, enable: bool = True, limited_sec: int = ...) -> None: ...
|
|
12
|
+
def __del__(self) -> None: ...
|
|
13
|
+
def __clean__(self) -> None: ...
|
libuseful/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2018 The Python Packaging Authority
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: libuseful
|
|
3
|
+
Version: 0.3.4
|
|
4
|
+
Summary: It's useful library, commonly. (path/file/shell/thread/process/watchdog/async/args/logger/retry/singleton/time/cam/dynamic_import/excel/geometry_math/user_mng)
|
|
5
|
+
Author: ['Eunseok Kim']
|
|
6
|
+
Author-email: ['es.odysseus@gmail.com']
|
|
7
|
+
License: MIT License
|
|
8
|
+
Keywords: libuseful,useful,library,common-lib,util
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
10
|
+
Classifier: Topic :: Utilities
|
|
11
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Requires-Python: >=3.8.0
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: numpy>=1.19.5
|
|
19
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
20
|
+
Requires-Dist: pandas>=1.1.5
|
|
21
|
+
Requires-Dist: opencv-python>=4.8.1
|
|
22
|
+
Requires-Dist: chardet>=5.2.0
|
|
23
|
+
Requires-Dist: psutil>=6.0.0
|
|
24
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
25
|
+
Requires-Dist: retry>=0.9.2
|
|
26
|
+
|
|
27
|
+
## Developer
|
|
28
|
+
- Eunseok, Kim (email : es.odysseus@gamil.com)
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
## Latest Release
|
|
32
|
+
- version 0.3.0
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
## Prerequisites
|
|
36
|
+
> Python Version : >= 3.8
|
|
37
|
+
> Tested OS : Windows10 , Ubuntu18.04 LTS
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
libuseful-0.3.4.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
|
2
|
+
libuseful-0.3.4.dist-info/METADATA,sha256=O7Ct61wQcmaROAl6oGLiHlQFIYhVm6qSHjaE1O-YqmI,1204
|
|
3
|
+
libuseful-0.3.4.dist-info/RECORD,,
|
|
4
|
+
libuseful-0.3.4.dist-info/WHEEL,sha256=VsKH_b6o0sGuCNyo3g-a_KSnDRxYdKMWGPrpEJ85T2g,93
|
|
5
|
+
libuseful-0.3.4.dist-info/top_level.txt,sha256=8ZNekv2_c_gpn9WSYaajPAX4YknHaGRaqAmJQ6OJqw8,10
|
|
6
|
+
libuseful/__init__.pyc,sha256=M_Bn1B2hX6BcwiMh71KPFAPEubHH81d2tQxeuIfvfeU,151
|
|
7
|
+
libuseful/__init__.pyi,sha256=Y25n44pyE3vp92MiABKrcK3IWRyQ1JG1rZ4Ufqy2nC0,17
|
|
8
|
+
libuseful/exception.pyc,sha256=NRQe0s9l0qWibQY2eDRSf91hPSHva6lnymkV8nbU64o,2539
|
|
9
|
+
libuseful/exception.pyi,sha256=4GHt6yZFKZvg2KGvMhyq8cHVp3o3e3rCU_QcUVHdq54,863
|
|
10
|
+
libuseful/lib_args.pyc,sha256=Ussa2ijNSbU2ll2oXPg1hmLRBV5bSzm3ac72zkSD0hw,3153
|
|
11
|
+
libuseful/lib_args.pyi,sha256=dw2I6oil_8cIt3RUegChgZ8JRax2mc2h6g4Bvz-lGus,748
|
|
12
|
+
libuseful/lib_async_loop.pyc,sha256=nyI_x__SPqj7HGbEDwryqq7eO6nuwQUAcuh5HtLATss,9529
|
|
13
|
+
libuseful/lib_async_loop.pyi,sha256=_RF512rJO77FKwuugLa-mlhNaEZP6z24n6TKhIn6Zg0,856
|
|
14
|
+
libuseful/lib_cam_record.pyc,sha256=axvDOvkhVxQmhtu5QMSG7BKcbuBm0xM0blxQDWnBJpE,7154
|
|
15
|
+
libuseful/lib_cam_record.pyi,sha256=YuT0zBGjlh0X0Xnqf9m8EyjM4E8kHimESn4umD9I3Uw,504
|
|
16
|
+
libuseful/lib_dynamic_import.pyc,sha256=Oq1MJ4Xp8tUmxvKbpmf2MXhTHqcZCL5-cOiLu32i5k8,2281
|
|
17
|
+
libuseful/lib_dynamic_import.pyi,sha256=zvZGqvaxtiZTIyyrox_SIcjGXF7GicKXKVXadG6WuZE,295
|
|
18
|
+
libuseful/lib_enum.pyc,sha256=0Kby3HApS6FwRqVO4J_N4EOTY1kJpGGw34FIiN3-7Zc,719
|
|
19
|
+
libuseful/lib_enum.pyi,sha256=azMVcLRQaaslvmxJdJeLPE-dhJJBULrt01ldhPaRQ1k,118
|
|
20
|
+
libuseful/lib_excel.pyc,sha256=p-ALT-eZ6qXajd6uCPBsM87NgjuMBg0qvVN3ty_vCE4,26100
|
|
21
|
+
libuseful/lib_excel.pyi,sha256=OHauQj2SBdL4Ui1LxOs8LIoVUOjGLmF9bjc1HBECar8,2577
|
|
22
|
+
libuseful/lib_fatal.pyc,sha256=1pbT9-gFQi5B5feH3mS9bRcmZ6nb0NwRxkPgkHrIGjY,2603
|
|
23
|
+
libuseful/lib_fatal.pyi,sha256=93FL6Ger8HX6btxFMEawVCruYYD1-4gJwH0r7okdAC0,590
|
|
24
|
+
libuseful/lib_file.pyc,sha256=y4-PXPAtXCNB2V2Be_OjBs3GcuNaTASkp0maccuBmPA,5082
|
|
25
|
+
libuseful/lib_file.pyi,sha256=z2UJKIV3n62Ej1mMr40BEsyOV1u3t5fqn6xId2hFPIE,788
|
|
26
|
+
libuseful/lib_logger.pyc,sha256=lTtZBqs8CXdMt4cTKsIIyxHUcqu381DIvi2JmoSpZJk,8018
|
|
27
|
+
libuseful/lib_logger.pyi,sha256=uxJT5C7NLWbRW6DYflxrULFiOxtc3Fov8wb-lIe6Bwo,1457
|
|
28
|
+
libuseful/lib_math_geometry.pyc,sha256=zxT6FI07H5QSGYUx4qrK5ImI6tZj3JXaZWfCKmYb82U,9341
|
|
29
|
+
libuseful/lib_math_geometry.pyi,sha256=pl76G1WobJohDxEPeSmcymC1UrOAclHScULq-RI50BQ,918
|
|
30
|
+
libuseful/lib_path.pyc,sha256=WnNE_dq1K09Q6IorQ8G3YnTsIzrS2kO-Rka_D41_qZY,5957
|
|
31
|
+
libuseful/lib_path.pyi,sha256=N90_gdmN8yvjNckXWSkSAtL1og7P-2iNg2xmt_xg__M,1045
|
|
32
|
+
libuseful/lib_path_remote_linux.pyc,sha256=JlAo_Z06aVQ4VSDZK_mXOE6U0lx2unbmSH_25GBU3xA,1681
|
|
33
|
+
libuseful/lib_path_remote_linux.pyi,sha256=u8WWaI3BN53VTSh_zVN8anYfplR_hwqLPtkDpZURWRs,308
|
|
34
|
+
libuseful/lib_processor.pyc,sha256=OfdT2Q5KVaT8k2bdermoMWW-4-RYXG7Lfyugn0vAFs8,8101
|
|
35
|
+
libuseful/lib_processor.pyi,sha256=kzLb553puO1Kb6nfXQH3qhP4mapb2DbIdeAp0n9mm4U,1238
|
|
36
|
+
libuseful/lib_retry.pyc,sha256=W-Qqomn-iJVEupb6DqJFQHlFla_XR74VpU4--l4KcG0,5305
|
|
37
|
+
libuseful/lib_retry.pyi,sha256=5Wk_Nh3K87jjgeNpbddypjdPPygcBkpX1jD7MkWMoZ4,203
|
|
38
|
+
libuseful/lib_shell.pyc,sha256=VN0ia_lswPrCwIn4SZCm6hCr7QmBbB9CpSudRtNAl8k,9145
|
|
39
|
+
libuseful/lib_shell.pyi,sha256=zAOtfmaH-Q414ysbaRChdxTImet1697VEYlZIXvxNpc,884
|
|
40
|
+
libuseful/lib_singleton.pyc,sha256=gTzi6LAix5WMIKR3DI9W3VzD_4w735A9dxdUwGi71Qs,749
|
|
41
|
+
libuseful/lib_singleton.pyi,sha256=9NYqobLrRZy9OdJI4n2lFyK2ll_UXHtLEqez8A79dW4,106
|
|
42
|
+
libuseful/lib_thread.pyc,sha256=GzBHgkJhWQBjyOA8PEe11g15JZmwHNm1dVaL5N6K4dU,4624
|
|
43
|
+
libuseful/lib_thread.pyi,sha256=H43o3x8Ix4BLIW9B7jIHKE9JB18t6gc1tGnkUyU7lmk,671
|
|
44
|
+
libuseful/lib_threadsM.pyc,sha256=MUTTT5Jz3aHsazc6Owr86XkG_fjJs6U6lewykuFHq4A,3834
|
|
45
|
+
libuseful/lib_threadsM.pyi,sha256=YJUOFiTcOQHIQm1Pffmn91PRFiccf7R10WokJ6lwCQ0,559
|
|
46
|
+
libuseful/lib_time.pyc,sha256=idit3bmq2I2LCYmqOdBC4FCi8l9JkWFhS8SmmOcvWvM,3831
|
|
47
|
+
libuseful/lib_time.pyi,sha256=aQ12b8cOT15JOrDS_tcFsOZV4obChwnAy_sBnmYgNhw,721
|
|
48
|
+
libuseful/lib_usermng.pyc,sha256=pYhSGoiIAvUDz5kMq3G-h_eUYnXWU2GUs4aeDvA8M00,9978
|
|
49
|
+
libuseful/lib_usermng.pyi,sha256=C29U1ftLjiDUotFKcBqG7FS_rMCMGgTfVU6OJaiOq7M,1419
|
|
50
|
+
libuseful/lib_watchdog.pyc,sha256=1kg68EbpOyZZczIz8eKyVqeIJNKQ6YgoueseeYIyTfY,4801
|
|
51
|
+
libuseful/lib_watchdog.pyi,sha256=oDFmHhFBmTuwyMJhJcVTJ-Yhw-qLz9OBtyyqvnT2qTc,463
|
|
52
|
+
libuseful/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
libuseful
|