rdxz2-utill 0.0.5__tar.gz → 0.0.7__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.

Potentially problematic release.


This version of rdxz2-utill might be problematic. Click here for more details.

Files changed (41) hide show
  1. {rdxz2_utill-0.0.5/src/rdxz2_utill.egg-info → rdxz2_utill-0.0.7}/PKG-INFO +15 -15
  2. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/pyproject.toml +15 -15
  3. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7/src/rdxz2_utill.egg-info}/PKG-INFO +15 -15
  4. rdxz2_utill-0.0.7/src/rdxz2_utill.egg-info/requires.txt +19 -0
  5. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_compare.py +3 -3
  6. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_pg.py +2 -2
  7. rdxz2_utill-0.0.5/src/rdxz2_utill.egg-info/requires.txt +0 -19
  8. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/LICENSE +0 -0
  9. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/README.md +0 -0
  10. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/setup.cfg +0 -0
  11. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/rdxz2_utill.egg-info/SOURCES.txt +0 -0
  12. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/rdxz2_utill.egg-info/dependency_links.txt +0 -0
  13. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/rdxz2_utill.egg-info/entry_points.txt +0 -0
  14. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/rdxz2_utill.egg-info/top_level.txt +0 -0
  15. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/__init__.py +0 -0
  16. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/cmd/__init__.py +0 -0
  17. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/cmd/_bq.py +0 -0
  18. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/cmd/_conf.py +0 -0
  19. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/cmd/_enc.py +0 -0
  20. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/cmd/_main.py +0 -0
  21. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/cmd/_pg.py +0 -0
  22. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/cmd/utill.py +0 -0
  23. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_bq.py +0 -0
  24. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_const.py +0 -0
  25. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_csv.py +0 -0
  26. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_datetime.py +0 -0
  27. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_dict.py +0 -0
  28. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_encryption.py +0 -0
  29. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_env.py +0 -0
  30. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_file.py +0 -0
  31. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_gcs.py +0 -0
  32. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_input.py +0 -0
  33. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_json.py +0 -0
  34. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_mb.py +0 -0
  35. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_queue.py +0 -0
  36. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_string.py +0 -0
  37. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_style.py +0 -0
  38. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_tunnel.py +0 -0
  39. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/my_xlsx.py +0 -0
  40. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/templates/mb.json +0 -0
  41. {rdxz2_utill-0.0.5 → rdxz2_utill-0.0.7}/src/utill/templates/pg.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdxz2-utill
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: Your daily Python utility
5
5
  Author-email: Richard Dharmawan <richard.dharmawan@gmail.com>
6
6
  License: MIT License
@@ -25,29 +25,29 @@ License: MIT License
25
25
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
26
  SOFTWARE.
27
27
  Classifier: Programming Language :: Python :: 3
28
- Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.10
29
29
  Classifier: Programming Language :: Python :: 3 :: Only
30
30
  Classifier: License :: OSI Approved :: MIT License
31
31
  Classifier: Operating System :: OS Independent
32
- Requires-Python: >=3.12
32
+ Requires-Python: >=3.10
33
33
  Description-Content-Type: text/markdown
34
34
  License-File: LICENSE
35
- Requires-Dist: click==8.1.8
36
- Requires-Dist: duckdb==1.1.3
37
- Requires-Dist: humanize==4.11.0
38
- Requires-Dist: loguru==0.7.3
39
- Requires-Dist: paramiko==3.5.0
40
- Requires-Dist: pydantic-settings==2.7.1
41
- Requires-Dist: pydantic==2.10.6
42
- Requires-Dist: requests==2.32.3
35
+ Requires-Dist: click
36
+ Requires-Dist: duckdb
37
+ Requires-Dist: humanize
38
+ Requires-Dist: loguru
39
+ Requires-Dist: paramiko
40
+ Requires-Dist: pydantic-settings
41
+ Requires-Dist: pydantic
42
+ Requires-Dist: requests
43
43
  Requires-Dist: sshtunnel==0.4.0
44
44
  Provides-Extra: google-cloud
45
- Requires-Dist: google-cloud-bigquery==3.29.0; extra == "google-cloud"
46
- Requires-Dist: google-cloud-storage==3.0.0; extra == "google-cloud"
45
+ Requires-Dist: google-cloud-bigquery; extra == "google-cloud"
46
+ Requires-Dist: google-cloud-storage; extra == "google-cloud"
47
47
  Provides-Extra: postgresql
48
- Requires-Dist: psycopg==3.2.2; extra == "postgresql"
48
+ Requires-Dist: psycopg; extra == "postgresql"
49
49
  Provides-Extra: pdf
50
- Requires-Dist: PyPDF2==3.0.1; extra == "pdf"
50
+ Requires-Dist: PyPDF2; extra == "pdf"
51
51
  Dynamic: license-file
52
52
 
53
53
  # Using this library
@@ -4,30 +4,30 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rdxz2-utill"
7
- version = "0.0.5"
7
+ version = "0.0.7"
8
8
  authors = [
9
9
  { name="Richard Dharmawan", email="richard.dharmawan@gmail.com" },
10
10
  ]
11
11
  description = "Your daily Python utility"
12
12
  readme = "README.md"
13
- requires-python = ">=3.12"
13
+ requires-python = ">=3.10"
14
14
  license = { file = "LICENSE" }
15
15
  classifiers = [
16
16
  "Programming Language :: Python :: 3",
17
- "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.10",
18
18
  "Programming Language :: Python :: 3 :: Only",
19
19
  "License :: OSI Approved :: MIT License",
20
20
  "Operating System :: OS Independent",
21
21
  ]
22
22
  dependencies = [
23
- "click==8.1.8",
24
- "duckdb==1.1.3",
25
- "humanize==4.11.0",
26
- "loguru==0.7.3",
27
- "paramiko==3.5.0",
28
- "pydantic-settings==2.7.1",
29
- "pydantic==2.10.6",
30
- "requests==2.32.3",
23
+ "click",
24
+ "duckdb",
25
+ "humanize",
26
+ "loguru",
27
+ "paramiko",
28
+ "pydantic-settings",
29
+ "pydantic",
30
+ "requests",
31
31
  "sshtunnel==0.4.0",
32
32
  ]
33
33
 
@@ -36,14 +36,14 @@ utill = "utill.cmd.utill:main"
36
36
 
37
37
  [project.optional-dependencies]
38
38
  google-cloud = [
39
- "google-cloud-bigquery==3.29.0",
40
- "google-cloud-storage==3.0.0",
39
+ "google-cloud-bigquery",
40
+ "google-cloud-storage",
41
41
  ]
42
42
  postgresql = [
43
- "psycopg==3.2.2",
43
+ "psycopg",
44
44
  ]
45
45
  pdf = [
46
- "PyPDF2==3.0.1",
46
+ "PyPDF2",
47
47
  ]
48
48
 
49
49
  [tool.setuptools.packages.find]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdxz2-utill
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: Your daily Python utility
5
5
  Author-email: Richard Dharmawan <richard.dharmawan@gmail.com>
6
6
  License: MIT License
@@ -25,29 +25,29 @@ License: MIT License
25
25
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
26
  SOFTWARE.
27
27
  Classifier: Programming Language :: Python :: 3
28
- Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.10
29
29
  Classifier: Programming Language :: Python :: 3 :: Only
30
30
  Classifier: License :: OSI Approved :: MIT License
31
31
  Classifier: Operating System :: OS Independent
32
- Requires-Python: >=3.12
32
+ Requires-Python: >=3.10
33
33
  Description-Content-Type: text/markdown
34
34
  License-File: LICENSE
35
- Requires-Dist: click==8.1.8
36
- Requires-Dist: duckdb==1.1.3
37
- Requires-Dist: humanize==4.11.0
38
- Requires-Dist: loguru==0.7.3
39
- Requires-Dist: paramiko==3.5.0
40
- Requires-Dist: pydantic-settings==2.7.1
41
- Requires-Dist: pydantic==2.10.6
42
- Requires-Dist: requests==2.32.3
35
+ Requires-Dist: click
36
+ Requires-Dist: duckdb
37
+ Requires-Dist: humanize
38
+ Requires-Dist: loguru
39
+ Requires-Dist: paramiko
40
+ Requires-Dist: pydantic-settings
41
+ Requires-Dist: pydantic
42
+ Requires-Dist: requests
43
43
  Requires-Dist: sshtunnel==0.4.0
44
44
  Provides-Extra: google-cloud
45
- Requires-Dist: google-cloud-bigquery==3.29.0; extra == "google-cloud"
46
- Requires-Dist: google-cloud-storage==3.0.0; extra == "google-cloud"
45
+ Requires-Dist: google-cloud-bigquery; extra == "google-cloud"
46
+ Requires-Dist: google-cloud-storage; extra == "google-cloud"
47
47
  Provides-Extra: postgresql
48
- Requires-Dist: psycopg==3.2.2; extra == "postgresql"
48
+ Requires-Dist: psycopg; extra == "postgresql"
49
49
  Provides-Extra: pdf
50
- Requires-Dist: PyPDF2==3.0.1; extra == "pdf"
50
+ Requires-Dist: PyPDF2; extra == "pdf"
51
51
  Dynamic: license-file
52
52
 
53
53
  # Using this library
@@ -0,0 +1,19 @@
1
+ click
2
+ duckdb
3
+ humanize
4
+ loguru
5
+ paramiko
6
+ pydantic-settings
7
+ pydantic
8
+ requests
9
+ sshtunnel==0.4.0
10
+
11
+ [google-cloud]
12
+ google-cloud-bigquery
13
+ google-cloud-storage
14
+
15
+ [pdf]
16
+ PyPDF2
17
+
18
+ [postgresql]
19
+ psycopg
@@ -24,10 +24,10 @@ def same(a, b, float_precision=None) -> tuple[bool, float]:
24
24
  return True, None
25
25
 
26
26
  if float_precision:
27
- a_float_rounded = round(a_float, float_precision)
28
- b_float_rounded = round(b_float, float_precision)
27
+ a_float = round(a_float, float_precision)
28
+ b_float = round(b_float, float_precision)
29
29
 
30
- return a_float_rounded == b_float_rounded, abs(a_float - b_float)
30
+ return a_float == b_float, abs(a_float - b_float)
31
31
  except (ValueError, TypeError):
32
32
  raise Exception(f'Can\'t compare {a} to {b}')
33
33
 
@@ -74,7 +74,7 @@ class PG:
74
74
 
75
75
  self.conn.autocommit = autocommit
76
76
 
77
- def execute_query(self, query: str, *params):
77
+ def execute_query(self, query: str, params: tuple):
78
78
  # Make sure connection alive
79
79
  if self.conn.closed:
80
80
  self.establish_connection(self.conn.autocommit, self.row_factory)
@@ -100,7 +100,7 @@ class PG:
100
100
  f.write(data)
101
101
 
102
102
  def pg_to_pg(self, pg: "PG", src_table_name: str, dst_table_name: str, cols: list[str] = None) -> None:
103
- tmp_filename = generate_random_string() + '.csv'
103
+ tmp_filename = generate_random_string(alphanum=True) + '.csv'
104
104
  cols_str = ','.join([f'"{x}"' for x in cols]) if (cols is not None and cols != []) else '*'
105
105
  try:
106
106
  self.download_csv(f'SELECT {cols_str} FROM {src_table_name}', tmp_filename)
@@ -1,19 +0,0 @@
1
- click==8.1.8
2
- duckdb==1.1.3
3
- humanize==4.11.0
4
- loguru==0.7.3
5
- paramiko==3.5.0
6
- pydantic-settings==2.7.1
7
- pydantic==2.10.6
8
- requests==2.32.3
9
- sshtunnel==0.4.0
10
-
11
- [google-cloud]
12
- google-cloud-bigquery==3.29.0
13
- google-cloud-storage==3.0.0
14
-
15
- [pdf]
16
- PyPDF2==3.0.1
17
-
18
- [postgresql]
19
- psycopg==3.2.2
File without changes
File without changes
File without changes