https://github.com/alexdemure/gadutils
A lightweight utility library for building clean and reusable data manipulation functions.
https://github.com/alexdemure/gadutils
python python-types python-typing
Last synced: 5 days ago
JSON representation
A lightweight utility library for building clean and reusable data manipulation functions.
- Host: GitHub
- URL: https://github.com/alexdemure/gadutils
- Owner: AlexDemure
- License: mit
- Created: 2025-04-10T08:59:23.000Z (about 1 month ago)
- Default Branch: production
- Last Pushed: 2025-04-15T07:04:36.000Z (about 1 month ago)
- Last Synced: 2025-04-23T21:02:14.471Z (27 days ago)
- Topics: python, python-types, python-typing
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A utility library for building clean and reusable data manipulation functions.---
Utility Python library that centralizes all your data manipulation logic into one clean and structured place.
Instead of scattering helper functions across the codebase, it organizes them by data type — such as strings, decimals, dates, and more — making your application easier to maintain, test, and extend.- Centralized and consistent data utilities
- Cleaner imports — no more `from datetime import datetime` vs `import datetime as dt`
- Reduces boilerplate and external dependencies
- Makes utility logic reusable, testable, and predictable## Installation
```
pip install gadutils
```## Usage
```python
from gadutils import strings, dates, decimals, fields, json, lists, paths, urlsprint(strings.kebab("Hello World")) # hello-world
date = dates.now()
print(dates.formatiso(date)) # "2025-04-10T12:34:56.789012+0000"print(paths.current()) # "/home/user/project"
print(paths.define()) # "/home/user/project"
print(paths.define("/tmp")) # "/tmp"print(decimals.add(10.25, 5.75)) # Decimal('16.00')
print(decimals.split(100.05, 3)) # [Decimal('33.35'), Decimal('33.35'), Decimal('33.35')]print(lists.unique([1, 2, 2, 3, 1])) # [1, 2, 3]
print(lists.flatten([[1, 2], [3, [4]]])) # [1, 2, 3, 4]
```