convert-stream 2.3__tar.gz → 2.3.1__tar.gz

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.
Files changed (32) hide show
  1. {convert_stream-2.3 → convert_stream-2.3.1}/PKG-INFO +1 -1
  2. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/enum_libs/modules.py +30 -19
  3. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream.egg-info/PKG-INFO +1 -1
  4. {convert_stream-2.3 → convert_stream-2.3.1}/pyproject.toml +1 -1
  5. {convert_stream-2.3 → convert_stream-2.3.1}/README.md +0 -0
  6. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/__init__.py +0 -0
  7. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/__main__.py +0 -0
  8. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/_version.py +0 -0
  9. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/doc_stream.py +0 -0
  10. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/enum_libs/__init__.py +0 -0
  11. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/enum_libs/enums.py +0 -0
  12. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/image/__init__.py +0 -0
  13. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/image/img_object.py +0 -0
  14. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/pdf/__init__.py +0 -0
  15. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/pdf/image_to_pdf.py +0 -0
  16. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/pdf/pdf_document.py +0 -0
  17. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/pdf/pdf_page.py +0 -0
  18. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/pdf/pdf_to_image.py +0 -0
  19. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/sheets/__init__.py +0 -0
  20. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/sheets/load.py +0 -0
  21. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/sheets/parse.py +0 -0
  22. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/sheets/save.py +0 -0
  23. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/table_files.py +0 -0
  24. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/text/__init__.py +0 -0
  25. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/text/date.py +0 -0
  26. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/text/string.py +0 -0
  27. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream/text/terminal.py +0 -0
  28. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream.egg-info/SOURCES.txt +0 -0
  29. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream.egg-info/dependency_links.txt +0 -0
  30. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream.egg-info/requires.txt +0 -0
  31. {convert_stream-2.3 → convert_stream-2.3.1}/convert_stream.egg-info/top_level.txt +0 -0
  32. {convert_stream-2.3 → convert_stream-2.3.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: convert_stream
3
- Version: 2.3
3
+ Version: 2.3.1
4
4
  Summary: Manipulação de documentos PDF e Imagens. Converter, Ler, rotacionar exportar etc.
5
5
  Author: Bruno Chaves
6
6
  Requires-Python: >=3.11
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  from __future__ import annotations
4
- from typing import Union, TypeAlias, Any
4
+ from typing import Union, TypeAlias #, Any
5
5
  from convert_stream.enum_libs.enums import *
6
6
 
7
7
  MOD_IMG_PIL: bool = False
@@ -10,6 +10,17 @@ MOD_PYPDF: bool = False
10
10
  MOD_FITZ: bool = False
11
11
  MOD_CANVAS: bool = False
12
12
 
13
+
14
+ class FakeType(object):
15
+ Image = object
16
+ MatLike = object
17
+ TextPage = object
18
+ Page = object
19
+
20
+ def __init__(self):
21
+ pass
22
+
23
+
13
24
  #=================================================================#
14
25
  # Módulos de Imagen, PIL e opencv
15
26
  #=================================================================#
@@ -18,16 +29,16 @@ try:
18
29
  from cv2.typing import MatLike
19
30
  MOD_IMG_OPENCV = True
20
31
  except ImportError:
21
- cv2.typing.MatLike = Any
22
- MatLike = Any
32
+ #cv2.typing.MatLike = FakeType
33
+ MatLike = FakeType
23
34
 
24
35
  try:
25
36
  from PIL import Image
26
37
  from PIL import ImageOps, ImageFilter
27
38
  MOD_IMG_PIL = True
28
39
  except ImportError:
29
- Image = Any
30
- Image.Image = Any
40
+ Image = FakeType
41
+ Image.Image = FakeType
31
42
 
32
43
  if MOD_IMG_OPENCV and MOD_IMG_PIL:
33
44
  ModuleImage: TypeAlias = Union[MatLike, Image.Image]
@@ -40,7 +51,7 @@ elif MOD_IMG_PIL:
40
51
  DEFAULT_LIB_IMAGE = LibImage.PIL
41
52
  else:
42
53
  DEFAULT_LIB_IMAGE = LibImage.NOT_IMPLEMENTED
43
- ModuleImage = Any # fallback para runtime
54
+ ModuleImage = FakeType # fallback para runtime
44
55
 
45
56
  #=================================================================#
46
57
  # Módulos para PDF fitz e pypdf
@@ -54,17 +65,17 @@ except ImportError:
54
65
  import pymupdf as fitz
55
66
  MOD_FITZ = True
56
67
  except ImportError:
57
- fitz = Any
58
- fitz.Page = Any
59
- fitz.TextPage = Any
68
+ fitz = FakeType
69
+ fitz.Page = FakeType
70
+ fitz.TextPage = FakeType
60
71
 
61
72
  try:
62
73
  from pypdf import PdfWriter, PdfReader, PageObject
63
74
  MOD_PYPDF = True
64
75
  except ImportError:
65
- PageObject = Any
66
- PdfReader = Any
67
- PdfWriter = Any
76
+ PageObject = FakeType
77
+ PdfReader = FakeType
78
+ PdfWriter = FakeType
68
79
 
69
80
 
70
81
  if MOD_FITZ and MOD_PYPDF:
@@ -80,8 +91,8 @@ elif MOD_PYPDF:
80
91
  ModDocPdf = Union[PdfWriter]
81
92
  DEFAULT_LIB_PDF = LibPDF.PYPDF
82
93
  else:
83
- ModPagePdf = Any # fallback para runtime
84
- ModDocPdf = Any
94
+ ModPagePdf = FakeType # fallback para runtime
95
+ ModDocPdf = FakeType
85
96
  DEFAULT_LIB_PDF = LibPDF.NOT_IMPLEMENTED
86
97
 
87
98
  #=================================================================#
@@ -95,10 +106,10 @@ try:
95
106
  from reportlab.lib.utils import ImageReader
96
107
  MOD_CANVAS = True
97
108
  except ImportError:
98
- canvas = Any
99
- Canvas = Any
109
+ canvas = FakeType
110
+ Canvas = FakeType
100
111
  letter = (612, 792)
101
- ImageReader = Any
112
+ ImageReader = FakeType
102
113
 
103
114
  if MOD_CANVAS and MOD_FITZ and MOD_IMG_PIL:
104
115
  ModImageToPdf: TypeAlias = Union[canvas, fitz.Page, Image]
@@ -113,7 +124,7 @@ elif MOD_IMG_PIL:
113
124
  ModImageToPdf: TypeAlias = Union[Image]
114
125
  DEFAULT_LIB_IMAGE_TO_PDF = LibImageToPdf.IMAGE_TO_PDF_PIL
115
126
  else:
116
- ModImageToPdf = Any
127
+ ModImageToPdf = FakeType
117
128
  DEFAULT_LIB_IMAGE_TO_PDF = LibImageToPdf.NOT_IMPLEMENTED
118
129
 
119
130
  #=================================================================#
@@ -125,4 +136,4 @@ if MOD_FITZ:
125
136
  ModPdfToImage: TypeAlias = Union[fitz]
126
137
  else:
127
138
  DEFAULT_LIB_PDF_TO_IMG = LibPdfToImage.NOT_IMPLEMENTED
128
- ModPdfToImage = Any
139
+ ModPdfToImage = FakeType
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: convert_stream
3
- Version: 2.3
3
+ Version: 2.3.1
4
4
  Summary: Manipulação de documentos PDF e Imagens. Converter, Ler, rotacionar exportar etc.
5
5
  Author: Bruno Chaves
6
6
  Requires-Python: >=3.11
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "convert_stream"
7
- version = "2.3"
7
+ version = "2.3.1"
8
8
  authors = [
9
9
  { name="Bruno Chaves"},
10
10
  ]
File without changes
File without changes