Registry / devops / extra-platforms

extra-platforms

JSON →
library13.0.1pypypi✓ verified 85d ago

Detect architectures, platforms, shells, terminals, CI systems and agents, grouped by family. Current version: 12.0.3, requires Python >=3.10. Active development with frequent releases.

pip install extra-platforms
INSTALL
IMPORT
SIG · EXTRA-PLATFORMS
E
extra-platforms
devopspythonv13.0.1
Install
1.6s avg
Import
137ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v13.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.144s · 18.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.130s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

is_linux
from extra_platforms import is_linux
from extra_platforms.platform import is_linux
All detection functions are top-level; submodule imports are incorrect.
ALL_TRAITS
from extra_platforms import ALL_TRAITS
Constant for listing all known traits.
is_macos
from extra_platforms import is_macos
import extra_platforms; extra_platforms.is_macos()
Direct import preferred for clarity and typing.

Basic usage: detect platform traits and list all active ones.

from extra_platforms import is_linux, is_macos, is_windows, is_ci, ALL_TRAITS print('Linux:', is_linux()) print('macOS:', is_macos()) print('Windows:', is_windows()) print('CI:', is_ci()) print('All traits:', [t for t in ALL_TRAITS if getattr(__import__('extra_platforms'), t)()])
Debug
Known issues
breakingIn v12.0.0, shell detection was overhauled; the `is_sh()` function was added and symlink resolution changed. Code relying on shell detection may need updates.
fix
Update checks for shell traits; use new `is_sh()` if needed.
affects: <12.0.0
deprecatedImporting from submodules like `extra_platforms.platform` is deprecated in favor of top-level imports.
fix
Use `from extra_platforms import function_name`.
affects: >=11.0.0
gotchaDetection functions return booleans but may raise exceptions if called in very restricted environments (e.g., BusyBox without any shell). Tests skip these scenarios, but production code should handle gracefully.
fix
Wrap calls in try/except or check `is_shell()` first.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'extra_platforms'
Package not installed or installed in wrong environment.
fix
Run `pip install extra-platforms`
AttributeError: module 'extra_platforms' has no attribute 'is_linux'
Importing from subpackage instead of top-level, or using old version.
fix
Use `from extra_platforms import is_linux`
TypeError: is_linux() missing 1 required positional argument: 'self'
Trying to import classes or instantiate incorrectly.
fix
Detection functions are plain functions, not methods. Use `from extra_platforms import is_linux` and call `is_linux()` directly.
Upgrade
Version history
13.0.1latest on PyPI · released Jun 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
extra-platforms — pip install extra-platforms · libregistry