al-data-utils
Reusable Python utilities for data and automation workflows.
This repository contains independent utility modules for sync operations, git automation, SQL work, logging helpers, and MSSQL schema snapshot generation.
Python and Setup
- Python: 3.10+
- Packaging: setuptools (src layout)
Install locally in editable mode:
pip install -e .
Project Structure
- src/al_data_utils
- examples
- development_guides
- tools
Main utility groups under src/al_data_utils:
- airflow_utils
- backup_utils
- config_utils
- files_sync_utils
- geo_utils
- git_utils
- logging_utils
- ones_api_utils
- sql_utils
- tg_utils
Examples
Runnable examples are available in the examples folder for the main utility groups.
Use them as reference implementations for local scripts and automation jobs.
MSSQL Schema Snapshot
The snapshot tool exports SQL objects from MSSQL into a filesystem layout and syncs staging output to destination folders.
Current behavior highlights:
- Supports single DB and multi-DB runs in one execution.
- Always writes outputs into per-DB folders.
- Uses staging first, then syncs to final output.
- Supports cleanup of staging folders.
- Supports sync log retention cleanup.
- Supports include and exclude filters per object type.
- Supports DataGrip template override files.
Output shape:
<MSSQL_OUT_DIR>/<DatabaseName>/schemas/<schema>/
tables/
views/
routines/
sequences/
synonyms/
Snapshot Environment Variables
Core connection and output:
- MSSQL_OUT_DIR
- MSSQL_SERVER
- MSSQL_DATABASE
- MSSQL_DATABASES
- MSSQL_AUTH_MODE
- MSSQL_USER
- MSSQL_PASSWORD
- MSSQL_DRIVER
Snapshot behavior:
- MSSQL_ENABLE_TABLE_DEFINITIONS
- MSSQL_ENABLE_INDEXES
- MSSQL_ENABLE_FOREIGN_KEYS
- MSSQL_ENABLE_VIEWS
- MSSQL_ENABLE_STORED_PROCEDURES
- MSSQL_ENABLE_FUNCTIONS
- MSSQL_ENABLE_SEQUENCES
- MSSQL_ENABLE_SYNONYMS
- MSSQL_CLEANUP_STAGING
- MSSQL_SYNC_LOG_RETENTION_DAYS
Filters:
- MSSQL_INCLUDE_SCHEMAS
- MSSQL_EXCLUDE_SCHEMAS
- MSSQL_INCLUDE_TABLES
- MSSQL_EXCLUDE_TABLES
- MSSQL_INCLUDE_VIEWS
- MSSQL_EXCLUDE_VIEWS
- MSSQL_INCLUDE_STORED_PROCEDURES
- MSSQL_EXCLUDE_STORED_PROCEDURES
- MSSQL_INCLUDE_FUNCTIONS
- MSSQL_EXCLUDE_FUNCTIONS
- MSSQL_INCLUDE_SEQUENCES
- MSSQL_EXCLUDE_SEQUENCES
- MSSQL_INCLUDE_SYNONYMS
- MSSQL_EXCLUDE_SYNONYMS
Notes:
- If MSSQL_DATABASES is set, it is treated as a comma-separated list.
- If MSSQL_DATABASES is empty, MSSQL_DATABASE is used.
- If MSSQL_DATABASE contains commas, it is also treated as a list for backward compatibility.
File Sync Utilities
files_sync_utils provides:
- Inventory building
- Plan generation
- Copy and update execution
- Extra destination cleanup rules
- Activity CSV logging
- Log retention cleanup
Git Utilities
git_utils wraps common git automation operations with consistent behavior and error handling.
Development Guides
- development_guides/dev_guide.txt
- development_guides/auth_key_guide.txt
These guides contain release flow notes and auth-related instructions.
Changelog
See CHANGELOG.md for release notes.
Metadata
Release files for al-data-utils 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| al_data_utils-0.3.1.tar.gz | 51.3 kB | Without provenance | Details for al_data_utils-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| al_data_utils-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for al_data_utils-0.3.1-py3-none-any.whl |
Total release size: 116.6 kB
Release files / al_data_utils-0.3.1.tar.gz
| Download URL | al_data_utils-0.3.1.tar.gz |
|---|---|
| Size | 51.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23e152ff93b47b9d8b71c8d3792db7f30b4b041c1e8566c81c339f83479c75aa
|
|
BLAKE2b-256 checksum How to use checksums |
d9de2eeb22d0f2dd58d4c5ea7d8091220423c49eb37262d55b33f8aa7891f2ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / al_data_utils-0.3.1-py3-none-any.whl
| Download URL | al_data_utils-0.3.1-py3-none-any.whl |
|---|---|
| Size | 65.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc525f95ce697a2759297990434e2df534b5848486495dd6801d78eb13f17636
|
|
BLAKE2b-256 checksum How to use checksums |
36608b0a6738f7384d369480e5c9cc4c7679482697f93277beae47a176312116
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for al-data-utils 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.