skillfed

exit-codes

Platform-independent exit codes.

exit-codes v1.3.0 362.2K downloads/30d#7,234 on PyPI6
Permissive license MIT Abandoned released

What it is and what it does

exit_codes is a minimal library that exposes Unix-style exit status codes as Python constants, solving the problem that Python's os module only provides these codes on Unix platforms. It lets you write portable scripts that return meaningful exit codes across Windows, macOS, and Linux without platform-specific conditionals.

The package is straightforward: import ExitCode and use its attributes (OK, IO_ERR, and others) in your main() function or script exit logic. It has no runtime dependencies and installs as a pure Python wheel, making it lightweight. However, the project has not been updated since July 2019 and is marked abandoned, so it will not receive maintenance or adapt to future Python changes.

Use it for:

  • CLI tools that need to return standard exit codes consistently across Windows and Unix systems
  • Scripts that wrap system utilities and must propagate meaningful exit statuses to calling processes
  • Testing frameworks or build tools that rely on exit codes to signal success or specific failure modes
  • Cross-platform Python applications where exit code semantics matter to shell scripts or CI/CD pipelines

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides platform-independent exit codes for Python programs, making Unix exit status codes available consistently across all platforms.

Yes, if you need cross-platform exit codes and can accept that the package is no longer maintained. The library is simple, has no dependencies, and the exit code constants are unlikely to change. Install it only if you're comfortable with a frozen codebase and confident the constants match your needs; for new projects, consider whether you can define your own exit codes or use a more actively maintained alternative.

Install

exit-codes on PyPI

pip

pip install exit-codes

uv

uv add exit-codes

poetry

poetry add exit-codes

Installing exit-codes

Before you install

Installation is frictionless with no runtime dependencies and a pure-Python wheel distribution. However, the package has been abandoned since 2019 with no updates in over six years, so it will not receive bug fixes or maintenance.

License in practice

MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

from exit_codes import ExitCode

if operation_succeeds():
    exit(ExitCode.OK)
else:
    exit(ExitCode.IO_ERR)

Verify before relying

  • Whether the exit code constants match current Unix standards or have diverged since the last 2019 release
  • Compatibility with modern Python versions beyond what the unspecified support statement indicates

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,593 days since the last release
Last repo commit
First released
Downloads 362,171/month — #7,234 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: exit_codes-1.3.0-py2.py3-none-any.whl

Development Status :: 3 - AlphaOperating System :: OS IndependentProgramming Language :: Python

Tags

cross-platform exit codesexit status constantsplatform-independent exit codesunix exit codes pythonstandardized exit codesexit code constantsportable exit codes
exit-codescross-platform

More Utilities packages