extra-platforms

Detect platforms and group them by family

https://github.com/kdeldycke/extra-platforms

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary

Keywords

aix android bsd cygwin distribution hurd linux macos multiplatform os-detection platform python solaris windows
Last synced: 6 months ago · JSON representation ·

Repository

Detect platforms and group them by family

Basic Info
Statistics
  • Stars: 15
  • Watchers: 1
  • Forks: 2
  • Open Issues: 6
  • Releases: 20
Topics
aix android bsd cygwin distribution hurd linux macos multiplatform os-detection platform python solaris windows
Created over 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Funding License Code of conduct Citation

readme.md

Extra Platforms

Last release Python versions Downloads Unittests status Coverage status Documentation status DOI

What is Extra Platforms?

  • Provides a list of all known platforms
  • Detect the current platform, at the distribution level
  • Platform metadata (version, codename, etc.)
  • Group platforms into families
  • Manage collection of platforms and groups
  • Associate each platform and group to an emoji symbol
  • Conditional markers decorators for pytest: @skip_<id>/@unless_<id> for each platform and group (@skip_android, @skip_any_windows, @skip_github_ci, …)
  • Address distro#177 issue (support for Windows and Mac OS)

Examples

Get the current platform, from which you can access lots of metadata:

```pycon

from extraplatforms import currentos

myos = currentos() my_os Platform(id='macos', name='macOS', current=True)

myos.id 'macos' myos.name 'macOS' my_os.icon '🍎'

myos.info() { "id": "macos", "name": "macOS", "icon": "🍎", "current": True, "distroid": "darwin", "version": "23.6.0", "versionparts": {"major": "23", "minor": "6", "buildnumber": "0"}, "like": None, "codename": None, } ```

Check if a platform is a specific system:

```pycon

from extraplatforms import isgentoo

is_gentoo() False ```

Use groups to check if the current platform is part of a specific family:

```pycon

from extraplatforms import UNIX, currentos

current_os() in UNIX False ```

Or directly use the boolean variables available for each family:

```pycon

from extraplatforms import isunix

is_unix() False ```

List all platforms of a family:

```pycon

from extra_platforms import LINUX

LINUX Group(id='linux', name='Any Linux', platformids=frozenset({'ibmpowerkvm', 'rocky', 'debian', 'tuxedo', 'ubuntu', 'mageia', 'xenserver', 'opensuse', 'nobara', 'buildroot', 'rhel', 'parallels', 'pidora', 'sles', 'amzn', 'scientific', 'linuxmint', 'centos', 'android', 'gentoo', 'raspbian', 'unknown_linux', 'mandriva', 'exherbo', 'cloudlinux', 'fedora', 'guix', 'arch', 'altlinux', 'slackware', 'oracle', 'kvmibm'}))

print("\n".join([p.name for p in LINUX])) ALT Linux Amazon Linux Android Arch Linux Buildroot CentOS CloudLinux OS Debian Exherbo Linux Fedora Gentoo Linux Guix System IBM PowerKVM KVM for IBM z Systems Linux Mint Mageia Mandriva Linux Nobara openSUSE Oracle Linux Parallels Pidora Raspbian RedHat Enterprise Linux Rocky Linux Scientific Linux Slackware SUSE Linux Enterprise Server Tuxedo OS Ubuntu Unknown Linux XenServer ```

Reduce a disparate collection of groups and platforms into a minimal descriptive set, by grouping all platforms into families:

```pycon

from extra_platforms import AIX, MACOS, SOLARIS, reduce

reduce([AIX, MACOS]) { Platform(id='aix', name='IBM AIX', current=False), Platform(id='macos', name='macOS', current=True), }

reduce([AIX, MACOS, SOLARIS]) { Group(id='systemv', name='Any Unix derived from AT&T System Five', platformids=frozenset({'aix', 'solaris'})), Platform(id='macos', name='macOS', current=True), } ```

Groups → Platforms mapping

Relationships between groups and platforms (excluding the all-encompassing ALL_PLATFORMS group), represented as a Sankey diagram.

```mermaid

config: {"sankey": {"showValues": false, "width": 800, "height": 400}}

sankey-beta

ALLPLATFORMSWITHOUTCI,aix,1 ALLPLATFORMSWITHOUTCI,altlinux,1 ALLPLATFORMSWITHOUTCI,amzn,1 ALLPLATFORMSWITHOUTCI,android,1 ALLPLATFORMSWITHOUTCI,arch,1 ALLPLATFORMSWITHOUTCI,buildroot,1 ALLPLATFORMSWITHOUTCI,centos,1 ALLPLATFORMSWITHOUTCI,cloudlinux,1 ALLPLATFORMSWITHOUTCI,cygwin,1 ALLPLATFORMSWITHOUTCI,debian,1 ALLPLATFORMSWITHOUTCI,exherbo,1 ALLPLATFORMSWITHOUTCI,fedora,1 ALLPLATFORMSWITHOUTCI,freebsd,1 ALLPLATFORMSWITHOUTCI,gentoo,1 ALLPLATFORMSWITHOUTCI,guix,1 ALLPLATFORMSWITHOUTCI,hurd,1 ALLPLATFORMSWITHOUTCI,ibmpowerkvm,1 ALLPLATFORMSWITHOUTCI,kvmibm,1 ALLPLATFORMSWITHOUTCI,linuxmint,1 ALLPLATFORMSWITHOUTCI,macos,1 ALLPLATFORMSWITHOUTCI,mageia,1 ALLPLATFORMSWITHOUTCI,mandriva,1 ALLPLATFORMSWITHOUTCI,midnightbsd,1 ALLPLATFORMSWITHOUTCI,netbsd,1 ALLPLATFORMSWITHOUTCI,nobara,1 ALLPLATFORMSWITHOUTCI,openbsd,1 ALLPLATFORMSWITHOUTCI,opensuse,1 ALLPLATFORMSWITHOUTCI,oracle,1 ALLPLATFORMSWITHOUTCI,parallels,1 ALLPLATFORMSWITHOUTCI,pidora,1 ALLPLATFORMSWITHOUTCI,raspbian,1 ALLPLATFORMSWITHOUTCI,rhel,1 ALLPLATFORMSWITHOUTCI,rocky,1 ALLPLATFORMSWITHOUTCI,scientific,1 ALLPLATFORMSWITHOUTCI,slackware,1 ALLPLATFORMSWITHOUTCI,sles,1 ALLPLATFORMSWITHOUTCI,solaris,1 ALLPLATFORMSWITHOUTCI,sunos,1 ALLPLATFORMSWITHOUTCI,tumbleweed,1 ALLPLATFORMSWITHOUTCI,tuxedo,1 ALLPLATFORMSWITHOUTCI,ubuntu,1 ALLPLATFORMSWITHOUTCI,unknownlinux,1 ALLPLATFORMSWITHOUTCI,windows,1 ALLPLATFORMSWITHOUTCI,wsl1,1 ALLPLATFORMSWITHOUTCI,wsl2,1 ALLPLATFORMSWITHOUTCI,xenserver,1 UNIX,aix,1 UNIX,altlinux,1 UNIX,amzn,1 UNIX,android,1 UNIX,arch,1 UNIX,buildroot,1 UNIX,centos,1 UNIX,cloudlinux,1 UNIX,cygwin,1 UNIX,debian,1 UNIX,exherbo,1 UNIX,fedora,1 UNIX,freebsd,1 UNIX,gentoo,1 UNIX,guix,1 UNIX,hurd,1 UNIX,ibmpowerkvm,1 UNIX,kvmibm,1 UNIX,linuxmint,1 UNIX,macos,1 UNIX,mageia,1 UNIX,mandriva,1 UNIX,midnightbsd,1 UNIX,netbsd,1 UNIX,nobara,1 UNIX,openbsd,1 UNIX,opensuse,1 UNIX,oracle,1 UNIX,parallels,1 UNIX,pidora,1 UNIX,raspbian,1 UNIX,rhel,1 UNIX,rocky,1 UNIX,scientific,1 UNIX,slackware,1 UNIX,sles,1 UNIX,solaris,1 UNIX,sunos,1 UNIX,tumbleweed,1 UNIX,tuxedo,1 UNIX,ubuntu,1 UNIX,unknownlinux,1 UNIX,wsl1,1 UNIX,wsl2,1 UNIX,xenserver,1 UNIXWITHOUTMACOS,aix,1 UNIXWITHOUTMACOS,altlinux,1 UNIXWITHOUTMACOS,amzn,1 UNIXWITHOUTMACOS,android,1 UNIXWITHOUTMACOS,arch,1 UNIXWITHOUTMACOS,buildroot,1 UNIXWITHOUTMACOS,centos,1 UNIXWITHOUTMACOS,cloudlinux,1 UNIXWITHOUTMACOS,cygwin,1 UNIXWITHOUTMACOS,debian,1 UNIXWITHOUTMACOS,exherbo,1 UNIXWITHOUTMACOS,fedora,1 UNIXWITHOUTMACOS,freebsd,1 UNIXWITHOUTMACOS,gentoo,1 UNIXWITHOUTMACOS,guix,1 UNIXWITHOUTMACOS,hurd,1 UNIXWITHOUTMACOS,ibmpowerkvm,1 UNIXWITHOUTMACOS,kvmibm,1 UNIXWITHOUTMACOS,linuxmint,1 UNIXWITHOUTMACOS,mageia,1 UNIXWITHOUTMACOS,mandriva,1 UNIXWITHOUTMACOS,midnightbsd,1 UNIXWITHOUTMACOS,netbsd,1 UNIXWITHOUTMACOS,nobara,1 UNIXWITHOUTMACOS,openbsd,1 UNIXWITHOUTMACOS,opensuse,1 UNIXWITHOUTMACOS,oracle,1 UNIXWITHOUTMACOS,parallels,1 UNIXWITHOUTMACOS,pidora,1 UNIXWITHOUTMACOS,raspbian,1 UNIXWITHOUTMACOS,rhel,1 UNIXWITHOUTMACOS,rocky,1 UNIXWITHOUTMACOS,scientific,1 UNIXWITHOUTMACOS,slackware,1 UNIXWITHOUTMACOS,sles,1 UNIXWITHOUTMACOS,solaris,1 UNIXWITHOUTMACOS,sunos,1 UNIXWITHOUTMACOS,tumbleweed,1 UNIXWITHOUTMACOS,tuxedo,1 UNIXWITHOUTMACOS,ubuntu,1 UNIXWITHOUTMACOS,unknownlinux,1 UNIXWITHOUTMACOS,wsl1,1 UNIXWITHOUTMACOS,wsl2,1 UNIXWITHOUTMACOS,xenserver,1 LINUXLIKE,altlinux,1 LINUXLIKE,amzn,1 LINUXLIKE,android,1 LINUXLIKE,arch,1 LINUXLIKE,buildroot,1 LINUXLIKE,centos,1 LINUXLIKE,cloudlinux,1 LINUXLIKE,debian,1 LINUXLIKE,exherbo,1 LINUXLIKE,fedora,1 LINUXLIKE,gentoo,1 LINUXLIKE,guix,1 LINUXLIKE,ibmpowerkvm,1 LINUXLIKE,kvmibm,1 LINUXLIKE,linuxmint,1 LINUXLIKE,mageia,1 LINUXLIKE,mandriva,1 LINUXLIKE,nobara,1 LINUXLIKE,opensuse,1 LINUXLIKE,oracle,1 LINUXLIKE,parallels,1 LINUXLIKE,pidora,1 LINUXLIKE,raspbian,1 LINUXLIKE,rhel,1 LINUXLIKE,rocky,1 LINUXLIKE,scientific,1 LINUXLIKE,slackware,1 LINUXLIKE,sles,1 LINUXLIKE,tumbleweed,1 LINUXLIKE,tuxedo,1 LINUXLIKE,ubuntu,1 LINUXLIKE,unknownlinux,1 LINUXLIKE,wsl1,1 LINUXLIKE,wsl2,1 LINUXLIKE,xenserver,1 LINUX,altlinux,1 LINUX,amzn,1 LINUX,android,1 LINUX,arch,1 LINUX,buildroot,1 LINUX,centos,1 LINUX,cloudlinux,1 LINUX,debian,1 LINUX,exherbo,1 LINUX,fedora,1 LINUX,gentoo,1 LINUX,guix,1 LINUX,ibmpowerkvm,1 LINUX,kvmibm,1 LINUX,linuxmint,1 LINUX,mageia,1 LINUX,mandriva,1 LINUX,nobara,1 LINUX,opensuse,1 LINUX,oracle,1 LINUX,parallels,1 LINUX,pidora,1 LINUX,raspbian,1 LINUX,rhel,1 LINUX,rocky,1 LINUX,scientific,1 LINUX,slackware,1 LINUX,sles,1 LINUX,tumbleweed,1 LINUX,tuxedo,1 LINUX,ubuntu,1 LINUX,unknownlinux,1 LINUX,xenserver,1 CI,azurepipelines,1 CI,bamboo,1 CI,buildkite,1 CI,circleci,1 CI,cirrusci,1 CI,codebuild,1 CI,githubci,1 CI,gitlabci,1 CI,herokuci,1 CI,teamcity,1 CI,travisci,1 CI,unknownci,1 BSD,freebsd,1 BSD,macos,1 BSD,midnightbsd,1 BSD,netbsd,1 BSD,openbsd,1 BSD,sunos,1 BSDWITHOUTMACOS,freebsd,1 BSDWITHOUTMACOS,midnightbsd,1 BSDWITHOUTMACOS,netbsd,1 BSDWITHOUTMACOS,openbsd,1 BSDWITHOUTMACOS,sunos,1 SYSTEMV,aix,1 SYSTEMV,solaris,1 LINUXLAYERS,wsl1,1 LINUXLAYERS,wsl2,1 UNIXLAYERS,cygwin,1 OTHERUNIX,hurd,1 ANYWINDOWS,windows,1 ```

OS families

Each platform is assigned to a group of non-overlpaping families:

```mermaid

config: {"mindmap": {"padding": 5}}

mindmap ((Extra Platforms)) )≛ UNIXLAYERS( (Ͼ cygwin) )Ⅴ SYSTEMV( (➿ aix) (🌞 solaris) )⊎ OTHERUNIX( (🐃 hurd) )≚ LINUXLAYERS( (⊞ wsl1) (⊞ wsl2) )🐧 LINUX( (🐧 altlinux) (🙂 amzn) (🤖 android) (🎗️ arch) (⛑️ buildroot) (💠 centos) (꩜ cloudlinux) (🌀 debian) (🐽 exherbo) (🎩 fedora) (🗜️ gentoo) (🐃 guix) (🤹 ibmpowerkvm) (🤹 kvmibm) (🌿 linuxmint) (⍥ mageia) (💫 mandriva) ( nobara) (🦎 opensuse) (🦴 oracle) (∥ parallels) (🍓 pidora) (🍓 raspbian) (🎩 rhel) (⛰️ rocky) (⚛️ scientific) (🚬 slackware) (🦎 sles) (↻ tumbleweed) (🤵 tuxedo) (🎯 ubuntu) (🐧 unknownlinux) (Ⓧ xenserver) )♺ CI( (═ azurepipelines) (⟲ bamboo) (🪁 buildkite) (⪾ circleci) (≋ cirrusci) (ᚙ codebuild) (🐙 githubci) (🦊 gitlabci) (⥁ herokuci) (🏙️ teamcity) (👷 travisci) (♲ unknownci) )🅱️+ BSD( (😈 freebsd) (🍎 macos) (🌘 midnightbsd) (🚩 netbsd) (🐡 openbsd) (☀️ sunos) )🪟 ANY_WINDOWS( (🪟 windows) ```

Used in

Check these projects to get real-life examples of extra-platforms usage:

Feel free to send a PR to add your project in this list if you are relying on Click Extra in any way.

Development

Development guidelines are the same as parent project Click Extra, from which extra-platforms originated.

Owner

  • Name: Kevin Deldycke
  • Login: kdeldycke
  • Kind: user
  • Location: ☁︎

Entrepreneur, VP, Engineering Manager, Founding Engineer - Billing, Payments & IAM.

Citation (citation.cff)

cff-version: 3.2.4
title: "Extra Platforms"
message: "If you use this software, please cite it as below."
type: software
authors:
  - family-names: "Deldycke"
    given-names: "Kevin"
    email: kevin@deldycke.com
    orcid: "https://orcid.org/0000-0001-9748-9014"
doi: 10.5281/zenodo.13341712
version: 3.2.4
# The release date is kept up to date by the external workflows. See:
# https://github.com/kdeldycke/workflows/blob/33b704b489c1aa18b7b7efbf963e153e91e1c810/.github/workflows/changelog.yaml#L135-L137
date-released: 2025-08-05
url: "https://github.com/kdeldycke/extra-platforms"

GitHub Events

Total
  • Create event: 143
  • Issues event: 8
  • Release event: 11
  • Watch event: 11
  • Delete event: 143
  • Issue comment event: 214
  • Push event: 1,108
  • Pull request event: 326
  • Fork event: 2
Last Year
  • Create event: 143
  • Issues event: 8
  • Release event: 11
  • Watch event: 11
  • Delete event: 143
  • Issue comment event: 214
  • Push event: 1,108
  • Pull request event: 326
  • Fork event: 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 10
  • Total pull requests: 516
  • Average time to close issues: 12 days
  • Average time to close pull requests: 7 days
  • Total issue authors: 8
  • Total pull request authors: 4
  • Average comments per issue: 0.9
  • Average comments per pull request: 0.59
  • Merged pull requests: 255
  • Bot issues: 4
  • Bot pull requests: 512
Past Year
  • Issues: 9
  • Pull requests: 430
  • Average time to close issues: 13 days
  • Average time to close pull requests: 7 days
  • Issue authors: 8
  • Pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.56
  • Merged pull requests: 201
  • Bot issues: 3
  • Bot pull requests: 426
Top Authors
Issue Authors
  • github-actions[bot] (2)
  • dependabot[bot] (2)
  • themoep (1)
  • johanneskastl (1)
  • jasondamour (1)
  • kdeldycke (1)
  • gsemet (1)
  • RyanHung (1)
Pull Request Authors
  • github-actions[bot] (339)
  • dependabot[bot] (173)
  • themoep (2)
  • PoorPocketsMcNewHold (2)
Top Labels
Issue Labels
✨ enhancement (3) 📚 documentation (2) 📦 dependencies (2) 🐛 bug (1) 🙏 help wanted (1)
Pull Request Labels
📦 dependencies (259) 📚 documentation (161) 🆙 changelog (74) 🤖 ci (18) ✨ enhancement (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 10,314 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 20
  • Total maintainers: 1
pypi.org: extra-platforms

Detect platforms and group them by family

  • Versions: 20
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 10,314 Last month
Rankings
Dependent packages count: 10.5%
Average: 34.7%
Dependent repos count: 58.9%
Maintainers (1)
Funding
  • https://github.com/sponsors/kdeldycke
Last synced: 7 months ago

Dependencies

.github/workflows/changelog.yaml actions
.github/workflows/autofix.yaml actions
.github/workflows/autolock.yaml actions
.github/workflows/docs.yaml actions
  • actions/checkout v4.1.7 composite
  • actions/setup-python v5.1.1 composite
  • peter-evans/create-pull-request v6.1.0 composite
.github/workflows/label-sponsors.yaml actions
.github/workflows/labeller-content-based.yaml actions
.github/workflows/labeller-file-based.yaml actions
.github/workflows/labels.yaml actions
.github/workflows/lint.yaml actions
.github/workflows/release.yaml actions
.github/workflows/tests.yaml actions
  • actions/checkout v4.1.7 composite
  • actions/setup-python v5.1.1 composite
  • codecov/codecov-action v4.5.0 composite
pyproject.toml pypi
  • boltons ~= 24.0.0
  • distro ~= 1.9.0