python-netifaces2
Port variant v11
Summary Portable network interface information (3.11)
BROKEN
Package version 0.0.22
Homepage https://github.com/SamuelYvon/netifaces-2
Keywords python, rust
Maintainer Python Automaton
License Not yet specified
Other variants v12
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 02 NOV 2024, 22:54:22 UTC
Port created 02 NOV 2024, 22:54:22 UTC
Subpackage Descriptions
single # netifaces (2) ## 1. What is this? The original [netifaces] was abandonned by it's maintainer, leaving us without the option to get network addresses of any kind in Python. Unfortunately, the original sources are more akin to arcane magic, so picking where it's been left off is a difficult task. I decided to rewrite `netifaces`, keeping the **almost** exact same API and adding the following: - Support for future python versions - Type annotations - Maybe a more "queriable" API in the future This project aims to be a drop-in replacement for those project who use `netifaces`, but I do not guarantee anything. ### 1.1 What is not working **right-now** - The `gateways` API is only working if your system has a `/proc/net/route` file or the `ip` tool - The `windows` gateways API is non-functional ## 2. Usage For now the API is the same as the original `netifaces`, so please refer to [it]. Install: `shell pip install netifaces2 ` Import: ```python >>> import netifaces >>> netifaces.interfaces() ... >>> netifaces.ifaddresses('en0') ... >>> netifacs.gateways() ... ``` ## 3. API differences between this and al45tair/netifaces ### `gateways` The `gateways` function does not support indexing through the `default` special key. This is because it makes a sane typing definition difficult to write and be understandable. Instead, if you want the same functionality, the following is exposed: ```python >>> netifaces.default_gateway() ... ``` The result will be the default gateway for each interface type. The result may be an empty dict if no default route is set. The level of completness differs a little bit with the original version; some address families might not yet be available and `PEER` addresses are not reported for now. If you need a feature, open an issue and I will do my best to add it. Gateways also returned the interfaces indexed by integer values. This is a bit odd (IMO) since the integers values for the interface types are system-dependent. Enum values with a more semantic meaning are now used (they are still tied to linux numbers), but you can use `old_api=True` in their call to get the al45air-style keys back. ### `AF_` Constants In the previous version of `netifaces` the `AF_` constants' value were assigned to be platform independent. This has the nice effect of abstracting the OS when accessing the information of a network layer. However after consideration, it does not feel like the right place to provide abstraction. If you update your project's dependencies to this version of `netifaces`, be wary of this change. For instance, on linux you may need to replace `AF_LINK` with `AF_PACKET` to get mac addresses. In the future, an extra API will allow accessing a specific layer's
Configuration Switches (platform-specific settings discarded)
PY311 ON Build using Python 3.11 PY312 OFF Build using Python 3.12
Package Dependencies by Type
Build (only) python-setuptools-rust:single:v11
python-maturin:single:v11
python-pip:single:v11
rust:single:std
autoselect-python:single:std
Build and Runtime python311:single:std
Runtime (only) ravensys-gcc:libs:std (single subpackage)
Download groups
main mirror://PYPI/n/netifaces2
cr01 mirror://CRATES/autocfg:1.1.0
cr02 mirror://CRATES/bitflags:1.3.2
cr03 mirror://CRATES/bitflags:2.4.2
cr04 mirror://CRATES/cfg-if:1.0.0
cr05 mirror://CRATES/cfg_aliases:0.1.1
cr06 mirror://CRATES/indoc:1.0.7
cr07 mirror://CRATES/libc:0.2.153
cr08 mirror://CRATES/lock_api:0.4.9
cr09 mirror://CRATES/log:0.4.20
cr10 mirror://CRATES/memoffset:0.6.5
cr11 mirror://CRATES/memoffset:0.9.0
cr12 mirror://CRATES/nix:0.28.0
cr13 mirror://CRATES/once_cell:1.15.0
cr14 mirror://CRATES/parking_lot:0.12.1
cr15 mirror://CRATES/parking_lot_core:0.9.3
cr16 mirror://CRATES/proc-macro2:1.0.70
cr17 mirror://CRATES/pyo3:0.17.2
cr18 mirror://CRATES/pyo3-build-config:0.17.2
cr19 mirror://CRATES/pyo3-ffi:0.17.2
cr20 mirror://CRATES/pyo3-macros:0.17.2
cr21 mirror://CRATES/pyo3-macros-backend:0.17.2
cr22 mirror://CRATES/quote:1.0.33
cr23 mirror://CRATES/redox_syscall:0.2.16
cr24 mirror://CRATES/scopeguard:1.1.0
cr25 mirror://CRATES/smallvec:1.10.0
cr26 mirror://CRATES/syn:1.0.102
cr27 mirror://CRATES/syn:2.0.41
cr28 mirror://CRATES/target-lexicon:0.12.4
cr29 mirror://CRATES/thiserror:1.0.51
cr30 mirror://CRATES/thiserror-impl:1.0.51
cr31 mirror://CRATES/unicode-ident:1.0.5
cr32 mirror://CRATES/unindent:0.1.10
cr33 mirror://CRATES/windows:0.42.0
cr34 mirror://CRATES/windows-sys:0.36.1
cr35 mirror://CRATES/windows_aarch64_gnullvm:0.42.0
cr36 mirror://CRATES/windows_aarch64_msvc:0.36.1
cr37 mirror://CRATES/windows_aarch64_msvc:0.42.0
cr38 mirror://CRATES/windows_i686_gnu:0.36.1
cr39 mirror://CRATES/windows_i686_gnu:0.42.0
cr40 mirror://CRATES/windows_i686_msvc:0.36.1
cr41 mirror://CRATES/windows_i686_msvc:0.42.0
cr42 mirror://CRATES/windows_x86_64_gnu:0.36.1
cr43 mirror://CRATES/windows_x86_64_gnu:0.42.0
cr44 mirror://CRATES/windows_x86_64_gnullvm:0.42.0
cr45 mirror://CRATES/windows_x86_64_msvc:0.36.1
cr46 mirror://CRATES/windows_x86_64_msvc:0.42.0
Distribution File Information
c872a54e1a0e2bf078593b4460013996de804e40cab1b0ebc377b0e74b52a244 21203 rust/crates/netifaces2-0.0.22.tar.gz d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa 13272 rust/crates/autocfg-1.1.0.tar.gz bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a 23021 rust/crates/bitflags-1.3.2.tar.gz ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf 42602 rust/crates/bitflags-2.4.2.tar.gz baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd 7934 rust/crates/cfg-if-1.0.0.tar.gz fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e 6009 rust/crates/cfg_aliases-0.1.1.tar.gz adab1eaa3408fb7f0c777a73e7465fd5656136fc93b670eb6df3c88c2c1344e3 13716 rust/crates/indoc-1.0.7.tar.gz 9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd 740614 rust/crates/libc-0.2.153.tar.gz 435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df 25685 rust/crates/lock_api-0.4.9.tar.gz b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f 38307 rust/crates/log-0.4.20.tar.gz 5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce 7686 rust/crates/memoffset-0.6.5.tar.gz 5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c 9033 rust/crates/memoffset-0.9.0.tar.gz ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4 311086 rust/crates/nix-0.28.0.tar.gz e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1 31460 rust/crates/once_cell-1.15.0.tar.gz 3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f 40967 rust/crates/parking_lot-0.12.1.tar.gz 09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929 32256 rust/crates/parking_lot_core-0.9.3.tar.gz 39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b 44343 rust/crates/proc-macro2-1.0.70.tar.gz 201b6887e5576bf2f945fe65172c1fcbf3fcf285b23e4d71eb171d9736e38d32 405417 rust/crates/pyo3-0.17.2.tar.gz bf0708c9ed01692635cbf056e286008e5a2927ab1a5e48cdd3aeb1ba5a6fef47 29231 rust/crates/pyo3-build-config-0.17.2.tar.gz 90352dea4f486932b72ddf776264d293f85b79a1d214de1d023927b41461132d 62850 rust/crates/pyo3-ffi-0.17.2.tar.gz 7eb24b804a2d9e88bfcc480a5a6dd76f006c1e3edaf064e8250423336e2cd79d 7260 rust/crates/pyo3-macros-0.17.2.tar.gz f22bb49f6a7348c253d7ac67a6875f2dc65f36c2ae64a82c381d528972bea6d6 49990 rust/crates/pyo3-macros-backend-0.17.2.tar.gz 5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae 28090 rust/crates/quote-1.0.33.tar.gz fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a 24012 rust/crates/redox_syscall-0.2.16.tar.gz d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd 11470 rust/crates/scopeguard-1.1.0.tar.gz a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0 31564 rust/crates/smallvec-1.10.0.tar.gz 3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1 235699 rust/crates/syn-1.0.102.tar.gz 44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269 246016 rust/crates/syn-2.0.41.tar.gz c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1 23020 rust/crates/target-lexicon-0.12.4.tar.gz f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7 20045 rust/crates/thiserror-1.0.51.tar.gz 01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df 15372 rust/crates/thiserror-impl-1.0.51.tar.gz 6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3 35455 rust/crates/unicode-ident-1.0.5.tar.gz 58ee9362deb4a96cef4d437d1ad49cffc9b9e92d202b6995674e928ce684f112 7703 rust/crates/unindent-0.1.10.tar.gz 0286ba339aa753e70765d521bb0242cc48e1194562bfa2a2ad7ac8a6de28f5d5 11983675 rust/crates/windows-0.42.0.tar.gz ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2 3347053 rust/crates/windows-sys-0.36.1.tar.gz 41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e 357917 rust/crates/windows_aarch64_gnullvm-0.42.0.tar.gz 9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47 661960 rust/crates/windows_aarch64_msvc-0.36.1.tar.gz dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4 659424 rust/crates/windows_aarch64_msvc-0.42.0.tar.gz 180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6 818115 rust/crates/windows_i686_gnu-0.36.1.tar.gz fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7 728570 rust/crates/windows_i686_gnu-0.42.0.tar.gz e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024 724575 rust/crates/windows_i686_msvc-0.36.1.tar.gz 84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246 717477 rust/crates/windows_i686_msvc-0.42.0.tar.gz 4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1 790934 rust/crates/windows_x86_64_gnu-0.36.1.tar.gz bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed 692493 rust/crates/windows_x86_64_gnu-0.42.0.tar.gz 09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028 357906 rust/crates/windows_x86_64_gnullvm-0.42.0.tar.gz c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680 661999 rust/crates/windows_x86_64_msvc-0.36.1.tar.gz f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5 659377 rust/crates/windows_x86_64_msvc-0.42.0.tar.gz
Ports that require python-netifaces2:v11
python-netbox-agent:v11 NetBox agent for server (3.11)