Helpers for maintaining type-II Slowly Changing Dimensions
Project description
Type 2
Provides a simple set of utility functions for dealing with change management for datasets based on lists of dictionaries.
Example Usage: TypeTwo
rows = [
{"id" : 1, "name" : "Henry", "age" : 34}
{"id" : 2, "name" : "Fred", "age" : 42}
]
history = TypeType(rows, RowKey("id"), from_field = "start", to_field = "end")
history += {"id" : 1, "name" : "Henry", "age" : 37}
iter(history)
>>> {"id" : 1, "name" : "Henry", "age" : 34, "start": datetime(1900,1,1), "end": datetime(2022,6,12)}
>>> {"id" : 1, "name" : "Henry", "age" : 37, "start": datetime(2022,6,12), "end": datetime(2999,12,31)}
>>> {"id" : 2, "name" : "Fred", "age" : 42, "start": datetime(1900,1,1), "end": datetime(2999,12,31)}
history += {"id" : 1, "name" : "Henry", "age" : 37}
changes = [
{"id" : 1, "name" : "Henry", "age" : 99}
{"id" : 2, "name" : "Fred", "age" : 99}
]
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
typetwo-1.0.0.tar.gz
(6.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file typetwo-1.0.0.tar.gz.
File metadata
- Download URL: typetwo-1.0.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9a77e4debbe51516e34cdf1f56a78e98feee518452add591510696cdfcb7d08
|
|
| MD5 |
c56ebe7adf63619af5dfa4d75dc9323d
|
|
| BLAKE2b-256 |
a9bdaf951a0c06e9371098d7dcf74b6e0cb2bae4d36ffc6a8a2c8410b1723bef
|
File details
Details for the file typetwo-1.0.0-py3-none-any.whl.
File metadata
- Download URL: typetwo-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e705ff7cf6a2908e2ed81f46d7eac9180810ae6ed1d47f201a84c659b009467d
|
|
| MD5 |
7b9b9123bb810d7b8608ea941dfe9a0f
|
|
| BLAKE2b-256 |
b872792db8c48bd142e83f9ff3bfa80eb416728a42d17e69ea234e4512909ab0
|