Awesome
<!-- SPDX-License-Identifier: MPL-2.0 SPDX-FileCopyrightText: 2023 igo95862 -->Python-lxns
Python library to control Linux kernel namespaces
<a href="https://repology.org/project/python:lxns/versions"> <img src="https://repology.org/badge/vertical-allrepos/python:lxns.svg" alt="Packaging status" align="right"> </a>Implemented using C extension module.
Current features implemented:
- Linux namespaces class abstractions with automatic resource control.
- Opening existing namespaces using PIDs.
- Opening parent user namespaces. (usually unaccessible from
/proc
) - Switching to a namespace.
- Unsharing namespaces either from class method or function with boolean flags.
- Automatic file descriptor resource control using
with
. - Getting and setting the max number of namespaces.
- Mount utilities using new file descriptor based API.
- Create bind mounts.
Documentation
Also see examples/
folder for code examples.
Requirements
- Python version 3.7 or higher
PyPI wheels
PyPI wheels are completely statically linked and do not depend on any library.
Available architectures: x86_64
, i686
, aarch64
, armv7l
Compiling source package
- Meson build system
- Python headers
- C compiler
- Linux kernel headers
License
Python-lxns is licensed under Mozilla Public License Version 2.0.
Examples in examples/
folder are licensed under MIT license.