2023-09-11 03:29:48 -04:00
|
|
|
import sys
|
2024-01-23 18:46:35 -05:00
|
|
|
from typing import Any, AsyncGenerator, Generator, NewType, Tuple, Union, List, Dict, Type, IO, Optional
|
2024-01-26 01:54:13 -05:00
|
|
|
try:
|
|
|
|
from PIL.Image import Image
|
|
|
|
except ImportError:
|
|
|
|
Image = type
|
2023-09-11 03:29:48 -04:00
|
|
|
|
|
|
|
if sys.version_info >= (3, 8):
|
|
|
|
from typing import TypedDict
|
|
|
|
else:
|
|
|
|
from typing_extensions import TypedDict
|
2023-06-23 21:47:00 -04:00
|
|
|
|
2023-08-27 11:37:44 -04:00
|
|
|
SHA256 = NewType('sha_256_hash', str)
|
2023-07-28 06:07:17 -04:00
|
|
|
CreateResult = Generator[str, None, None]
|
2023-10-08 08:31:46 -04:00
|
|
|
AsyncResult = AsyncGenerator[str, None]
|
2023-10-08 07:59:56 -04:00
|
|
|
Messages = List[Dict[str, str]]
|
2024-01-26 01:54:13 -05:00
|
|
|
Cookies = List[Dict[str, str]]
|
2024-01-13 09:37:36 -05:00
|
|
|
ImageType = Union[str, bytes, IO, Image, None]
|
2023-07-28 06:07:17 -04:00
|
|
|
|
|
|
|
__all__ = [
|
2023-08-27 11:37:44 -04:00
|
|
|
'Any',
|
|
|
|
'AsyncGenerator',
|
|
|
|
'Generator',
|
|
|
|
'Tuple',
|
2024-01-20 20:20:23 -05:00
|
|
|
'Union',
|
|
|
|
'List',
|
|
|
|
'Dict',
|
|
|
|
'Type',
|
2024-01-23 18:46:35 -05:00
|
|
|
'IO',
|
|
|
|
'Optional',
|
2023-08-27 11:37:44 -04:00
|
|
|
'TypedDict',
|
2023-09-17 17:23:54 -04:00
|
|
|
'SHA256',
|
|
|
|
'CreateResult',
|
2024-01-20 20:20:23 -05:00
|
|
|
'AsyncResult',
|
|
|
|
'Messages',
|
|
|
|
'ImageType'
|
2023-09-11 03:29:48 -04:00
|
|
|
]
|