data-syncmaster 0.1.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 (110) hide show
  1. data_syncmaster-0.1.1/LICENSE.txt +203 -0
  2. data_syncmaster-0.1.1/PKG-INFO +115 -0
  3. data_syncmaster-0.1.1/README.rst +66 -0
  4. data_syncmaster-0.1.1/pyproject.toml +277 -0
  5. data_syncmaster-0.1.1/syncmaster/__init__.py +6 -0
  6. data_syncmaster-0.1.1/syncmaster/backend/__init__.py +2 -0
  7. data_syncmaster-0.1.1/syncmaster/backend/api/__init__.py +2 -0
  8. data_syncmaster-0.1.1/syncmaster/backend/api/deps.py +20 -0
  9. data_syncmaster-0.1.1/syncmaster/backend/api/monitoring.py +10 -0
  10. data_syncmaster-0.1.1/syncmaster/backend/api/router.py +10 -0
  11. data_syncmaster-0.1.1/syncmaster/backend/api/v1/__init__.py +2 -0
  12. data_syncmaster-0.1.1/syncmaster/backend/api/v1/auth/__init__.py +2 -0
  13. data_syncmaster-0.1.1/syncmaster/backend/api/v1/auth/router.py +32 -0
  14. data_syncmaster-0.1.1/syncmaster/backend/api/v1/auth/utils.py +26 -0
  15. data_syncmaster-0.1.1/syncmaster/backend/api/v1/connections.py +300 -0
  16. data_syncmaster-0.1.1/syncmaster/backend/api/v1/groups.py +225 -0
  17. data_syncmaster-0.1.1/syncmaster/backend/api/v1/queue.py +148 -0
  18. data_syncmaster-0.1.1/syncmaster/backend/api/v1/router.py +18 -0
  19. data_syncmaster-0.1.1/syncmaster/backend/api/v1/transfers/__init__.py +2 -0
  20. data_syncmaster-0.1.1/syncmaster/backend/api/v1/transfers/router.py +469 -0
  21. data_syncmaster-0.1.1/syncmaster/backend/api/v1/transfers/utils.py +17 -0
  22. data_syncmaster-0.1.1/syncmaster/backend/api/v1/users.py +75 -0
  23. data_syncmaster-0.1.1/syncmaster/backend/export_openapi_schema.py +26 -0
  24. data_syncmaster-0.1.1/syncmaster/backend/handler.py +203 -0
  25. data_syncmaster-0.1.1/syncmaster/backend/logger.py +2 -0
  26. data_syncmaster-0.1.1/syncmaster/backend/main.py +63 -0
  27. data_syncmaster-0.1.1/syncmaster/backend/pre_start.py +94 -0
  28. data_syncmaster-0.1.1/syncmaster/backend/services/__init__.py +4 -0
  29. data_syncmaster-0.1.1/syncmaster/backend/services/auth.py +58 -0
  30. data_syncmaster-0.1.1/syncmaster/backend/services/unit_of_work.py +44 -0
  31. data_syncmaster-0.1.1/syncmaster/config.py +110 -0
  32. data_syncmaster-0.1.1/syncmaster/db/__init__.py +2 -0
  33. data_syncmaster-0.1.1/syncmaster/db/alembic.ini +41 -0
  34. data_syncmaster-0.1.1/syncmaster/db/base.py +28 -0
  35. data_syncmaster-0.1.1/syncmaster/db/factory.py +37 -0
  36. data_syncmaster-0.1.1/syncmaster/db/migrations/README +1 -0
  37. data_syncmaster-0.1.1/syncmaster/db/migrations/__init__.py +2 -0
  38. data_syncmaster-0.1.1/syncmaster/db/migrations/env.py +87 -0
  39. data_syncmaster-0.1.1/syncmaster/db/migrations/script.py.mako +24 -0
  40. data_syncmaster-0.1.1/syncmaster/db/migrations/versions/2023-11-23_478240cdad4b_init.py +242 -0
  41. data_syncmaster-0.1.1/syncmaster/db/migrations/versions/__init__.py +2 -0
  42. data_syncmaster-0.1.1/syncmaster/db/mixins.py +33 -0
  43. data_syncmaster-0.1.1/syncmaster/db/models.py +194 -0
  44. data_syncmaster-0.1.1/syncmaster/db/repositories/__init__.py +22 -0
  45. data_syncmaster-0.1.1/syncmaster/db/repositories/base.py +109 -0
  46. data_syncmaster-0.1.1/syncmaster/db/repositories/connection.py +138 -0
  47. data_syncmaster-0.1.1/syncmaster/db/repositories/credentials_repository.py +87 -0
  48. data_syncmaster-0.1.1/syncmaster/db/repositories/group.py +264 -0
  49. data_syncmaster-0.1.1/syncmaster/db/repositories/queue.py +195 -0
  50. data_syncmaster-0.1.1/syncmaster/db/repositories/repository_with_owner.py +115 -0
  51. data_syncmaster-0.1.1/syncmaster/db/repositories/run.py +78 -0
  52. data_syncmaster-0.1.1/syncmaster/db/repositories/transfer.py +202 -0
  53. data_syncmaster-0.1.1/syncmaster/db/repositories/user.py +72 -0
  54. data_syncmaster-0.1.1/syncmaster/db/repositories/utils.py +25 -0
  55. data_syncmaster-0.1.1/syncmaster/db/utils.py +31 -0
  56. data_syncmaster-0.1.1/syncmaster/dto/__init__.py +2 -0
  57. data_syncmaster-0.1.1/syncmaster/dto/connections.py +60 -0
  58. data_syncmaster-0.1.1/syncmaster/dto/transfers.py +46 -0
  59. data_syncmaster-0.1.1/syncmaster/exceptions/__init__.py +13 -0
  60. data_syncmaster-0.1.1/syncmaster/exceptions/base.py +12 -0
  61. data_syncmaster-0.1.1/syncmaster/exceptions/connection.py +28 -0
  62. data_syncmaster-0.1.1/syncmaster/exceptions/credentials.py +8 -0
  63. data_syncmaster-0.1.1/syncmaster/exceptions/group.py +27 -0
  64. data_syncmaster-0.1.1/syncmaster/exceptions/queue.py +16 -0
  65. data_syncmaster-0.1.1/syncmaster/exceptions/run.py +19 -0
  66. data_syncmaster-0.1.1/syncmaster/exceptions/transfer.py +39 -0
  67. data_syncmaster-0.1.1/syncmaster/exceptions/user.py +11 -0
  68. data_syncmaster-0.1.1/syncmaster/schemas/__init__.py +2 -0
  69. data_syncmaster-0.1.1/syncmaster/schemas/v1/__init__.py +54 -0
  70. data_syncmaster-0.1.1/syncmaster/schemas/v1/auth.py +12 -0
  71. data_syncmaster-0.1.1/syncmaster/schemas/v1/connection_types.py +9 -0
  72. data_syncmaster-0.1.1/syncmaster/schemas/v1/connections/__init__.py +2 -0
  73. data_syncmaster-0.1.1/syncmaster/schemas/v1/connections/connection.py +146 -0
  74. data_syncmaster-0.1.1/syncmaster/schemas/v1/connections/hdfs.py +40 -0
  75. data_syncmaster-0.1.1/syncmaster/schemas/v1/connections/hive.py +40 -0
  76. data_syncmaster-0.1.1/syncmaster/schemas/v1/connections/oracle.py +58 -0
  77. data_syncmaster-0.1.1/syncmaster/schemas/v1/connections/postgres.py +48 -0
  78. data_syncmaster-0.1.1/syncmaster/schemas/v1/connections/s3.py +66 -0
  79. data_syncmaster-0.1.1/syncmaster/schemas/v1/file_formats.py +7 -0
  80. data_syncmaster-0.1.1/syncmaster/schemas/v1/groups.py +39 -0
  81. data_syncmaster-0.1.1/syncmaster/schemas/v1/page.py +40 -0
  82. data_syncmaster-0.1.1/syncmaster/schemas/v1/queue.py +32 -0
  83. data_syncmaster-0.1.1/syncmaster/schemas/v1/status.py +16 -0
  84. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfer_types.py +6 -0
  85. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/__init__.py +172 -0
  86. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/db.py +23 -0
  87. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/file/__init__.py +2 -0
  88. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/file/base.py +47 -0
  89. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/file/hdfs.py +27 -0
  90. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/file/s3.py +27 -0
  91. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/file_format.py +29 -0
  92. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/run.py +37 -0
  93. data_syncmaster-0.1.1/syncmaster/schemas/v1/transfers/strategy.py +15 -0
  94. data_syncmaster-0.1.1/syncmaster/schemas/v1/types.py +5 -0
  95. data_syncmaster-0.1.1/syncmaster/schemas/v1/users.py +83 -0
  96. data_syncmaster-0.1.1/syncmaster/worker/__init__.py +2 -0
  97. data_syncmaster-0.1.1/syncmaster/worker/base.py +14 -0
  98. data_syncmaster-0.1.1/syncmaster/worker/config.py +18 -0
  99. data_syncmaster-0.1.1/syncmaster/worker/controller.py +127 -0
  100. data_syncmaster-0.1.1/syncmaster/worker/handlers/__init__.py +2 -0
  101. data_syncmaster-0.1.1/syncmaster/worker/handlers/base.py +49 -0
  102. data_syncmaster-0.1.1/syncmaster/worker/handlers/file/__init__.py +2 -0
  103. data_syncmaster-0.1.1/syncmaster/worker/handlers/file/base.py +56 -0
  104. data_syncmaster-0.1.1/syncmaster/worker/handlers/file/hdfs.py +14 -0
  105. data_syncmaster-0.1.1/syncmaster/worker/handlers/file/s3.py +20 -0
  106. data_syncmaster-0.1.1/syncmaster/worker/handlers/hive.py +41 -0
  107. data_syncmaster-0.1.1/syncmaster/worker/handlers/oracle.py +48 -0
  108. data_syncmaster-0.1.1/syncmaster/worker/handlers/postgres.py +47 -0
  109. data_syncmaster-0.1.1/syncmaster/worker/spark.py +93 -0
  110. data_syncmaster-0.1.1/syncmaster/worker/transfer.py +85 -0
@@ -0,0 +1,203 @@
1
+ Copyright 2023-2024 MTS (Mobile Telesystems). All rights reserved.
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright [yyyy] [name of copyright owner]
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.1
2
+ Name: data-syncmaster
3
+ Version: 0.1.1
4
+ Summary: Syncmaster REST API + Worker
5
+ License: Apache-2.0
6
+ Keywords: Syncmaster,REST,API,Worker,Replication
7
+ Author: DataOps.ETL
8
+ Author-email: onetools@mts.ru
9
+ Requires-Python: >=3.11,<4.0
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Framework :: FastAPI
12
+ Classifier: Framework :: Pydantic
13
+ Classifier: Framework :: Pydantic :: 2
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.7
23
+ Classifier: Programming Language :: Python :: 3.8
24
+ Classifier: Programming Language :: Python :: 3.9
25
+ Classifier: Topic :: Software Development :: Libraries
26
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
+ Classifier: Typing :: Typed
28
+ Provides-Extra: backend
29
+ Provides-Extra: worker
30
+ Requires-Dist: alembic (>=1.11.1,<2.0.0) ; extra == "backend"
31
+ Requires-Dist: asyncpg (>=0.29.0,<0.30.0) ; extra == "backend"
32
+ Requires-Dist: celery (>=5.3.3,<6.0.0)
33
+ Requires-Dist: fastapi (>=0.110.0,<0.111.0) ; extra == "backend"
34
+ Requires-Dist: onetl[spark] (>=0.10.2,<0.11.0) ; extra == "worker"
35
+ Requires-Dist: psycopg2-binary (>=2.9.7,<3.0.0) ; extra == "worker"
36
+ Requires-Dist: pydantic (>=2.6.4,<3.0.0)
37
+ Requires-Dist: pydantic-settings (>=2.2.1,<3.0.0)
38
+ Requires-Dist: python-jose[cryptography] (>=3.3.0,<4.0.0)
39
+ Requires-Dist: python-multipart (>=0.0.9,<0.0.10)
40
+ Requires-Dist: sqlalchemy (>=2.0.18,<3.0.0)
41
+ Requires-Dist: sqlalchemy-utils (>=0.41.1,<0.42.0)
42
+ Requires-Dist: uvicorn (>=0.29.0,<0.30.0) ; extra == "backend"
43
+ Project-URL: CI/CD, https://github.com/MobileTeleSystems/syncmaster/actions
44
+ Project-URL: Documentation, https://syncmaster.readthedocs.io
45
+ Project-URL: Homepage, https://github.com/MobileTeleSystems/syncmaster
46
+ Project-URL: Source, https://github.com/MobileTeleSystems/syncmaster
47
+ Project-URL: Tracker, https://github.com/MobileTeleSystems/syncmaster/issues
48
+ Description-Content-Type: text/x-rst
49
+
50
+ .. title
51
+
52
+ ==========
53
+ SyncMaster
54
+ ==========
55
+
56
+ |Repo Status| |PyPI| |PyPI License| |PyPI Python Version| |Docker image| |Documentation|
57
+ |Build Status| |Coverage| |pre-commit.ci|
58
+
59
+ .. |Repo Status| image:: https://www.repostatus.org/badges/latest/active.svg
60
+ :target: https://github.com/MobileTeleSystems/syncmaster
61
+ .. |PyPI| image:: https://img.shields.io/pypi/v/data-syncmaster
62
+ :target: https://pypi.org/project/data-syncmaster/
63
+ .. |PyPI License| image:: https://img.shields.io/pypi/l/data-syncmaster.svg
64
+ :target: https://github.com/MobileTeleSystems/syncmaster/blob/develop/LICENSE.txt
65
+ .. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/data-syncmaster.svg
66
+ :target: https://badge.fury.io/py/data-syncmaster
67
+ .. |Docker image| image:: https://img.shields.io/docker/v/mtsrus/syncmaster-backend?sort=semver&label=docker
68
+ :target: https://hub.docker.com/r/mtsrus/syncmaster-backend
69
+ .. |Documentation| image:: https://readthedocs.org/projects/data-syncmaster/badge/?version=stable
70
+ :target: https://syncmaster.readthedocs.io
71
+ .. |Build Status| image:: https://github.com/MobileTeleSystems/syncmaster/workflows/Tests/badge.svg
72
+ :target: https://github.com/MobileTeleSystems/syncmaster/actions
73
+ .. |Coverage| image:: https://codecov.io/gh/MobileTeleSystems/syncmaster/graph/badge.svg?token=ky7UyUxolB
74
+ :target: https://codecov.io/gh/MobileTeleSystems/syncmaster
75
+ .. |pre-commit.ci| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/syncmaster/develop.svg
76
+ :target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/syncmaster/develop
77
+
78
+
79
+ What is Syncmaster?
80
+ -------------------
81
+
82
+ Syncmaster is as low-code ETL tool for transfering data between databases and file systems.
83
+ List of currently supported connections:
84
+
85
+ * Apache Hive
86
+ * Postgres
87
+ * Oracle
88
+ * HDFS
89
+ * S3
90
+
91
+ Current SyncMaster implementation provides following components:
92
+
93
+ * REST API
94
+ * Celery Worker
95
+
96
+ Goals
97
+ -----
98
+
99
+ * Make transfering data between databases and file systems as simple as possible
100
+ * Provide a lot of builtin connectors to transfer data in heterogeneous environment
101
+ * RBAC and multitenancy support
102
+
103
+ Non-goals
104
+ ---------
105
+
106
+ * This is not a backup system
107
+ * This is not a CDC solution
108
+ * Only batch, no streaming
109
+
110
+ .. documentation
111
+
112
+ Documentation
113
+ -------------
114
+
115
+ See https://syncmaster.readthedocs.io
@@ -0,0 +1,66 @@
1
+ .. title
2
+
3
+ ==========
4
+ SyncMaster
5
+ ==========
6
+
7
+ |Repo Status| |PyPI| |PyPI License| |PyPI Python Version| |Docker image| |Documentation|
8
+ |Build Status| |Coverage| |pre-commit.ci|
9
+
10
+ .. |Repo Status| image:: https://www.repostatus.org/badges/latest/active.svg
11
+ :target: https://github.com/MobileTeleSystems/syncmaster
12
+ .. |PyPI| image:: https://img.shields.io/pypi/v/data-syncmaster
13
+ :target: https://pypi.org/project/data-syncmaster/
14
+ .. |PyPI License| image:: https://img.shields.io/pypi/l/data-syncmaster.svg
15
+ :target: https://github.com/MobileTeleSystems/syncmaster/blob/develop/LICENSE.txt
16
+ .. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/data-syncmaster.svg
17
+ :target: https://badge.fury.io/py/data-syncmaster
18
+ .. |Docker image| image:: https://img.shields.io/docker/v/mtsrus/syncmaster-backend?sort=semver&label=docker
19
+ :target: https://hub.docker.com/r/mtsrus/syncmaster-backend
20
+ .. |Documentation| image:: https://readthedocs.org/projects/data-syncmaster/badge/?version=stable
21
+ :target: https://syncmaster.readthedocs.io
22
+ .. |Build Status| image:: https://github.com/MobileTeleSystems/syncmaster/workflows/Tests/badge.svg
23
+ :target: https://github.com/MobileTeleSystems/syncmaster/actions
24
+ .. |Coverage| image:: https://codecov.io/gh/MobileTeleSystems/syncmaster/graph/badge.svg?token=ky7UyUxolB
25
+ :target: https://codecov.io/gh/MobileTeleSystems/syncmaster
26
+ .. |pre-commit.ci| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/syncmaster/develop.svg
27
+ :target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/syncmaster/develop
28
+
29
+
30
+ What is Syncmaster?
31
+ -------------------
32
+
33
+ Syncmaster is as low-code ETL tool for transfering data between databases and file systems.
34
+ List of currently supported connections:
35
+
36
+ * Apache Hive
37
+ * Postgres
38
+ * Oracle
39
+ * HDFS
40
+ * S3
41
+
42
+ Current SyncMaster implementation provides following components:
43
+
44
+ * REST API
45
+ * Celery Worker
46
+
47
+ Goals
48
+ -----
49
+
50
+ * Make transfering data between databases and file systems as simple as possible
51
+ * Provide a lot of builtin connectors to transfer data in heterogeneous environment
52
+ * RBAC and multitenancy support
53
+
54
+ Non-goals
55
+ ---------
56
+
57
+ * This is not a backup system
58
+ * This is not a CDC solution
59
+ * Only batch, no streaming
60
+
61
+ .. documentation
62
+
63
+ Documentation
64
+ -------------
65
+
66
+ See https://syncmaster.readthedocs.io
@@ -0,0 +1,277 @@
1
+ [tool.poetry]
2
+ name = "data-syncmaster"
3
+ version = "0.1.1"
4
+ license = "Apache-2.0"
5
+ description = "Syncmaster REST API + Worker"
6
+ authors = ["DataOps.ETL <onetools@mts.ru>"]
7
+ readme = "README.rst"
8
+ classifiers = [
9
+ "Development Status :: 3 - Alpha",
10
+ "Framework :: Pydantic",
11
+ "Framework :: Pydantic :: 2",
12
+ "Framework :: FastAPI",
13
+ "Intended Audience :: Developers",
14
+ "License :: OSI Approved :: Apache Software License",
15
+ "Operating System :: OS Independent",
16
+ "Programming Language :: Python :: 3 :: Only",
17
+ "Programming Language :: Python :: 3.7",
18
+ "Programming Language :: Python :: 3.8",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Topic :: Software Development :: Libraries",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ "Typing :: Typed",
26
+ ]
27
+ keywords = ["Syncmaster", "REST", "API", "Worker", "Replication"]
28
+
29
+ packages = [
30
+ { include = "syncmaster" },
31
+ ]
32
+
33
+ exclude = [
34
+ {path = "tests"},
35
+ ]
36
+
37
+ [tool.poetry.urls] # Optional
38
+ "Homepage" = "https://github.com/MobileTeleSystems/syncmaster"
39
+ "Documentation" = "https://syncmaster.readthedocs.io"
40
+ "Source" = "https://github.com/MobileTeleSystems/syncmaster"
41
+ "CI/CD" = "https://github.com/MobileTeleSystems/syncmaster/actions"
42
+ "Tracker" = "https://github.com/MobileTeleSystems/syncmaster/issues"
43
+
44
+ [tool.poetry.dependencies]
45
+ python = "^3.11"
46
+ sqlalchemy = "^2.0.18"
47
+ sqlalchemy-utils = "^0.41.1"
48
+ pydantic = "^2.6.4"
49
+ python-jose = {extras = ["cryptography"], version = "^3.3.0"}
50
+ python-multipart = "^0.0.9"
51
+ celery = "^5.3.3"
52
+ onetl = {version = "^0.10.2", extras = ["spark"]}
53
+ psycopg2-binary = {version = "^2.9.7", optional = true }
54
+ fastapi = {version = "^0.110.0", optional = true}
55
+ uvicorn = {version = "^0.29.0", optional = true }
56
+ alembic = {version = "^1.11.1", optional = true }
57
+ asyncpg = {version = "^0.29.0", optional = true }
58
+ pydantic-settings = "^2.2.1"
59
+
60
+ [tool.poetry.extras]
61
+ backend = [
62
+ "alembic",
63
+ "asyncpg",
64
+ "fastapi",
65
+ "uvicorn",
66
+ ]
67
+
68
+ worker = [
69
+ "onetl",
70
+ "psycopg2-binary",
71
+ ]
72
+
73
+ [tool.poetry.group.test.dependencies]
74
+ pandas-stubs = "^2.1.4.231227"
75
+ pytest = "^8.1.1"
76
+ httpx = "^0.27.0"
77
+ pytest-asyncio = "^0.23.6"
78
+ psycopg2-binary = "^2.9.7"
79
+ pytest-randomly = "^3.13.0"
80
+ pytest-deadfixtures = "^2.2.1"
81
+ pytest-mock = "^3.11.1"
82
+ onetl = {extras = ["spark", "s3", "hdfs"], version = "^0.10.2"}
83
+ faker = "^24.4.0"
84
+ coverage = "^7.4.3"
85
+ gevent = "^24.2.1"
86
+
87
+ [tool.poetry.group.dev.dependencies]
88
+ pre-commit = "^3.3.3"
89
+ mypy = "^1.4.1"
90
+ black = "^24.3.0"
91
+ isort = "^5.12.0"
92
+ flake8 = "^7.0.0"
93
+ bandit = "^1.7.5"
94
+ platformdirs = "4.2.0"
95
+ sqlalchemy = {extras = ["mypy"], version = "^2.0.18"}
96
+ types-python-jose = "^3.3.4.7"
97
+
98
+ [build-system]
99
+ requires = ["poetry-core"]
100
+ build-backend = "poetry.core.masonry.api"
101
+
102
+ [tool.black]
103
+ line-length = 120
104
+
105
+ [tool.isort]
106
+ profile = "black"
107
+ py_version = "311"
108
+ known_first_party = ["app"]
109
+
110
+ [tool.mypy]
111
+ python_version = "3.11"
112
+ plugins = ["pydantic.mypy", "sqlalchemy.ext.mypy.plugin"]
113
+ follow_imports = "silent"
114
+
115
+ [[tool.mypy.overrides]]
116
+ module = "alembic.*"
117
+ ignore_missing_imports = true
118
+
119
+ [[tool.mypy.overrides]]
120
+ module = "pyarrow.*"
121
+ ignore_missing_imports = true
122
+
123
+ [[tool.mypy.overrides]]
124
+ module = "avro.*"
125
+ ignore_missing_imports = true
126
+
127
+ [[tool.mypy.overrides]]
128
+ module = "celery.*"
129
+ ignore_missing_imports = true
130
+
131
+ [[tool.mypy.overrides]]
132
+ module = "fastapi.*"
133
+ ignore_missing_imports = true
134
+
135
+ [[tool.mypy.overrides]]
136
+ module = "kombu.*"
137
+ ignore_missing_imports = true
138
+
139
+ [[tool.mypy.overrides]]
140
+ module = "onetl.*"
141
+ ignore_missing_imports = true
142
+
143
+ [[tool.mypy.overrides]]
144
+ module = "pyspark.*"
145
+ ignore_missing_imports = true
146
+
147
+ [[tool.mypy.overrides]]
148
+ module = "sqlalchemy_utils.*"
149
+ ignore_missing_imports = true
150
+
151
+ [[tool.mypy.overrides]]
152
+ module = "starlette.*"
153
+ ignore_missing_imports = true
154
+
155
+ [[tool.mypy.overrides]]
156
+ module = "uvicorn.*"
157
+ ignore_missing_imports = true
158
+
159
+ [tool.pytest.ini_options]
160
+ markers = [
161
+ "backend: tests for backend (require running database)",
162
+ "worker: tests for syncmaster worker",
163
+ "hive: tests for Hive",
164
+ "postgres: tests on Postgres",
165
+ "oracle: tests for Oracle",
166
+ "hdfs: tests for hadoop hdfs",
167
+ "s3: tests for S3",
168
+ ]
169
+
170
+ [tool.coverage.paths]
171
+ source = ["syncmaster"]
172
+
173
+ [tool.coverage.run]
174
+ branch = true
175
+ parallel = true
176
+ relative_files = true
177
+ concurrency = ["gevent", "multiprocessing"]
178
+ omit = [
179
+ "tests/*",
180
+ ]
181
+ data_file = "reports/.coverage"
182
+
183
+ [tool.coverage.report]
184
+ precision = 2
185
+ exclude_lines = [
186
+ "pragma: no cover",
187
+ "def __repr__",
188
+ "if .*debug:",
189
+ "raise AssertionError",
190
+ "raise NotImplementedError",
191
+ "if __name__ == .__main__.:",
192
+ "if TYPE_CHECKING:",
193
+ "if log.isEnabledFor(logging.DEBUG):",
194
+ "if sys.version_info",
195
+ "@(abc\\.)?abstractmethod",
196
+ "\\.\\.\\.",
197
+ "def downgrade\\(\\)",
198
+ ]
199
+
200
+ [tool.poetry.group.docs.dependencies]
201
+ autodoc-pydantic = {version = "^2.0.1", python = ">=3.8"}
202
+ numpydoc = {version = "^1.6.0", python = ">=3.8"}
203
+ sphinx = [
204
+ {version = "^7.1.2", python = ">=3.8"},
205
+ {version = "^7.2.6", python = ">=3.9"},
206
+ ]
207
+ furo = {version = "^2024.1.29", python = ">=3.8"}
208
+ sphinx-copybutton = {version = "^0.5.2", python = ">=3.8"}
209
+ sphinxcontrib-towncrier = {version = "^0.4.0a0", python = ">=3.8"}
210
+ towncrier = {version = "^23.11.0", python = ">=3.8"}
211
+ sphinx-issues = {version = ">=3.0.1,<5.0.0", python = ">=3.8"}
212
+ sphinx-design = {version = "^0.5.0", python = ">=3.8"}
213
+ sphinx-favicon = {version = "^1.0.1", python = ">=3.8"}
214
+ sphinx-argparse = {version = "^0.4.0", python = ">=3.8"}
215
+ # uncomment after https://github.com/zqmillet/sphinx-plantuml/pull/4
216
+ # sphinx-plantuml = {version = "^1.0.0", python = ">=3.8"}
217
+
218
+ [tool.towncrier]
219
+ name = "Syncmaster"
220
+ package = "syncmaster"
221
+ filename = "docs/changelog/NEXT_RELEASE.rst"
222
+ directory = "docs/changelog/next_release/"
223
+ title_format = "{version} ({project_date})"
224
+ issue_format = ":issue:`{issue}`"
225
+
226
+ [[tool.towncrier.type]]
227
+ directory = "breaking"
228
+ name = "Breaking Changes"
229
+ showcontent = true
230
+
231
+ [[tool.towncrier.type]]
232
+ directory = "significant"
233
+ name = "Significant Changes"
234
+ showcontent = true
235
+
236
+ [[tool.towncrier.type]]
237
+ directory = "feature"
238
+ name = "Features"
239
+ showcontent = true
240
+
241
+ [[tool.towncrier.type]]
242
+ directory = "improvement"
243
+ name = "Improvements"
244
+ showcontent = true
245
+
246
+ [[tool.towncrier.type]]
247
+ directory = "bugfix"
248
+ name = "Bug Fixes"
249
+ showcontent = true
250
+
251
+ [[tool.towncrier.type]]
252
+ directory = "dependency"
253
+ name = "Dependencies"
254
+ showcontent = true
255
+
256
+ [[tool.towncrier.type]]
257
+ directory = "doc"
258
+ name = "Doc only Changes"
259
+ showcontent = true
260
+
261
+ [[tool.towncrier.type]]
262
+ directory = "misc"
263
+ name = "Misc"
264
+ showcontent = true
265
+
266
+ [[tool.towncrier.type]]
267
+ directory = "removal"
268
+ name = "Removal"
269
+ showcontent = true
270
+
271
+ [tool.poetry_bumpversion.file."syncmaster/__init__.py"]
272
+ search = '_raw_version = "{current_version}"'
273
+ replace = '_raw_version = "{new_version}"'
274
+
275
+ [tool.poetry_bumpversion.file."docs/conf.py"]
276
+ search = 'ver = Version.parse("{current_version}")'
277
+ replace = 'ver = Version.parse("{new_version}")'
@@ -0,0 +1,6 @@
1
+ # SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ _raw_version = "0.1.1"
5
+ # version always contain only release number like 0.0.1
6
+ __version__ = ".".join(_raw_version.split(".")[:3]) # noqa: WPS410
@@ -0,0 +1,2 @@
1
+ # SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems)
2
+ # SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,2 @@
1
+ # SPDX-FileCopyrightText: 2023-2024 MTS (Mobile Telesystems)
2
+ # SPDX-License-Identifier: Apache-2.0