This is some boilerplate code that I commonly use in my database classes.
Description
There are a handful of things that I commonly use in my database classes, and I decided to put them in one spot.
insert_or_merge replicates the MERGE function in SQL. I mostly use SqlAlchemy in my database projects, and there is currently no MERGE function. This is really only tested in Sqlite and Sql Server. (https://github.com/sqlalchemy/sqlalchemy/issues/5441)
Logic to determine which dates have mot been processed. This makes it easier to run the script on a large set of days, and process any unprocessed days. If the server goes down, or the data flow stops working for some reason, this will back fill days. It makes the code more flexible.
Note
This project has been set up using PyScaffold 4.0.2. For details and usage information on PyScaffold see https://pyscaffold.org/.
Release files for databasebaseclass 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| databasebaseclass-0.1.1.tar.gz | 14.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| databasebaseclass-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / databasebaseclass-0.1.1.tar.gz
| Download URL | databasebaseclass-0.1.1.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d59164060c7d563a2f7c95ed910b04c545f168bb1edb9ec72111aefca1876a8
|
|
BLAKE2b-256 checksum How to use checksums |
87cb937cd8dda0abef8aec319424ea2066b061a98e5808293cc0f41d8e9f4454
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.0
|
Release files / databasebaseclass-0.1.1-py2.py3-none-any.whl
| Download URL | databasebaseclass-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9be41413083064a83ec8c8b7628a2daeb6610561d37a4fb88f0126b6c55a0efc
|
|
BLAKE2b-256 checksum How to use checksums |
ecc0f38634e3e0ad30f7faa8df1a9fc999da533eedba28e2d00209a739629af4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.0
|