boring-utils
For every project involving data, there's a lot of tedious repetitive work that goes into it, which results in the creation of reusable scripts that greatly automate the process for you. What if instead of copy and pasting these files into new projects, there was one library that simplified things, and get solutions done through one line of code?
Introducing boring-utils — a Python library focused on simplifying tedious, boring tasks involving data management, such as downloading files, managing datasets, storing and retrieving data in various formats, and much more.
📦 Installation
Using pip
To install boring-utils using pip, run the following command:
pip install boring-utils
Using uv (Recommended)
If you're using uv, the modern Python package installer, you can install boring-utils with:
uv pip install boring-utils
Or if you're using uv as a project manager:
uv add boring-utils
Requirements
- Python >= 3.13
- Dependencies:
pandas >= 3.0.2— Data manipulation and analysisrequests >= 2.33.1— HTTP requests for downloading files
✨ Main Features
1. Data Collection 🔽
Easily download and manage files from the web:
- Download single files with progress tracking
- Download multiple files in batch operations
- Automatic filename detection from HTTP headers or URLs
- Unzip archives automatically
Example:
from boring_utils.data.data_collecting import download_file, download_several_files
from pathlib import Path
# Download a single file
download_file("https://example.com/data.csv", Path("./data"))
# Download multiple files
urls = [
"https://example.com/file1.zip",
"https://example.com/file2.csv"
]
download_several_files(urls)
2. Data Storage 💾
Save and load data in multiple formats with a unified interface:
- JSON — Store structured data with customizable indentation
- Pickle — Python object serialization
- CSV — Tabular data format
- Parquet — Efficient columnar storage
- YAML & XML — Structured data formats
Example:
from boring_utils.data.data_storage import save_json, save_csv, load_json
from pathlib import Path
# Save data as JSON
data = {"name": "John", "age": 30}
save_json(data, "output.json")
# Load data from JSON
loaded = load_json("output.json")
3. Helper Utilities 🔧
- Path Management — Preconfigured directories for organized data storage
- Constants — Predefined file extensions and default HTTP headers
- Directory Utilities — Automatic directory creation and validation
Example:
from boring_utils.helpers._paths import DATA_DIRECTORY_PATH
from boring_utils.helpers.constants import DATA_EXTENSIONS
print(f"Data directory: {DATA_DIRECTORY_PATH}")
print(f"Supported formats: {DATA_EXTENSIONS}")
4. Network Utilities 🌐
- Default headers for HTTP requests
- User-Agent configuration — Avoid blocking by providing proper headers
- Extensible networking features for data collection
🚀 Quick Start
import pandas as pd
from boring_utils.data import data_collecting, data_storage
from pathlib import Path
# Download a CSV file
data_collecting.download_file(
"https://example.com/dataset.csv",
dest_path=Path("./data/my_dataset.csv")
)
# Load and process with pandas
df = pd.read_csv("./data/my_dataset.csv")
# Save processed data
data_storage.save_json(df.head().to_dict(), "sample.json")
📚 Documentation
For detailed documentation on each module, please refer to the docstrings in the source code or check the GitHub repository.
🤝 Contributing
We welcome contributions! Please read our CONTRIBUTING.md for guidelines on how to contribute to this project.
📝 License
This project is licensed under the terms specified in the LICENSE file.
PyPi Page
This project is also available in the PyPI page.
Metadata
Release files for boring-utils 0.2.0
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 |
|---|---|---|---|---|
| boring_utils-0.2.0.tar.gz | 10.6 kB | Without provenance | Details for boring_utils-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| boring_utils-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for boring_utils-0.2.0-py3-none-any.whl |
Total release size: 20.8 kB
Release files / boring_utils-0.2.0.tar.gz
| Download URL | boring_utils-0.2.0.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e82ef6be1a9d488a4f2fb56f5080e8746e9807abb050c3aad560405b576a9a0f
|
|
BLAKE2b-256 checksum How to use checksums |
bca4ca10a750b73f76bdbec0c791ea55fd89fdd1ecad782760d19196dbb5d0aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / boring_utils-0.2.0-py3-none-any.whl
| Download URL | boring_utils-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d83e6de2fd919ce31924d9d1a791763fa85a8ab1ba47c0b7c536dded25f2efa
|
|
BLAKE2b-256 checksum How to use checksums |
fe2a660353818b1e5116a8d6b63d73bcd23eb1559c23edfaf75f38231af8df2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for boring-utils 0.2.0
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.