Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svinota/pyroute2
Python Netlink and PF_ROUTE library — network configuration and monitoring
https://github.com/svinota/pyroute2
bsd freebsd generic-netlink genl linux namespace netlink netns network network-namespace nfnetlink nl80211 openbsd python rtnl wireguard
Last synced: 4 days ago
JSON representation
Python Netlink and PF_ROUTE library — network configuration and monitoring
- Host: GitHub
- URL: https://github.com/svinota/pyroute2
- Owner: svinota
- License: other
- Created: 2013-04-08T05:38:22.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-11-14T20:06:41.000Z (29 days ago)
- Last Synced: 2024-12-08T19:41:42.669Z (5 days ago)
- Topics: bsd, freebsd, generic-netlink, genl, linux, namespace, netlink, netns, network, network-namespace, nfnetlink, nl80211, openbsd, python, rtnl, wireguard
- Language: Python
- Homepage: https://pyroute2.org/
- Size: 8.32 MB
- Stars: 962
- Watchers: 48
- Forks: 249
- Open Issues: 154
-
Metadata Files:
- Readme: README.contribute.rst
- Changelog: CHANGELOG.rst
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
.. devcontribute:
Project contribution guide
==========================Step 1: setup the environment
-----------------------------Linux
+++++.. code-block:: sh
# make sure you have installed:
# bash
# git
# python
# GNU make, sed, awk# clone the repo
git clone ${pyroute2_git_url}
cd pyroute2# run the test suite
make testOpenBSD
+++++++.. code-block:: sh
# install required tools
pkg_add bash git gmake gsed python rust# clone the repo
git clone ${pyroute_git_url}
cd pyroute2# run the test suite
gmake testStep 2: plan and implement the change
-------------------------------------The best practice is that any change should be covered by tests.
The test suite is in the `/tests/` folder and is run by `nox`. You
can add your tests to an existing tests module, or create your
own module, if it requires some specific environment that is not
covered yet. In the latter case add a new session to `noxfile.py`.The project is designed to work on the bare standard library.
But some embedded environments strip even the stdlib, removing
modules like sqlite3.So to run pyroute2 even in such environments, the project provides
two packages, `pyroute2` and `pyroute2.minimal`, with the latter
providing a minimal distribution, with no sqlite3 or pickle.Modules `pyroute2` and `pyroute2.minimal` are mutually exclusive.
Each module provides it's own pypi package.
More details: https://github.com/svinota/pyroute2/discussions/786Step 3: test the change
-----------------------Assume the environment is already set up on the step 1:
.. code-block:: sh
# run code linter
make format# run test suite, some tests may require root
make testStep 4: submit a PR
-------------------The primary repo for the project is on Github. All the PRs
are more than welcome there.Requirements to a PR
++++++++++++++++++++The code must comply some requirements:
* the library **must** work on Python >= 3.9
* the code **must** pass `make format`
* the code **must** not break existing unit and functional tests (`make test`)
* the `ctypes` usage **must not** break the library on SELinux