master > master: code py - refactored code mit Endpunkten

This commit is contained in:
RD
2022-06-11 14:00:45 +02:00
parent d8f6c802b2
commit 301a9c87be
19 changed files with 593 additions and 97 deletions

18
code/python/src/thirdparty/log.py vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# IMPORTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import logging;
from logging import LogRecord;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# EXPORTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__all__ = [
'logging',
'LogRecord',
];

View File

@@ -5,6 +5,9 @@
# IMPORTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from datetime import datetime;
from datetime import timedelta;
import lorem;
import re;
from textwrap import dedent;
@@ -13,6 +16,9 @@ from textwrap import dedent;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__all__ = [
'lorem',
'datetime',
'timedelta',
're',
'dedent',
];

41
code/python/src/thirdparty/run.py vendored Normal file
View File

@@ -0,0 +1,41 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# IMPORTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import aiohttp;
from asyncio import Future;
from asyncio import gather as asyncio_gather;
from asyncio import get_event_loop as asyncio_get_event_loop;
from asyncio import new_event_loop as asyncio_new_event_loop;
from asyncio import set_event_loop as asyncio_set_event_loop;
from asyncio import ensure_future as asyncio_ensure_future;
from asyncio import sleep as asyncio_sleep;
from asyncio import AbstractEventLoop;
from codetiming import Timer;
from signal import Signals;
from signal import SIGINT;
from signal import SIGTERM;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# EXPORTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__all__ = [
'aiohttp',
'Future',
'asyncio_gather',
'asyncio_ensure_future',
'asyncio_get_event_loop',
'asyncio_new_event_loop',
'asyncio_set_event_loop',
'asyncio_sleep',
'AbstractEventLoop',
'Timer',
'Signals',
'SIGINT',
'SIGTERM',
];

View File

@@ -16,6 +16,7 @@ from typing import Generator;
from typing import Generic;
from typing import List;
from typing import Optional;
from typing import ParamSpec;
from typing import Tuple;
from typing import Type;
from typing import TypeVar;
@@ -38,6 +39,7 @@ __all__ = [
'Generic',
'List',
'Optional',
'ParamSpec',
'Tuple',
'Type',
'TypeVar',