Metadata-Version: 2.4
Name: onnx-card
Version: 0.1.0
Summary: Fast, accurate, terminal-first ONNX model cards — describe what's inside an ONNX model without running it.
Project-URL: Homepage, https://github.com/boijuny/onnx-card
Project-URL: Repository, https://github.com/boijuny/onnx-card
Project-URL: Issues, https://github.com/boijuny/onnx-card/issues
Author: Matthieu Marchal
License: MIT License
        
        Copyright (c) 2024
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
License-File: LICENSE
Keywords: cli,machine-learning,model-inspection,onnx,terminal
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: onnx>=1.14
Requires-Dist: rich>=13
Description-Content-Type: text/markdown

# onnx-card

Provide a fast, accurate, terminal-first “ONNX card” describing what is inside an ONNX model — without running it.

`onnx-card` loads an ONNX model and prints a clean, colorized card showing:
- Model name and metadata (opset, IR version)
- Entrypoint inputs and outputs (with shapes and dtypes)
- Operator counts and statistics

Built for:
- quick inspection
- terminal-first workflows
- scripting and CI usage

---

## Installation

From source (development):

```bash
pip install -e .
````

Once published on PyPI:

```bash
pip install onnx-card
```

---

## Usage

Basic usage:

```bash
onnx-card model.onnx
```

Limit output to top operators:

```bash
onnx-card model.onnx --top 10
```

Sort alphabetically instead of by count:

```bash
onnx-card model.onnx --sort name
```

Select which tables to display:

```bash
onnx-card model.onnx --show io          # Only inputs/outputs
onnx-card model.onnx --show operators   # Only operator counts
onnx-card model.onnx --show all         # Everything (default)
```

JSON output (for scripts / CI):

```bash
onnx-card model.onnx --json
```

You can also run it as a module:

```bash
python -m onnx_card model.onnx
```

---

## Requirements

* Python ≥ 3.9
* `onnx`
* `rich`

---

## License

MIT
