semvec/pypi-packages huggingface dataset:
fw-utils 5.1.1
Common Flywheel helper utilities.
Requires Python: <4,>=3.9
Keywords: Flywheel, helper, utility

# 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:

```bash
poetry add fw-utils
```

## Usage

```python
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`:

```bash
poetry install
pre-commit install
```

## License

[![MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
foxkit 0.0.6
工具盒子
Requires Python: >=3

```python-repl
from foxkit.file.excel import Sink2Excel,Row,Cell,CellDataType

if __name__ == '__main__':
  
    with Sink2Excel() as sink:
        sink.write(
            headers=Row(Cell(val='ID'),Cell(val='头像'),Cell(val='名称'),Cell(val='年龄')),
            rows=[
                Row(Cell(val='1001'),Cell(val='https://pic.cnblogs.com/face/83005/20250225134909.png',data_type=CellDataType.PIC),Cell(val='章三'),Cell(val=18)),
                Row(Cell(val='1001'),Cell(val='https://pic.cnblogs.com/face/2124951/20211014230234.png',data_type=CellDataType.PIC),Cell(val='章三'),Cell(val=18)),
                Row(Cell(val='1001'),Cell(val='https://pic.cnblogs.com/face/2124951/20211014230234.png',data_type=CellDataType.PIC),Cell(val='章三'),Cell(val=18)),
                Row(Cell(val='1001'),Cell(val='https://pic.cnblogs.com/face/2124951/20211014230234.png',data_type=CellDataType.PIC),Cell(val='章三'),Cell(val=18))

            ],
            sheet_name='用户信息',
            sequence=True
        )
        sink.sink_file('./test.xlsx')
```