Skip to main content

pyci-check

Fast Python syntax and import checker designed for CI/CD and Git hooks.

Features

  • High-performance parallel processing - Uses ThreadPoolExecutor
  • 🔍 Dual-layer checking - Syntax (AST) + Import (static/dynamic)
  • 🎯 Flexible scope - Check entire project, directories, or specific files
  • 🔧 Auto-integrates ruff config - Reads from pyproject.toml
  • 🪝 Git hooks support - Append mode, preserves existing hooks
  • 📦 Zero external dependencies - Uses only Python standard library
  • 🌐 Multi-language - English, Traditional Chinese, Simplified Chinese

Installation

pip install pyci-check

Or with uv (recommended):

# Preferred (adds to pyproject.toml)
uv add pyci-check

# Or direct install
uv pip install pyci-check

Quick Start

# Check entire project (syntax + import static analysis)
pyci-check check

# Check syntax only
pyci-check syntax

# Check imports (static, safe)
pyci-check imports

# Install Git pre-commit hook
pyci-check install-hooks

Main Commands

  • check [paths...] - Run all checks (syntax + import)
  • syntax [paths...] - Check Python syntax only
  • imports [paths...] - Check import dependencies only
  • install-hooks - Install Git hooks (append mode)
  • uninstall-hooks - Remove pyci-check's Git hooks

Common Options

  • --quiet - Reduce output
  • --fail-fast - Stop on first error
  • --venv PATH - Specify virtual environment
  • --i-understand-this-will-execute-code - Enable dynamic import checking

Configuration

Configure in pyproject.toml:

[tool.pyci-check]
language = "en"  # or "zh_TW", "zh_CN"
import-timeout = 30

# Auto-reads ruff config
[tool.ruff]
src = ["src", "tests"]
exclude = [".venv", "build", "dist"]

Documentation

Full documentation available on GitHub:

CI/CD Integration

GitHub Actions

- name: Check Python syntax and imports
  run: |
    pip install pyci-check
    pyci-check check

With ruff

pyci-check check      # Syntax + import checking
ruff check --fix        # Lint + auto-fix
ruff format             # Format

License

MIT License

Links

Download files

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

Source Distribution

pyci_check-0.3.3.tar.gz (126.3 kB view details)

Uploaded Source

Built Distribution

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

pyci_check-0.3.3-py3-none-any.whl (56.9 kB view details)

Uploaded Python 3

File details

Details for the file pyci_check-0.3.3.tar.gz.

File metadata

  • Download URL: pyci_check-0.3.3.tar.gz
  • Upload date:
  • Size: 126.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyci_check-0.3.3.tar.gz
Algorithm Hash digest
SHA256 a7b8690fd64d70663fa2d8dcbee2bdffa0c39f935334605da9bedab2c521ad2c
MD5 27f7d153a9734948e8f4bf410664431a
BLAKE2b-256 90572d7fd6f2703cd842d548d6da4f624d9915ea4b076d265c65f3a48e7a50fd

See more details on using hashes here.

File details

Details for the file pyci_check-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: pyci_check-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 56.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyci_check-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 60f16641914f1e894aa6f6e283f8f29aa8b86cbb440b2605cd42c8d6b962a726
MD5 ca9b65f86cc6e7b73792db070cf4545c
BLAKE2b-256 ec9738f16ec622eca8c5f432277cc8ecfbc3ceb6999f9cd6e8bd8349e12fe59c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.4

2 files

This release

0.3.3 This release

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.5

2 files

0.1.4

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

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