Metadata-Version: 2.4
Name: modelvet
Version: 0.1.0
Summary: Verify-before-load structural validation for GGUF and safetensors model files
Author: AgenC (tetsuo-ai)
License-Expression: MIT
Project-URL: Homepage, https://github.com/tetsuo-ai/modelvet
Project-URL: Changelog, https://github.com/tetsuo-ai/modelvet/blob/main/CHANGELOG.md
Keywords: gguf,safetensors,security,validation,model-files,llm
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# modelvet (Python binding)

Verify-before-load structural validation for GGUF and safetensors model
files. ctypes binding over the [modelvet C
library](https://github.com/tetsuo-ai/modelvet): fixed memory, checked
arithmetic, bounded work, no allocation inside the validator.

```python
import modelvet

report = modelvet.verify_path("model.safetensors")
if not report.accepted:
    print(report.violation_name, report.violation, hex(report.offset))
```

A malformed file is a normal result: a `Report` with a REJECT verdict
and the first precise violation, not an exception. Exceptions are
reserved for API misuse (`ModelvetArgumentError`), arena exhaustion
(`ModelvetArenaError`), and a missing native library.

An ACCEPT verdict is structural only: it says nothing about model
behavior, provenance, or poisoned weights. See the project's
INTEGRATION.md for the full contract.

## Native library resolution

1. `MODELVET_LIBRARY` (path to a shared library; `make shared` in the
   repository builds `build/libmodelvet.so`),
2. the packaged `modelvet/_native` module built from the vendored
   amalgamation at install time,
3. a system `libmodelvet` found by `ctypes.util.find_library`.

If the library was built with raised `MVET_MAX_*` caps, set
`MODELVET_ARENA_BYTES` to at least its recomputed worst-case bound.

MIT. Copyright (c) 2026 AgenC (tetsuo-ai).
