semvec/pypi-packages huggingface dataset:
cmm-16bit 0.1.7
Color management module
License: MIT
Keywords: color management

# cmm: Color Management Module based on lcms2. Not a full wrapper.

Color management is a kind of rocket science. You should be a specialist of ICC color management 
before struggling this module. You should be familiar with soft proofing, color conversion intent, gamut, etc. first.
These are the ABC of color management.
Please don't try to learn such deep knowledge from this module and document.

I don't want to repeat [lcms2](https://github.com/mm2/Little-CMS) document here.
This module is a thin wrapper of lcms2. Not a full wrapper, but covers most common usage.

## How to use

See `tests/test_from_python.py`. Advanced usage (partial profile and LUT) is not shown there. 
If you are informed enough to use it, you don't need any instruction.

`import faulthandler; faulthandler.enable()` is strongly recommended. There is no memory protection in this module.
You can easily make a segmentation fault.

To integrade to your product, `pip install cmm-16bit`. Be careful of `-16bit`. Just `cmm` is not mine.
If you do not need 16-bit per chanel, consider [ImageCms module](https://pillow.readthedocs.io/en/stable/reference/ImageCms.html) of Pillow.

## Versioning

It is the default versioning scheme of `setuptools-scm`. Commit and tag with a version number
when you need clean version.

## Build

Requires cmake. VS2022 for Windows, Homebrew for macOS, `sudo apt install python3.11-dev` for Ubuntu, etc.

Retrieve all submodules by `git submodule update --init`.

```
python -m pip install -U pip build
python -m build --wheel
```

For macOS, `MACOSX_DEPLOYMENT_TARGET=11 python -m build --wheel` is preferable.

The generated whl file should be found in `dist` directory. The wheel name is `cmm_16bit`.

## Unit testing

Build with `python -m build --wheel`. Do not forget `--wheel`. It generates `build` directory and `tests/test_from_python.py` uses the output.

`pip install pillow`

`python -m unittest .\tests\test_from_python.py`

## License

MIT License.
pip-weigh 0.1.0
Know the cost of your imports - Audit your dependencies before you commit
License: MIT
Requires Python: >=3.9
Keywords: analysis, dependencies, disk, pip, size, uv

# pip-weigh 📦⚖️

> *"Know the cost of your imports."*

A CLI tool that measures the true disk size of Python packages, including all their dependencies. Perfect for optimizing Docker images, Lambda functions, and understanding your dependency footprint.

## Features

- 🔍 **Accurate Size Analysis** - Measures the real disk footprint of packages and all dependencies
- 🌐 **Cross-Platform Analysis** - Check Linux package sizes from macOS/Windows (great for Docker planning)
- 🐍 **Python Version Support** - Analyze sizes across different Python versions
- 📊 **Beautiful Output** - Rich terminal output with dependency trees
- 🔄 **CI/CD Ready** - JSON output and budget checks for pipelines
- ⚡ **Fast** - Leverages uv's speed and caching

## Installation

```bash
pip install pip-weigh
```

Or with uv:
```bash
uv pip install pip-weigh
```

## Requirements

- Python 3.9+
- [uv](https://github.com/astral-sh/uv) must be installed and available in PATH

## Usage

### Basic Usage

```bash
pip-weigh pandas
```

Output:
```
Package: pandas (2.1.4)
├── Total Size: 138 MB
├── Self Size: 45 MB
└── Dependencies (Recursive):
    ├── numpy (1.26.2): 85 MB
    ├── pytz (2023.3): 5 MB
    └── python-dateutil: 3 MB
```

### Cross-Platform Analysis

Check what the size would be on Linux (great for Docker):

```bash
pip-weigh torch --platform linux
```

### Multiple Packages

```bash
pip-weigh pandas numpy requests
```

### JSON Output (for CI/CD)

```bash
pip-weigh pandas --json
```

### Budget Check

Fail if package exceeds a size limit:

```bash
pip-weigh pandas --budget 100MB
# Exit code 1 if exceeded
```

### Specify Python Version

```bash
pip-weigh pandas --python 3.12
```

## CLI Options

| Option | Short | Description |
|--------|-------|-------------|
| `--platform` | `-p` | Target platform (linux, macos, windows) |
| `--python` | | Python version to analyze (e.g., 3.11) |
| `--json` | `-j` | Output as JSON |
| `--budget` | `-b` | Maximum allowed size (e.g., 100MB, 1GB) |
| `--no-deps` | | Show only the package itself, not dependencies |
| `--verbose` | `-v` | Show detailed output |
| `--help` | `-h` | Show help message |

## How It Works

1. Creates a temporary isolated environment using uv
2. Installs the target package(s) with all dependencies
3. Parses `uv.lock` to get the complete dependency tree
4. Scans `.dist-info/RECORD` files for accurate file-to-package mapping
5. Calculates logical sizes (important for Docker/Lambda accuracy)
6. Presents results with a beautiful dependency tree

## Why Logical Size Matters

`uv` uses hardlinks from a global cache, so disk usage tools might show misleading numbers. `pip-weigh` always reports the **logical size** - the actual bytes your package would consume in a Docker image or cloud function.

## License

MIT