Skip to main content

fw-utils

Helper utilities for common tasks including pluralization, formatting and parsing human-readable file-sizes/time-deltas, creating attribute-accessible dictionaries and opening files.

Installation

Add as a poetry dependency to your project:

poetry add fw-utils

Usage

import fw_utils

# common string formatters
fw_utils.pluralize("file") == "files"
fw_utils.quantify(3, "file") == "3 files"
fw_utils.hrsize(1024) == "1.0K"
fw_utils.hrtime(90) == "1h 30m"

# get a dictionary with keys accessible as attrs
data = fw_utils.attrify({"key": "value"})
data.key == "value"

# File works with str|Path|file-like objects alike
with fw_utils.BinFile("/tmp/test.txt", write=True) as file:
    file.write(b"text")

Development

Install the project using poetry and enable pre-commit:

poetry install
pre-commit install

License

MIT

Metadata

Release files for fw-utils 6.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fw-utils 6.0.0
File Interpreter ABI Platform Actions
fw_utils-6.0.0-py3-none-any.whl Python 3 none any Details for fw_utils-6.0.0-py3-none-any.whl

Release files / fw_utils-6.0.0-py3-none-any.whl

Download URL fw_utils-6.0.0-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ca268a2505989c093fbe0c00ce664825f32b4785fe0229ff09985b799f6ceee
BLAKE2b-256 checksum
How to use checksums
3dd4e6feaa9dbc5749be765b4f4a78dfc4d3025760778507e8b00f139397fffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Alpine Linux","version":"3.25.0_alpha20260805","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fw-utils 6.0.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.

Release history Release notifications | RSS feed

This release

6.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page