Back to browse
GitHub Repository

๐Ÿ”Ž Detect architectures, platforms, shells, terminals, CI systems and agents, grouped by family

29 starsPython

Extra-Platforms, Python library to detect OS, arch, shell, CI, AI

by kdeldyckeยทApr 2, 2026ยท9 pointsยท2 comments

AI Analysis

โ—โ—SolidSolve My ProblemCozy

Zero-dependency Python library replacing removed stdlib functions with comprehensive platform detection.

Strengths
  • โ€ขZero dependencies ensures no supply chain risk for core infrastructure code.
  • โ€ขPytest decorators simplify cross-platform testing workflows significantly for maintainers.
Weaknesses
  • โ€ขNiche utility limits audience to Python maintainers and CI engineers.
  • โ€ขDetection logic requires constant maintenance as new platforms emerge slowly.
Target Audience

Python developers and DevOps engineers

Similar To

Distro ยท platform

Post Description

I built Extra Platforms over the past 5 years because I kept writing the same detection boilerplate over and over. And also because Python's original platform.linux_distribution() function has been removed in Python 3.8. Its replacement, Distro, only covers Linux.

It detects six traits (CPU architecture, OS/distribution, shell, terminal, CI, agents), which are grouped into families (BSD, LINUX, UNIX, ...) for convenience.

You can try the library without installing anything:

$ uvx --with extra-platforms python >>> from extra_platforms import current_platform, BSD, is_linux >>> current_platform() Platform(id='macos', name='macOS') >>> current_platform() in BSD True >>> is_linux() False

It also ships Pytest decorators (@skip_linux, @unless_macos) for platform-conditional tests.

The library has zero dependencies and is Apache-2.0 licensed.

I'm interested in collecting edge cases, which you can send me by performing an auto-detection with:

$ uvx extra-platforms

Similar Projects