$npx skillfedfor your agent

selinux

shim selinux module

With conditionsPyPI UtilitiesReleased Dec 20221.8M downloads / moMIT licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — selinux-0.3.0-py2.py3-none-any.whl
v0.3.0 · released 2022-12-24 · Python >=3.9 · 1 runtime deps: distro

Yes, if you need to use selinux from inside a virtualenv. The package solves a specific problem with minimal dependencies, no security issues, active maintenance status. The gap since the latest release is a minor concern, but the package remains actively maintained, marked Production/Stable. Install only if you encounter the virtualenv selinux import problem.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • libselinux Python bindings must be installed on the system; the shim bridges access to them from within a virtualenv.
  • Low install friction with a single runtime dependency (distro).
  • The package is actively maintained with recent commits, though the latest release was over three years ago; it remains marked as Production/Stable with support for current Python versions.

License · maintenance · safety

MIT license (permissive) — MIT license permits unrestricted use, modification, in both open-source, proprietary projects with minimal obligations.

last release 2022-12-24 (1329 days) · last repo commit 2026-07-13 · 19 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,761,246 downloads/mo, #3,583 on PyPI

Verify before relying

pip install selinux
import selinux
  • Whether the shim works with all selinux functions or only a subset of the API
  • Whether it works with selinux versions other than those tested at release time
  • Compatibility with Ansible modules specifically
Same gist for agents: .md · .json

What it is and what it does

This package is a workaround for a specific virtualenv limitation: selinux normally cannot be imported from inside isolated Python environments even when the system library is installed. The selinux shim bridges that gap by providing a pure-Python wrapper that allows code running in a virtualenv to import selinux.

The shim requires that libselinux Python bindings be present on the host system—it does not replace them, only makes them accessible from within a virtualenv. It has been tested to work both inside, outside virtualenvs without interfering with the original library. The package depends only on distro for runtime operation, supports Python 3.9 or later.

Use it for

  • Importing selinux in isolated Python environments for system administration tasks
  • Testing or developing tools that depend on selinux in a containerized or virtualenv-based CI/CD pipeline
  • Running code that requires selinux from within a virtualenv without system-level workarounds

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to use selinux from inside a virtualenv.

The package solves a specific problem with minimal dependencies, no security issues, active maintenance status. The gap since the latest release is a minor concern, but the package remains actively maintained, marked Production/Stable. Install only if you encounter the virtualenv selinux import problem.

Install

selinux on PyPI

Before you install

Low install friction with a single runtime dependency (distro). The package is actively maintained with recent commits, though the latest release was over three years ago; it remains marked as Production/Stable with support for current Python versions.

libselinux Python bindings must be installed on the system; the shim bridges access to them from within a virtualenv.

License in practice

MIT license permits unrestricted use, modification, in both open-source, proprietary projects with minimal obligations.

Quickstart

pip install selinux
import selinux

Verify before relying

  • Whether the shim works with all selinux functions or only a subset of the API
  • Whether it works with selinux versions other than those tested at release time
  • Compatibility with Ansible modules specifically

Package facts

LicenseMIT license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
distro
MaintenanceActively maintained 1,329 days since the last release
Last repo commit
First released
Downloads1,761,246 / month, #3,583 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: System :: Systems AdministrationTopic :: Utilities

Evidence: selinux-0.3.0-py2.py3-none-any.whl

Tags

Capabilities
selinux virtualenv importselinux python shimvirtualenv selinux compatibilityisolated environment selinuxselinux module wrapper
Topics
selinuxvirtualenv-compat
PyPI keywords
selinuxvirtualenv

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 › “selinux virtualenv import”

  • selinuxProvides a pure-Python shim for the selinux module that works inside…
  • ruyamlruyaml is a YAML parser and serializer that preserves comments,…
  • rpmProvides access to system RPM Python bindings inside a virtualenv by…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also rpm · virtualenv-clone · virtualenv · ansible-dev-environment · nodeenv · ansible-compat · notebook-shim · isolate · modal-client · logfire-api