Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igo95862/python-lxns
Python library to control Linux kernel namespaces
https://github.com/igo95862/python-lxns
linux linux-kernel linux-namespaces namespaces python python-library python3
Last synced: 5 days ago
JSON representation
Python library to control Linux kernel namespaces
- Host: GitHub
- URL: https://github.com/igo95862/python-lxns
- Owner: igo95862
- Created: 2023-07-16T16:15:24.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-13T17:16:23.000Z (6 months ago)
- Last Synced: 2024-04-14T04:04:57.837Z (6 months ago)
- Topics: linux, linux-kernel, linux-namespaces, namespaces, python, python-library, python3
- Language: Python
- Homepage:
- Size: 86.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSES/MIT.txt
Awesome Lists containing this project
README
[![Documentation Status](https://readthedocs.org/projects/python-lxns/badge/?version=latest)](https://python-lxns.readthedocs.io/en/latest/?badge=latest)
[![PyPI - Version](https://img.shields.io/pypi/v/lxns)](https://pypi.org/project/lxns/)# Python-lxns
## Python library to control Linux kernel namespaces
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](https://python-lxns.readthedocs.io/en/latest/)
Also see [`examples/`](examples/) folder for code examples.
## Requirements
* Python version 3.7 or higher
### [PyPI wheels](https://pypi.org/project/lxns/)
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.