iker-python-common 1.0.50__tar.gz → 1.0.51__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 (83) hide show
  1. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/PKG-INFO +1 -1
  2. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/dbutils.py +33 -0
  3. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker_python_common.egg-info/PKG-INFO +1 -1
  4. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/dbutils_test.py +14 -4
  5. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/.editorconfig +0 -0
  6. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/.github/workflows/pr.yml +0 -0
  7. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/.github/workflows/push.yml +0 -0
  8. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/.gitignore +0 -0
  9. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/MANIFEST.in +0 -0
  10. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/README.md +0 -0
  11. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/VERSION +0 -0
  12. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/pyproject.toml +0 -0
  13. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/config/config.cfg +0 -0
  14. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/csv/data.csv +0 -0
  15. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/csv/data.tsv +0 -0
  16. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.baz/file.bar.baz +0 -0
  17. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.baz/file.foo.bar +0 -0
  18. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.baz/file.foo.baz +0 -0
  19. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
  20. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
  21. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
  22. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
  23. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.foo/file.bar +0 -0
  24. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.foo/file.baz +0 -0
  25. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/s3utils/dir.foo/file.foo +0 -0
  26. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.baz/file.bar.baz +0 -0
  27. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.baz/file.foo.bar +0 -0
  28. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.baz/file.foo.baz +0 -0
  29. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
  30. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
  31. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
  32. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
  33. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.foo/file.bar +0 -0
  34. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.foo/file.baz +0 -0
  35. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/resources/unittest/shutils/dir.foo/file.foo +0 -0
  36. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/setup.cfg +0 -0
  37. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/setup.py +0 -0
  38. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/__init__.py +0 -0
  39. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/__init__.py +0 -0
  40. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/argutils.py +0 -0
  41. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/config.py +0 -0
  42. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/csv.py +0 -0
  43. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/dockerutils.py +0 -0
  44. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/dtutils.py +0 -0
  45. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/funcutils.py +0 -0
  46. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/jsonutils.py +0 -0
  47. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/logger.py +0 -0
  48. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/numutils.py +0 -0
  49. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/randutils.py +0 -0
  50. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/retry.py +0 -0
  51. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/s3utils.py +0 -0
  52. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/sequtils.py +0 -0
  53. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/shutils.py +0 -0
  54. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/span.py +0 -0
  55. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/strutils.py +0 -0
  56. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/testutils.py +0 -0
  57. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker/common/utils/typeutils.py +0 -0
  58. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker_python_common.egg-info/SOURCES.txt +0 -0
  59. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker_python_common.egg-info/dependency_links.txt +0 -0
  60. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker_python_common.egg-info/not-zip-safe +0 -0
  61. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker_python_common.egg-info/requires.txt +0 -0
  62. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/src/iker_python_common.egg-info/top_level.txt +0 -0
  63. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_test.py +0 -0
  64. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/__init__.py +0 -0
  65. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/argutils_test.py +0 -0
  66. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/config_test.py +0 -0
  67. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/csv_test.py +0 -0
  68. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/dockerutils_test.py +0 -0
  69. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/dtutils_test.py +0 -0
  70. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/funcutils_test.py +0 -0
  71. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/jsonutils_test.py +0 -0
  72. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/logger_test.py +0 -0
  73. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/numutils_test.py +0 -0
  74. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/randutils_test.py +0 -0
  75. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/retry_test.py +0 -0
  76. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/s3utils_test.py +0 -0
  77. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/sequtils_test.py +0 -0
  78. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/shutils_test.py +0 -0
  79. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/span_test.py +0 -0
  80. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/strutils_test.py +0 -0
  81. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/testutils_test.py +0 -0
  82. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/common/utils/typeutils_test.py +0 -0
  83. {iker_python_common-1.0.50 → iker_python_common-1.0.51}/test/iker_tests/docker_fixtures.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iker-python-common
3
- Version: 1.0.50
3
+ Version: 1.0.51
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.11
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -65,6 +65,39 @@ class ConnectionMaker(object):
65
65
  self.engine_opts = engine_opts or {}
66
66
  self.session_opts = session_opts or {}
67
67
 
68
+ @staticmethod
69
+ def create(
70
+ driver: str | None = None,
71
+ host: str | None = None,
72
+ port: int | None = None,
73
+ username: str | None = None,
74
+ password: str | None = None,
75
+ database: str | None = None,
76
+ *,
77
+ engine_opts: dict[str, JsonType] | None = None,
78
+ session_opts: dict[str, JsonType] | None = None,
79
+ ):
80
+ """
81
+ Creates a new instance of ``ConnectionMaker`` using the provided parameters to construct a SQLAlchemy URL.
82
+
83
+ :param driver: Optional database driver.
84
+ :param host: The database host (e.g., 'localhost').
85
+ :param port: The database port.
86
+ :param username: The database username.
87
+ :param password: The database password.
88
+ :param database: The name of the database to connect to.
89
+ :param engine_opts: Optional dictionary of SQLAlchemy engine options.
90
+ :param session_opts: Optional dictionary of SQLAlchemy session options.
91
+ """
92
+ return ConnectionMaker(sqlalchemy.URL.create(drivername=driver,
93
+ host=host,
94
+ port=port,
95
+ username=username,
96
+ password=password,
97
+ database=database),
98
+ engine_opts=engine_opts,
99
+ session_opts=session_opts)
100
+
68
101
  @staticmethod
69
102
  def from_url(
70
103
  url: str | sqlalchemy.URL,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iker-python-common
3
- Version: 1.0.50
3
+ Version: 1.0.51
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.11
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -225,8 +225,13 @@ def test_mysql_connection_maker__sql_text(fixture_mysql_test_proc, fixture_mysql
225
225
  user = fixture_mysql_test_proc.user
226
226
  database = "test"
227
227
 
228
- maker = ConnectionMaker.from_url(f"{scheme}://{user}@{host}:{port}/{database}",
229
- session_opts=dict(expire_on_commit=False))
228
+ maker = ConnectionMaker.create(scheme,
229
+ host,
230
+ port,
231
+ user,
232
+ None,
233
+ database,
234
+ session_opts=dict(expire_on_commit=False))
230
235
 
231
236
  maker.create_model(MysqlBaseModel)
232
237
 
@@ -655,8 +660,13 @@ def test_postgresql_connection_maker__sql_text(fixture_postgresql_test_proc, fix
655
660
  user = fixture_postgresql_test.info.user
656
661
  database = fixture_postgresql_test.info.dbname
657
662
 
658
- maker = ConnectionMaker.from_url(f"{scheme}://{user}@{host}:{port}/{database}",
659
- session_opts=dict(expire_on_commit=False))
663
+ maker = ConnectionMaker.create(scheme,
664
+ host,
665
+ port,
666
+ user,
667
+ None,
668
+ database,
669
+ session_opts=dict(expire_on_commit=False))
660
670
 
661
671
  maker.create_model(PostgresqlBaseModel)
662
672