Skip to main content

File Safety & Integrity CLI — validate files, detect blank content, and scan for viruses in one command.

Project description

uplint

File Safety & Integrity CLI — validate files, detect blank content, and scan for viruses in one command.

uplint inspects files the way a strict upload pipeline would: it checks that a file's real structure matches its extension, flags blank or empty documents, and (with ClamAV) scans for malware — locally or across an S3 bucket.

Installation

pip install uplint

To enable S3 bucket scanning, install the optional extra:

pip install "uplint[s3]"

Requires Python 3.11+. Virus scanning requires a running ClamAV daemon (clamd).

Quick start

# Validate a single file
uplint validate report.pdf

# Scan a whole directory
uplint scan ./uploads

# Watch a directory and validate new files as they arrive
uplint watch ./incoming

# Scan an S3 bucket (requires the [s3] extra)
uplint s3-scan my-bucket --prefix uploads/

Commands

Command What it does
uplint validate <file> Validate a single file's structure, content, and (optionally) malware.
uplint scan <dir> Recursively validate every file in a directory.
uplint s3-scan <bucket> Validate objects in an S3 bucket (needs uplint[s3]).
uplint watch <dir> Watch a directory and validate files as they are added or changed.

Run uplint --help or uplint <command> --help for all options.

What it checks

  • Structural validation — the file's binary structure matches its declared type (a .pdf really is a PDF, a .jpg has valid JPEG markers, and so on), catching corrupt files and polyglots.
  • Blank / empty detection — PDFs with no readable text, spreadsheets with no data rows, single-color images, and whitespace-only text files.
  • Virus scanning — malware, embedded scripts, and known exploit patterns via ClamAV.

Output & exit codes

Results print as a table by default, or as JSON with --json for CI/CD. uplint exits non-zero when any file fails validation, so it drops straight into a pipeline:

uplint scan ./uploads --json || exit 1

Documentation

Full docs, including S3 tuning and CI/CD integration, live at https://docs.uplint.dev.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uplint-0.1.0.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uplint-0.1.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file uplint-0.1.0.tar.gz.

File metadata

  • Download URL: uplint-0.1.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for uplint-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9a8343662ce649720e50d3bdec94f2af833b94ac209116eafe4fd9a06c1777d1
MD5 d7d054b673f24dfac80b9e58ce6f91aa
BLAKE2b-256 1a3feba1b522f11bb6b5788a6b299018081b1e5d0ded47e9ddf845a7130de8fd

See more details on using hashes here.

File details

Details for the file uplint-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: uplint-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for uplint-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 244ea6e7dbd7ff67531ab27e50f4da0897b95c2faf57f3539bea28a7dcfb7c98
MD5 92cb21751ff71f2172f54b19353bbf7e
BLAKE2b-256 02e07c6ab3de421868e8fcfbed3f79a6748649e535ff979635b596cbf27b0101

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page