This is some boilerplate code that I commonly use in my database classes.
Project description
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/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file databasebaseclass-0.1.1.tar.gz
.
File metadata
- Download URL: databasebaseclass-0.1.1.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d59164060c7d563a2f7c95ed910b04c545f168bb1edb9ec72111aefca1876a8 |
|
MD5 | f0d3816096e4fe78b09d14ef7b9b52be |
|
BLAKE2b-256 | 87cb937cd8dda0abef8aec319424ea2066b061a98e5808293cc0f41d8e9f4454 |
File details
Details for the file databasebaseclass-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: databasebaseclass-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9be41413083064a83ec8c8b7628a2daeb6610561d37a4fb88f0126b6c55a0efc |
|
MD5 | 6155d62116909c0c66de7d85cc961273 |
|
BLAKE2b-256 | ecc0f38634e3e0ad30f7faa8df1a9fc999da533eedba28e2d00209a739629af4 |