Create typing.py
Browse files
typing.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# app/typing.py
|
2 |
+
|
3 |
+
from typing import Any, AsyncGenerator, Generator, AsyncIterator, Iterator, NewType, Tuple, Union, List, Dict, Type, IO, Optional
|
4 |
+
from PIL import Image
|
5 |
+
|
6 |
+
SHA256 = NewType('sha_256_hash', str)
|
7 |
+
CreateResult = Iterator[str]
|
8 |
+
AsyncResult = AsyncIterator[str]
|
9 |
+
Messages = List[Dict[str, Union[str, List[Dict[str, Union[str, Dict[str, str]]]]]]]
|
10 |
+
Cookies = Dict[str, str]
|
11 |
+
ImageType = Union[str, bytes, IO, Image.Image, None]
|