ntstatus
Python enum for NTSTATUS from WinAPI, supporting comparision to both signed and unsigned integers
Decision gist · record as of 2026-08-14
Yes, if you are writing Windows interop code in Python and need to work with NTSTATUS, Win32 Error, or HRESULT values. The library is lightweight, dependency-free, and solves a real friction point in Windows API integration. However, note that maintenance is aging—the last update was 2025-06-11 with no recent activity, so treat it as stable but not actively developed.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with no runtime dependencies.
- Maintenance status is aging—last commit was 2025-06-11 and the project has not been updated in several months, though the repository remains active and not archived.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2025-06-11 (429 days) · last repo commit 2025-06-11
0 known vulnerabilities (OSV.dev, 2026-08-14) · 144,527 downloads/mo, #11,149 on PyPI
Alternatives
Verify before relying
from ntstatus import NtStatus
# Decode a status code by numeric value
status = NtStatus.decode(0xC0000135)
print(status.name) # STATUS_DLL_NOT_FOUND
print(status.signed_value) # -1073741515
print(status.unsigned_value) # 3221225781- Whether the package is actively maintained or in maintenance-only mode—last update was 2025-06-11 with no recent activity signal.
- Real-world adoption and stability—144527 monthly downloads suggests some use, but project visibility (0 GitHub stars) is unclear.
What it is and what it does
ntstatus is a reference library that maps Windows API status codes to Python constants and provides bidirectional lookup methods. It defines three main classes—NtStatus, Win32Error, and HResult—each exposing a complete or near-complete set of named constants from the Windows API documentation. Each constant is represented as a ThirtyTwoBits object that can be compared to integers using either their signed or unsigned interpretation, solving the common problem of matching numeric error codes returned by Windows APIs to their symbolic names.
The library is designed for developers working with ctypes, pywin32, or other Windows interop layers who need to decode error codes or check status values against known constants. It has no runtime dependencies and installs cleanly. The package supports Python 3.10 through 3.13 and is licensed under MIT, making it freely usable in any project.
Use it for
- Decode numeric NTSTATUS values returned by Windows system calls into human-readable constant names for logging or error handling.
- Compare Win32 error codes against known constants without manual hex-to-decimal conversion or sign-extension logic.
- Look up HRESULT values by numeric code in COM interop or Windows API wrapper code to identify failure reasons.
- Build Windows system diagnostics or monitoring tools that need to interpret and report status codes from kernel or system APIs.
- Validate or test Windows API wrapper code by checking that returned codes match expected NTSTATUS or Win32 Error constants.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are writing Windows interop code in Python and need to work with NTSTATUS, Win32 Error, or HRESULT values.
The library is lightweight, dependency-free, and solves a real friction point in Windows API integration. However, note that maintenance is aging—the last update was 2025-06-11 with no recent activity, so treat it as stable but not actively developed.
Install
ntstatus on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—last commit was 2025-06-11 and the project has not been updated in several months, though the repository remains active and not archived.
Requires Python 3.10 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
from ntstatus import NtStatus
# Decode a status code by numeric value
status = NtStatus.decode(0xC0000135)
print(status.name) # STATUS_DLL_NOT_FOUND
print(status.signed_value) # -1073741515
print(status.unsigned_value) # 3221225781
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode—last update was 2025-06-11 with no recent activity signal.
- Real-world adoption and stability—144527 monthly downloads suggests some use, but project visibility (0 GitHub stars) is unclear.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 429 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 144,527 / month, #11,149 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13 |
Evidence: ntstatus-2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “windows api ntstatus constants”
- ntstatusProvides Python constants and lookup methods for Windows API…
- exit-codesProvides platform-independent exit codes for Python programs, making…
- apify-sharedApify Shared Python is a deprecated package that formerly provided…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also aenum · constantly · exitstatus · win-precise-time · pypiwin32 · exit-codes · win32-setctime · python-status · fxpmath · infinity