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

Metadata

Release files for pyci-check 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyci-check 0.3.5
File Size Uploaded
pyci_check-0.3.5.tar.gz 131.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyci-check 0.3.5
File Interpreter ABI Platform
pyci_check-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 191.0 kB

Release files / pyci_check-0.3.5.tar.gz

Download URL pyci_check-0.3.5.tar.gz
Size 131.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1e40f9b153573be76274a1593b451a797a035bed0f7c0fa36e6750793b89df45
BLAKE2b-256 checksum
How to use checksums
103f3296a81d0e522c76a99cd7d4d03c0f13ad15fe75e96ffe2db3f703ccff62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyci_check-0.3.5-py3-none-any.whl

Download URL pyci_check-0.3.5-py3-none-any.whl
Size 59.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfa74eb54657692aa7da2f10ce66238db3de85a84659a480b8dbf4997690ff21
BLAKE2b-256 checksum
How to use checksums
c29b6c38511a4b526ff6284bf5480e434fcd40386e33c4e58218a16b9fab843c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page