---
title: "exit-codes | pypx"
description: "Platform-independent exit codes."
canonical_url: "https://pypx.app/packages/exit-codes"
meta:
  "og:description": "Platform-independent exit codes."
  "og:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_exit-codes%2Cversion_1.3.0%2Csummary_Platform-independent%2Bexit%2Bcodes.%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9leGl0LWNvZGVzIg%2Cs_Ut9r8c-paf1KsDkM.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "exit-codes 1.3.0"
  "twitter:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_exit-codes%2Cversion_1.3.0%2Csummary_Platform-independent%2Bexit%2Bcodes.%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9leGl0LWNvZGVzIg%2Cs_Ut9r8c-paf1KsDkM.png"
---

> Index of every page on this site: [llms.txt](https://pypx.app/llms.txt)

# **exit-codes**

v1.3.0

Platform-independent exit codes.

5 KBpy2.py3-none-anyMIT2 deps Likely Unmaintained

[**Diff **](https://pypx.app/packages/exit-codes/diff)

`$ uv add exit-codes`

\============

# exit\_codes

Platform-independent exit codes.

Python provides standard exit status codes for some platforms, but not all. This is technically, pedantically correct, but it makes it awkward to provide practical cross-platform exit statuses. This package takes the exit status codes defined in os for Unixes and make them available to the unwashed masses.

It's simple to use:

```python
from exit_codes import ExitCode

def main():
    if big_operation():
        # If your program exits normally, return OK
        return ExitCode.OK
    else:
        # Otherwise, return the appropriate error code
        return ExitCode.IO_ERR
```

## **Details **

<dl>

<dt>Version</dt>
<dd>1.3.0</dd>

<dt>License</dt>
<dd>MIT</dd>

<dt>Maintainer</dt>
<dd>Sixty North AS</dd></dl>

## **Links**

- [Homepage](http://github.com/sixty-north/exit-codes)
- [View on PyPI](https://pypi.org/project/exit-codes/)

## **Maintainers **

- Sixty North AS · [austin@sixty-north.com](mailto:austin@sixty-north.com)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pypx.app/#website","@type":"WebSite","description":"The Python Package Index, reimagined. Fast search, dependency insights, download trends, and changelogs — all in one place.","name":"pypx","url":"https://pypx.app/"},{"@id":"https://pypx.app/packages/exit-codes#webpage","@type":"WebPage","description":"Platform-independent exit codes.","name":"exit-codes","url":"https://pypx.app/packages/exit-codes","isPartOf":{"@id":"https://pypx.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://pypx.app/packages/exit-codes"]}]},{"@id":"https://pypx.app/packages/exit-codes#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"Platform-independent exit codes.","license":"MIT","name":"exit-codes","softwareVersion":"1.3.0"}]}
```

## Sitemap

See the full [sitemap](https://pypx.app/sitemap.md) for all pages.
