SQLDbWrpr 5.0.0__tar.gz → 5.1.0__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.
- {sqldbwrpr-5.0.0 → sqldbwrpr-5.1.0}/PKG-INFO +176 -10
- sqldbwrpr-5.1.0/README.md +206 -0
- sqldbwrpr-5.1.0/pyproject.toml +135 -0
- {sqldbwrpr-5.0.0 → sqldbwrpr-5.1.0}/src/sqldbwrpr/sqldbwrpr.py +475 -148
- sqldbwrpr-5.0.0/README.md +0 -43
- sqldbwrpr-5.0.0/pyproject.toml +0 -124
- {sqldbwrpr-5.0.0 → sqldbwrpr-5.1.0}/LICENSE.txt +0 -0
- {sqldbwrpr-5.0.0 → sqldbwrpr-5.1.0}/src/sqldbwrpr/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: SQLDbWrpr
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.1.0
|
|
4
4
|
Summary: Wrapper for importing CSV and Text files into MySQL and Postgress
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE.txt
|
|
@@ -8,23 +8,26 @@ Author: Hendrik du Toit
|
|
|
8
8
|
Author-email: hendrik@brightedge.co.za
|
|
9
9
|
Maintainer: Hendrik du Toit
|
|
10
10
|
Maintainer-email: hendrikdt@citiqprepaid.co.za
|
|
11
|
-
Requires-Python: >=3.10
|
|
12
|
-
Classifier: Development Status ::
|
|
13
|
-
Classifier:
|
|
14
|
-
Classifier:
|
|
15
|
-
Classifier: Topic :: Software Development
|
|
16
|
-
Classifier: Topic :: Text Processing
|
|
17
|
-
Classifier: Topic :: Utilities
|
|
11
|
+
Requires-Python: >=3.10,<3.15
|
|
12
|
+
Classifier: Development Status :: 6 - Mature
|
|
13
|
+
Classifier: Framework :: Pydantic :: 2
|
|
14
|
+
Classifier: Framework :: Pytest
|
|
18
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Operating System :: iOS
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
25
|
Requires-Dist: csvwrpr (>=1.16.1,<2.0.0)
|
|
24
26
|
Requires-Dist: fixdate (>=2.1.0,<3.0.0)
|
|
25
27
|
Requires-Dist: mysql-connector (>=2.2.9,<3.0.0)
|
|
28
|
+
Requires-Dist: psycopg[binary] (>=3.2.0,<4.0.0)
|
|
26
29
|
Requires-Dist: pydantic-settings (>=2.12.0,<3.0.0)
|
|
27
|
-
Requires-Dist:
|
|
30
|
+
Requires-Dist: sqlalchemy (>=2.0.0,<3.0.0)
|
|
28
31
|
Project-URL: Homepage, https://github.com/BrightEdgeeServices/SqlDbWrpr
|
|
29
32
|
Project-URL: Issues, https://github.com/BrightEdgeeServices/SqlDbWrpr/issues
|
|
30
33
|
Project-URL: Repository, https://github.com/BrightEdgeeServices/SqlDbWrpr.git
|
|
@@ -40,7 +43,170 @@ Description-Content-Type: text/markdown
|
|
|
40
43
|
| PyPI | [![][pypi_release_img]][pypi_release_lnk] [![][pypi_py_versions_img]][pypi_py_versions_lnk] [![][pypi_format_img]][pypi_format_lnk] [![][pypi_downloads_img]][pypi_downloads_lnk] |
|
|
41
44
|
| Github | [![][gh_issues_img]][gh_issues_lnk] [![][gh_language_img]][gh_language_lnk] [![][gh_last_commit_img]][gh_last_commit_lnk] [![][gh_deployment_img]][gh_deployment_lnk] |
|
|
42
45
|
|
|
43
|
-
##
|
|
46
|
+
## Short description
|
|
47
|
+
|
|
48
|
+
SqlDbWrpr is a Python wrapper that streamlines schema creation plus CSV import/export workflows for SQL backends.
|
|
49
|
+
|
|
50
|
+
## Module Overview
|
|
51
|
+
|
|
52
|
+
SqlDbWrpr is a Python utility for creating SQL database schemas and moving CSV data into and out of those schemas. It currently provides wrappers for MySQL and PostgreSQL.
|
|
53
|
+
|
|
54
|
+
Schemas can be supplied in two ways:
|
|
55
|
+
|
|
56
|
+
1. A legacy `db_structure` dictionary.
|
|
57
|
+
2. SQLAlchemy metadata, either directly through `p_sqlalchemy_metadata` or through `p_sqlalchemy_base.metadata`.
|
|
58
|
+
|
|
59
|
+
When both are supplied, `p_db_structure` takes precedence for backward compatibility. If no supported schema source is supplied, `SchemaSourceError` is raised.
|
|
60
|
+
|
|
61
|
+
### Key Features
|
|
62
|
+
|
|
63
|
+
- **Schema Management**: Create databases, tables, primary keys, foreign keys, and indexes from a legacy dictionary or SQLAlchemy metadata.
|
|
64
|
+
- **Data Import/Export**:
|
|
65
|
+
- Import CSV data from files or in-memory rows, including single-volume and numbered multi-volume files.
|
|
66
|
+
- Export full tables or custom SQL query results to CSV, including optional multi-volume exports.
|
|
67
|
+
- **Database Support**: Includes MySQL and PostgreSQL wrappers with dialect-specific SQL rendering.
|
|
68
|
+
- **User and Permission Management**: Create MySQL users and grant database rights.
|
|
69
|
+
- **Batch Processing**: Configure import batch sizes for larger CSV loads.
|
|
70
|
+
|
|
71
|
+
### Project Structure
|
|
72
|
+
|
|
73
|
+
- `src/sqldbwrpr/`: Core library implementation, including MySQL and PostgreSQL wrappers.
|
|
74
|
+
- `tests/`: Unit and integration-oriented test coverage for wrapper behaviour.
|
|
75
|
+
- `scripts/`: SQL setup/bootstrap assets used for database initialization.
|
|
76
|
+
- Root automation scripts (`*.ps1`) and CI configuration under `.github/workflows/` support setup and delivery.
|
|
77
|
+
|
|
78
|
+
## Getting Started
|
|
79
|
+
|
|
80
|
+
### Installation
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install SqlDbWrpr
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Quick Start With A Legacy Structure
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from sqldbwrpr.sqldbwrpr import MySQL
|
|
90
|
+
|
|
91
|
+
field_defaults = {
|
|
92
|
+
"PrimaryKey": ["", ""],
|
|
93
|
+
"FKey": [],
|
|
94
|
+
"Index": [],
|
|
95
|
+
"NN": "",
|
|
96
|
+
"B": "",
|
|
97
|
+
"UN": "",
|
|
98
|
+
"ZF": "",
|
|
99
|
+
"AI": "",
|
|
100
|
+
"G": "",
|
|
101
|
+
"DEF": "",
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
db_structure = {
|
|
105
|
+
"Users": {
|
|
106
|
+
"ID": {
|
|
107
|
+
"Type": ["int"],
|
|
108
|
+
"Params": {
|
|
109
|
+
**field_defaults,
|
|
110
|
+
"PrimaryKey": ["Y", "A"],
|
|
111
|
+
"NN": "Y",
|
|
112
|
+
"AI": "Y",
|
|
113
|
+
},
|
|
114
|
+
"Possible Values": "",
|
|
115
|
+
"Comment": "",
|
|
116
|
+
},
|
|
117
|
+
"Username": {
|
|
118
|
+
"Type": ["varchar", 50],
|
|
119
|
+
"Params": {**field_defaults, "NN": "Y"},
|
|
120
|
+
"Possible Values": "",
|
|
121
|
+
"Comment": "",
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
db = MySQL(
|
|
127
|
+
p_host_name="localhost",
|
|
128
|
+
p_user_name="root",
|
|
129
|
+
p_password="yourpassword",
|
|
130
|
+
p_db_name="my_database",
|
|
131
|
+
p_db_structure=db_structure,
|
|
132
|
+
p_recreate_db=True,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
db.import_csv("Users", p_csv_db=[("Username",), ("alice",)], p_vol_type="Single")
|
|
136
|
+
db.export_to_csv("exported_users.csv", "Users")
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Quick Start With SQLAlchemy Metadata
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
from sqlalchemy import Column
|
|
143
|
+
from sqlalchemy import Integer
|
|
144
|
+
from sqlalchemy import MetaData
|
|
145
|
+
from sqlalchemy import String
|
|
146
|
+
from sqlalchemy import Table
|
|
147
|
+
|
|
148
|
+
from sqldbwrpr.sqldbwrpr import PostgreSQL
|
|
149
|
+
|
|
150
|
+
metadata = MetaData()
|
|
151
|
+
Table(
|
|
152
|
+
"Users",
|
|
153
|
+
metadata,
|
|
154
|
+
Column("ID", Integer, primary_key=True, autoincrement=True),
|
|
155
|
+
Column("Username", String(50), nullable=False),
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
db = PostgreSQL(
|
|
159
|
+
p_host_name="localhost",
|
|
160
|
+
p_user_name="postgres",
|
|
161
|
+
p_password="yourpassword",
|
|
162
|
+
p_db_name="my_database",
|
|
163
|
+
p_sqlalchemy_metadata=metadata,
|
|
164
|
+
p_recreate_db=True,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
db.import_csv("Users", p_csv_db=[("Username",), ("alice",)], p_vol_type="Single")
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
______________________________________________________________________
|
|
171
|
+
|
|
172
|
+
## Updating ReleaseNotes Instructions
|
|
173
|
+
|
|
174
|
+
1. Run the `pushpy.ps1` script or manually commit the current changes.
|
|
175
|
+
2. Generate the release notes
|
|
176
|
+
3. Use one of the following AI propmpts in Notion to generate the release notes.
|
|
177
|
+
|
|
178
|
+
- [Release - Update - General](https://www.notion.so/Release-Update-General-2c0bc8e6c6f38076b4cee82e3cf243fa?v=2c0bc8e6c6f3806e85db000c395f94ce&source=copy_link)
|
|
179
|
+
- [Release - Update - VenvIt](https://www.notion.so/Release-Update-VenvIt-2c0bc8e6c6f380de84a0f3fbb8b5dda5?v=2c0bc8e6c6f3806e85db000c395f94ce&source=copy_link)
|
|
180
|
+
|
|
181
|
+
or
|
|
182
|
+
|
|
183
|
+
1. Use the following template and manually update the ReleaseNotes.md file.
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
# Release ?.?.?
|
|
187
|
+
## Summary of Changes
|
|
188
|
+
- bla, bla, bla
|
|
189
|
+
## Next Heading
|
|
190
|
+
- bla, bla, bla
|
|
191
|
+
---
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
2. You can repeat step 1 multiple times.
|
|
195
|
+
|
|
196
|
+
3. You can repeat step 2 multiple times but update the ReleaseNotes that has not been published.
|
|
197
|
+
|
|
198
|
+
4. Run the `pushpr.ps1` script once you are ready to create the PR to publish the release. TOy can also manually create
|
|
199
|
+
the tag, touch a file, commit and push the changes.
|
|
200
|
+
|
|
201
|
+
5. Merge the PR in GitHub.
|
|
202
|
+
|
|
203
|
+
6. Confirm the following:
|
|
204
|
+
|
|
205
|
+
7. The release update reflects in GitHub
|
|
206
|
+
|
|
207
|
+
8. The release update notification was sent
|
|
208
|
+
|
|
209
|
+
______________________________________________________________________
|
|
44
210
|
|
|
45
211
|
[cicd_codestyle_img]: https://img.shields.io/badge/code%20style-black-000000.svg "Black"
|
|
46
212
|
[cicd_codestyle_lnk]: https://github.com/psf/black "Black"
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# SqlDbWrpr
|
|
2
|
+
|
|
3
|
+
| **Category** | **Status' and Links** |
|
|
4
|
+
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5
|
+
| General | [![][general_maintenance_y_img]][general_maintenance_y_lnk] [![][general_semver_pic]][general_semver_link] [![][general_license_img]][general_license_lnk] |
|
|
6
|
+
| CD/CI | [![][gh_tests_img]][gh_tests_lnk] [![][cicd_codestyle_img]][cicd_codestyle_lnk] [![][cicd_pre_commit_img]][cicd_pre_commit_lnk] [![][codecov_img]][codecov_lnk] [![][gh_doc_img]][gh_doc_lnk] |
|
|
7
|
+
| PyPI | [![][pypi_release_img]][pypi_release_lnk] [![][pypi_py_versions_img]][pypi_py_versions_lnk] [![][pypi_format_img]][pypi_format_lnk] [![][pypi_downloads_img]][pypi_downloads_lnk] |
|
|
8
|
+
| Github | [![][gh_issues_img]][gh_issues_lnk] [![][gh_language_img]][gh_language_lnk] [![][gh_last_commit_img]][gh_last_commit_lnk] [![][gh_deployment_img]][gh_deployment_lnk] |
|
|
9
|
+
|
|
10
|
+
## Short description
|
|
11
|
+
|
|
12
|
+
SqlDbWrpr is a Python wrapper that streamlines schema creation plus CSV import/export workflows for SQL backends.
|
|
13
|
+
|
|
14
|
+
## Module Overview
|
|
15
|
+
|
|
16
|
+
SqlDbWrpr is a Python utility for creating SQL database schemas and moving CSV data into and out of those schemas. It currently provides wrappers for MySQL and PostgreSQL.
|
|
17
|
+
|
|
18
|
+
Schemas can be supplied in two ways:
|
|
19
|
+
|
|
20
|
+
1. A legacy `db_structure` dictionary.
|
|
21
|
+
2. SQLAlchemy metadata, either directly through `p_sqlalchemy_metadata` or through `p_sqlalchemy_base.metadata`.
|
|
22
|
+
|
|
23
|
+
When both are supplied, `p_db_structure` takes precedence for backward compatibility. If no supported schema source is supplied, `SchemaSourceError` is raised.
|
|
24
|
+
|
|
25
|
+
### Key Features
|
|
26
|
+
|
|
27
|
+
- **Schema Management**: Create databases, tables, primary keys, foreign keys, and indexes from a legacy dictionary or SQLAlchemy metadata.
|
|
28
|
+
- **Data Import/Export**:
|
|
29
|
+
- Import CSV data from files or in-memory rows, including single-volume and numbered multi-volume files.
|
|
30
|
+
- Export full tables or custom SQL query results to CSV, including optional multi-volume exports.
|
|
31
|
+
- **Database Support**: Includes MySQL and PostgreSQL wrappers with dialect-specific SQL rendering.
|
|
32
|
+
- **User and Permission Management**: Create MySQL users and grant database rights.
|
|
33
|
+
- **Batch Processing**: Configure import batch sizes for larger CSV loads.
|
|
34
|
+
|
|
35
|
+
### Project Structure
|
|
36
|
+
|
|
37
|
+
- `src/sqldbwrpr/`: Core library implementation, including MySQL and PostgreSQL wrappers.
|
|
38
|
+
- `tests/`: Unit and integration-oriented test coverage for wrapper behaviour.
|
|
39
|
+
- `scripts/`: SQL setup/bootstrap assets used for database initialization.
|
|
40
|
+
- Root automation scripts (`*.ps1`) and CI configuration under `.github/workflows/` support setup and delivery.
|
|
41
|
+
|
|
42
|
+
## Getting Started
|
|
43
|
+
|
|
44
|
+
### Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install SqlDbWrpr
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Quick Start With A Legacy Structure
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from sqldbwrpr.sqldbwrpr import MySQL
|
|
54
|
+
|
|
55
|
+
field_defaults = {
|
|
56
|
+
"PrimaryKey": ["", ""],
|
|
57
|
+
"FKey": [],
|
|
58
|
+
"Index": [],
|
|
59
|
+
"NN": "",
|
|
60
|
+
"B": "",
|
|
61
|
+
"UN": "",
|
|
62
|
+
"ZF": "",
|
|
63
|
+
"AI": "",
|
|
64
|
+
"G": "",
|
|
65
|
+
"DEF": "",
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
db_structure = {
|
|
69
|
+
"Users": {
|
|
70
|
+
"ID": {
|
|
71
|
+
"Type": ["int"],
|
|
72
|
+
"Params": {
|
|
73
|
+
**field_defaults,
|
|
74
|
+
"PrimaryKey": ["Y", "A"],
|
|
75
|
+
"NN": "Y",
|
|
76
|
+
"AI": "Y",
|
|
77
|
+
},
|
|
78
|
+
"Possible Values": "",
|
|
79
|
+
"Comment": "",
|
|
80
|
+
},
|
|
81
|
+
"Username": {
|
|
82
|
+
"Type": ["varchar", 50],
|
|
83
|
+
"Params": {**field_defaults, "NN": "Y"},
|
|
84
|
+
"Possible Values": "",
|
|
85
|
+
"Comment": "",
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
db = MySQL(
|
|
91
|
+
p_host_name="localhost",
|
|
92
|
+
p_user_name="root",
|
|
93
|
+
p_password="yourpassword",
|
|
94
|
+
p_db_name="my_database",
|
|
95
|
+
p_db_structure=db_structure,
|
|
96
|
+
p_recreate_db=True,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
db.import_csv("Users", p_csv_db=[("Username",), ("alice",)], p_vol_type="Single")
|
|
100
|
+
db.export_to_csv("exported_users.csv", "Users")
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Quick Start With SQLAlchemy Metadata
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
from sqlalchemy import Column
|
|
107
|
+
from sqlalchemy import Integer
|
|
108
|
+
from sqlalchemy import MetaData
|
|
109
|
+
from sqlalchemy import String
|
|
110
|
+
from sqlalchemy import Table
|
|
111
|
+
|
|
112
|
+
from sqldbwrpr.sqldbwrpr import PostgreSQL
|
|
113
|
+
|
|
114
|
+
metadata = MetaData()
|
|
115
|
+
Table(
|
|
116
|
+
"Users",
|
|
117
|
+
metadata,
|
|
118
|
+
Column("ID", Integer, primary_key=True, autoincrement=True),
|
|
119
|
+
Column("Username", String(50), nullable=False),
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
db = PostgreSQL(
|
|
123
|
+
p_host_name="localhost",
|
|
124
|
+
p_user_name="postgres",
|
|
125
|
+
p_password="yourpassword",
|
|
126
|
+
p_db_name="my_database",
|
|
127
|
+
p_sqlalchemy_metadata=metadata,
|
|
128
|
+
p_recreate_db=True,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
db.import_csv("Users", p_csv_db=[("Username",), ("alice",)], p_vol_type="Single")
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
______________________________________________________________________
|
|
135
|
+
|
|
136
|
+
## Updating ReleaseNotes Instructions
|
|
137
|
+
|
|
138
|
+
1. Run the `pushpy.ps1` script or manually commit the current changes.
|
|
139
|
+
2. Generate the release notes
|
|
140
|
+
3. Use one of the following AI propmpts in Notion to generate the release notes.
|
|
141
|
+
|
|
142
|
+
- [Release - Update - General](https://www.notion.so/Release-Update-General-2c0bc8e6c6f38076b4cee82e3cf243fa?v=2c0bc8e6c6f3806e85db000c395f94ce&source=copy_link)
|
|
143
|
+
- [Release - Update - VenvIt](https://www.notion.so/Release-Update-VenvIt-2c0bc8e6c6f380de84a0f3fbb8b5dda5?v=2c0bc8e6c6f3806e85db000c395f94ce&source=copy_link)
|
|
144
|
+
|
|
145
|
+
or
|
|
146
|
+
|
|
147
|
+
1. Use the following template and manually update the ReleaseNotes.md file.
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
# Release ?.?.?
|
|
151
|
+
## Summary of Changes
|
|
152
|
+
- bla, bla, bla
|
|
153
|
+
## Next Heading
|
|
154
|
+
- bla, bla, bla
|
|
155
|
+
---
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
2. You can repeat step 1 multiple times.
|
|
159
|
+
|
|
160
|
+
3. You can repeat step 2 multiple times but update the ReleaseNotes that has not been published.
|
|
161
|
+
|
|
162
|
+
4. Run the `pushpr.ps1` script once you are ready to create the PR to publish the release. TOy can also manually create
|
|
163
|
+
the tag, touch a file, commit and push the changes.
|
|
164
|
+
|
|
165
|
+
5. Merge the PR in GitHub.
|
|
166
|
+
|
|
167
|
+
6. Confirm the following:
|
|
168
|
+
|
|
169
|
+
7. The release update reflects in GitHub
|
|
170
|
+
|
|
171
|
+
8. The release update notification was sent
|
|
172
|
+
|
|
173
|
+
______________________________________________________________________
|
|
174
|
+
|
|
175
|
+
[cicd_codestyle_img]: https://img.shields.io/badge/code%20style-black-000000.svg "Black"
|
|
176
|
+
[cicd_codestyle_lnk]: https://github.com/psf/black "Black"
|
|
177
|
+
[cicd_pre_commit_img]: https://img.shields.io/github/actions/workflow/status/BrightEdgeeServices/SqlDbWrpr/pre-commit.yml?label=pre-commit "Pre-Commit"
|
|
178
|
+
[cicd_pre_commit_lnk]: https://github.com/BrightEdgeeServices/SqlDbWrpr/blob/master/.github/workflows/pre-commit.yml "Pre-Commit"
|
|
179
|
+
[codecov_img]: https://img.shields.io/codecov/c/gh/BrightEdgeeServices/SqlDbWrpr "CodeCov"
|
|
180
|
+
[codecov_lnk]: https://app.codecov.io/gh/BrightEdgeeServices/SqlDbWrpr "CodeCov"
|
|
181
|
+
[general_license_img]: https://img.shields.io/pypi/l/SqlDbWrpr "License"
|
|
182
|
+
[general_license_lnk]: https://github.com/BrightEdgeeServices/SqlDbWrpr/blob/master/LICENSE "License"
|
|
183
|
+
[general_maintenance_y_img]: https://img.shields.io/badge/Maintenance%20Intended-%E2%9C%94-green.svg?style=flat-square "Maintenance - intended"
|
|
184
|
+
[general_maintenance_y_lnk]: http://unmaintained.tech/ "Maintenance - intended"
|
|
185
|
+
[general_semver_link]: https://semver.org/ "Sentic Versioning - 2.0.0"
|
|
186
|
+
[general_semver_pic]: https://img.shields.io/badge/Semantic%20Versioning-2.0.0-brightgreen.svg?style=flat-square "Sentic Versioning - 2.0.0"
|
|
187
|
+
[gh_deployment_img]: https://img.shields.io/github/deployments/BrightEdgeeServices/SqlDbWrpr/pypi "GitHub - PiPy Deployment"
|
|
188
|
+
[gh_deployment_lnk]: https://github.com/BrightEdgeeServices/SqlDbWrpr/deployments/pypi "GitHub - PiPy Deployment"
|
|
189
|
+
[gh_doc_img]: https://img.shields.io/readthedocs/SqlDbWrpr "Read the Docs"
|
|
190
|
+
[gh_doc_lnk]: https://github.com/BrightEdgeeServices/SqlDbWrpr/blob/master/.github/workflows/check-rst-documentation.yml "Read the Docs"
|
|
191
|
+
[gh_issues_img]: https://img.shields.io/github/issues-raw/BrightEdgeeServices/SqlDbWrpr "GitHub - Issue Counter"
|
|
192
|
+
[gh_issues_lnk]: https://github.com/BrightEdgeeServices/SqlDbWrpr/issues "GitHub - Issue Counter"
|
|
193
|
+
[gh_language_img]: https://img.shields.io/github/languages/top/BrightEdgeeServices/SqlDbWrpr "GitHub - Top Language"
|
|
194
|
+
[gh_language_lnk]: https://github.com/BrightEdgeeServices/SqlDbWrpr "GitHub - Top Language"
|
|
195
|
+
[gh_last_commit_img]: https://img.shields.io/github/last-commit/BrightEdgeeServices/SqlDbWrpr/master "GitHub - Last Commit"
|
|
196
|
+
[gh_last_commit_lnk]: https://github.com/BrightEdgeeServices/SqlDbWrpr/commit/master "GitHub - Last Commit"
|
|
197
|
+
[gh_tests_img]: https://img.shields.io/github/actions/workflow/status/BrightEdgeeServices/SqlDbWrpr/ci.yml?label=ci "Test status"
|
|
198
|
+
[gh_tests_lnk]: https://github.com/BrightEdgeeServices/SqlDbWrpr/blob/master/.github/workflows/ci.yml "Test status"
|
|
199
|
+
[pypi_downloads_img]: https://img.shields.io/pypi/dm/SqlDbWrpr "Monthly downloads"
|
|
200
|
+
[pypi_downloads_lnk]: https://pypi.org/project/SqlDbWrpr/ "Monthly downloads"
|
|
201
|
+
[pypi_format_img]: https://img.shields.io/pypi/wheel/SqlDbWrpr "PyPI - Format"
|
|
202
|
+
[pypi_format_lnk]: https://pypi.org/project/SqlDbWrpr/ "PyPI - Format"
|
|
203
|
+
[pypi_py_versions_img]: https://img.shields.io/pypi/pyversions/SqlDbWrpr "PyPI - Supported Python Versions"
|
|
204
|
+
[pypi_py_versions_lnk]: https://pypi.org/project/SqlDbWrpr/ "PyPI - Supported Python Versions"
|
|
205
|
+
[pypi_release_img]: https://img.shields.io/pypi/v/SqlDbWrpr "Test status"
|
|
206
|
+
[pypi_release_lnk]: https://pypi.org/project/SqlDbWrpr/ "Test status"
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"poetry-core>=2.0.0,<3.0.0",
|
|
4
|
+
]
|
|
5
|
+
build-backend = "poetry.core.masonry.api"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = 'SQLDbWrpr'
|
|
9
|
+
version = '5.1.0'
|
|
10
|
+
description = 'Wrapper for importing CSV and Text files into MySQL and Postgress'
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Hendrik du Toit", email = "hendrik@brightedge.co.za" }
|
|
13
|
+
]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 6 - Mature",
|
|
16
|
+
"Framework :: Pydantic :: 2",
|
|
17
|
+
"Framework :: Pytest",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Operating System :: Microsoft :: Windows",
|
|
20
|
+
"Operating System :: POSIX :: Linux",
|
|
21
|
+
"Operating System :: iOS",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3.14",
|
|
27
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"pydantic-settings (>=2.12.0,<3.0.0)",
|
|
31
|
+
"csvwrpr (>=1.16.1,<2.0.0)",
|
|
32
|
+
"fixdate (>=2.1.0,<3.0.0)",
|
|
33
|
+
"mysql-connector (>=2.2.9,<3.0.0)",
|
|
34
|
+
"sqlalchemy (>=2.0.0,<3.0.0)",
|
|
35
|
+
"psycopg[binary] (>=3.2.0,<4.0.0)",
|
|
36
|
+
]
|
|
37
|
+
license = "MIT"
|
|
38
|
+
#license = "Proprietary"
|
|
39
|
+
license-files = ["LICENSE.txt"]
|
|
40
|
+
maintainers = [
|
|
41
|
+
{ name = "Hendrik du Toit", email = "hendrikdt@citiqprepaid.co.za" },
|
|
42
|
+
{ name = "Henru du Toit", email = "henru@brightedge.co.za" },
|
|
43
|
+
{ name = "Dirk du Toit", email = "dirk@brightedge.co.za" },
|
|
44
|
+
]
|
|
45
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
46
|
+
requires-python = ">=3.10,<3.15"
|
|
47
|
+
|
|
48
|
+
[project.urls]
|
|
49
|
+
# documentation = "https://readthedocs.org"
|
|
50
|
+
Issues = "https://github.com/BrightEdgeeServices/SqlDbWrpr/issues"
|
|
51
|
+
changelog = "https://github.com/BrightEdgeeServices/SqlDbWrpr/releases"
|
|
52
|
+
Homepage = "https://github.com/BrightEdgeeServices/SqlDbWrpr"
|
|
53
|
+
Repository = "https://github.com/BrightEdgeeServices/SqlDbWrpr.git"
|
|
54
|
+
|
|
55
|
+
[tool.black]
|
|
56
|
+
line-length = 120
|
|
57
|
+
target-version = [
|
|
58
|
+
"py310",
|
|
59
|
+
"py311",
|
|
60
|
+
"py312",
|
|
61
|
+
"py313",
|
|
62
|
+
"py314",
|
|
63
|
+
]
|
|
64
|
+
extend-exclude = """
|
|
65
|
+
(
|
|
66
|
+
^tests/testdata.py
|
|
67
|
+
)
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
[tool.codespell]
|
|
71
|
+
count = ""
|
|
72
|
+
quiet-level = 2
|
|
73
|
+
skip = "working/*,legacy/*,poetry.lock,tests/test_data/*"
|
|
74
|
+
ignore-words-list = "space-holder"
|
|
75
|
+
write-changes = ""
|
|
76
|
+
|
|
77
|
+
[tool.coverage.run]
|
|
78
|
+
source = [
|
|
79
|
+
"src",
|
|
80
|
+
"tests"
|
|
81
|
+
]
|
|
82
|
+
omit = [
|
|
83
|
+
"./legacy/*",
|
|
84
|
+
"tests/fixtures.py",
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
[tool.isort]
|
|
88
|
+
profile = "black"
|
|
89
|
+
src_paths = ["src", "tests"]
|
|
90
|
+
|
|
91
|
+
[tool.poetry.group.dev]
|
|
92
|
+
optional = true
|
|
93
|
+
|
|
94
|
+
[tool.poetry.group.dev.dependencies]
|
|
95
|
+
black = ">=25.1.0"
|
|
96
|
+
codecov = ">=2.1.13"
|
|
97
|
+
flake8 = ">=7.1.1"
|
|
98
|
+
isort = "^5.13.2"
|
|
99
|
+
mdformat-gfm = ">=0.4.1"
|
|
100
|
+
mdformat-frontmatter = ">=2.0.8"
|
|
101
|
+
mdformat-footnote = ">=0.1.1"
|
|
102
|
+
pluggy = ">=1.6.0,<2.0.0"
|
|
103
|
+
pre-commit = ">=4.0.1"
|
|
104
|
+
pygments = "^2.19.1"
|
|
105
|
+
pytest = ">=9.0.2"
|
|
106
|
+
pytest-cov = ">=6.0.0"
|
|
107
|
+
docker = ">=7.1.0"
|
|
108
|
+
twine = ">=6.1.0"
|
|
109
|
+
|
|
110
|
+
[[tool.poetry.source]]
|
|
111
|
+
name = "RTE"
|
|
112
|
+
url = "https://github.com/BrightEdgeeServices/PoetryPrivate.git"
|
|
113
|
+
priority = "explicit"
|
|
114
|
+
|
|
115
|
+
[tool.poetry.dependencies]
|
|
116
|
+
|
|
117
|
+
[tool.pytest.ini_options]
|
|
118
|
+
norecursedirs = ["tests/legacy"]
|
|
119
|
+
addopts = [
|
|
120
|
+
"-vv",
|
|
121
|
+
"--ignore-glob=*/Archive",
|
|
122
|
+
"--ignore=/legacy",
|
|
123
|
+
"--ignore=tests/legacy",
|
|
124
|
+
]
|
|
125
|
+
filterwarnings = [
|
|
126
|
+
# "ignore::DeprecationWarning",
|
|
127
|
+
]
|
|
128
|
+
pythonpath = [
|
|
129
|
+
"src",
|
|
130
|
+
"tests",
|
|
131
|
+
]
|
|
132
|
+
testpaths = "tests"
|
|
133
|
+
markers = [
|
|
134
|
+
"select: Run a selection of tests",
|
|
135
|
+
]
|