Package Search Help

You can use boolean logic (e.g. AND/OR/NOT) for complex search queries. For more help and examples, see the search documentation.

Search by package name:
my-package (implicit)
name:my-package (explicit)

Search by package filename:
my-package.ext (implicit)
filename:my-package.ext (explicit)

Search by package tag:
latest (implicit)
tag:latest (explicit)

Search by package version:
1.0.0 (implicit)
version:1.0.0 (explicit)
prerelease:true (prereleases)
prerelease:false (no prereleases)

Search by package architecture:
architecture:x86_64 

Search by package distribution:
distribution:el 

Search by package license:
license:MIT 

Search by package format:
format:deb 

Search by package status:
status:in_progress 

Search by package file checksum:
checksum:5afba 

Search by package security status:
severity:critical 

Search by package vulnerabilities:
vulnerabilities:>1 
vulnerabilities:<1000 

Search by # of package downloads:
downloads:>8 
downloads:<100 

Search by package type:
type:binary 
type:source 

Search by package size (bytes):
size:>50000 
size:<10000 

Search by dependency name/version:
dependency:log4j 
dependency:log4j=1.0.0 
dependency:log4j>1.0.0 

Search by uploaded date:
uploaded:>"1 day ago" 
uploaded:<"August 14, 2022 EST" 

Search by entitlement token (identifier):
entitlement:3lKPVJPosCsY 

Search by policy violation:
policy_violated:true
deny_policy_violated:true
license_policy_violated:true
vulnerability_policy_violated:true

Search by repository:
repository:repo-name

Search queries for all Debian-specific (and related) package types

Search by component:
deb_component:unstable

Search queries for all Maven-specific (and related) package types

Search by group ID:
maven_group_id:org.apache

Search queries for all Docker-specific (and related) package types

Search by image digest:
docker_image_digest:sha256:7c5..6d4
(full hashref only)

Search by layer digest:
docker_layer_digest:sha256:4c4..ae4
(full hashref only)

Field type modifiers (depending on the type, you can influence behaviour)

For all queries, you can use:
~foo for negation

For string queries, you can use:
^foo to anchor to start of term
foo$ to anchor to end of term
foo*bar for fuzzy matching

For number/date or version queries, you can use:
>foo for values greater than
>=foo for values greater / equal
<foo for values less than
<=foo for values less / equal

Need a secure and centralised artifact repository to deliver Alpine, Cargo, CocoaPods, Composer, Conan, Conda, CRAN, Dart, Debian, Docker, Go, Helm, Hex, LuaRocks, Maven, npm, NuGet, P2, Python, RedHat, Ruby, Swift, Terraform, Vagrant, Raw & More packages?

Cloudsmith is the new standard in Package / Artifact Management and Software Distribution.

With support for all major package formats, you can trust us to manage your software supply chain.

Start My Free Trial
 Public agriconnect agriconnect (AgriConnect) / python-musl
Python-Musl: Containing wheel packages built with musl (like Alpine OS)

Python logo netifaces  0.10.9

One-liner (summary)

Portable network interface information.

Description

netifaces 0.10.8

Linux/macOS Build Status (Linux/Mac)
Windows Build Status (Windows)

1. What is this?

It's been annoying me for some time that there's no easy way to get the address(es) of the machine's network interfaces from Python. There is a good reason for this difficulty, which is that it is virtually impossible to do so in a portable manner. However, it seems to me that there should be a package you can easy_install that will take care of working out the details of doing so on the machine you're using, then you can get on with writing Python code without concerning yourself with the nitty gritty of system-dependent low-level networking APIs.

This package attempts to solve that problem.

2. How do I use it?

First you need to install it, which you can do by typing:

tar xvzf netifaces-0.10.8.tar.gz
cd netifaces-0.10.8
python setup.py install

Note that you will need the relevant developer tools for your platform, as netifaces is written in C and installing this way will compile the extension.

Once that's done, you'll need to start Python and do something like the following:

>>> import netifaces

Then if you enter

>>> netifaces.interfaces()
['lo0', 'gif0', 'stf0', 'en0', 'en1', 'fw0']

you'll see the list of interface identifiers for your machine.

You can ask for the addresses of a particular interface by doing

>>> netifaces.ifaddresses('lo0')
{18: [{'addr': ''}], 2: [{'peer': '127.0.0.1', 'netmask': '255.0.0.0', 'addr': '127.0.0.1'}], 30: [{'peer': '::1', 'netmask': 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', 'addr': '::1'}, {'peer': '', 'netmask': 'ffff:ffff:ffff:ffff::', 'addr': 'fe80::1%lo0'}]}

Hmmmm. That result looks a bit cryptic; let's break it apart and explain what each piece means. It returned a dictionary, so let's look there first:

{ 18: [...], 2: [...], 30: [...] }

Each of the numbers refers to a particular address family. In this case, we have three address families listed; on my system, 18 is AF_LINK (which means the link layer interface, e.g. Ethernet), 2 is AF_INET (normal Internet addresses), and 30 is AF_INET6 (IPv6).

But wait! Don't use these numbers in your code. The numeric values here are system dependent; fortunately, I thought of that when writing netifaces, so the module declares a range of values that you might need. e.g.

>>> netifaces.AF_LINK
18

Again, on your system, the number may be different.

So, what we've established is that the dictionary that's returned has one entry for each address family for which this interface has an address. Let's take a look at the AF_INET addresses now:

>>> addrs = netifaces.ifaddresses('lo0')
>>> addrs[netifaces.AF_INET]
[{'peer': '127.0.0.1', 'netmask': '255.0.0.0', 'addr': '127.0.0.1'}]

You might be wondering why this value is a list. The reason is that it's possible for an interface to have more than one address, even within the same family. I'll say that again: you can have more than one address of the same type associated with each interface.

Asking for "the" address of a particular interface doesn't make sense.

Right, so, we can see that this particular interface only has one address, and, because it's a loopback interface, it's point-to-point and therefore has a peer address rather than a broadcast address.

Let's look at a more interesting interface.

>>> addrs = netifaces.ifaddresses('en0')
>>> addrs[netifaces.AF_INET]
[{'broadcast': '10.15.255.255', 'netmask': '255.240.0.0', 'addr': '10.0.1.4'}, {'broadcast': '192.168.0.255', 'addr': '

Size

37.9 KB

Downloads

127

Tags

bdist/wheel whl linux_x86_64 cp37 cp37m latest

Status  Completed
Checksum (MD5) ad82074928ba46ac454fc3554fec80f7
Checksum (SHA-1) b2b95ea482043083fd9d8283bf79bf62ecab9ac6
Checksum (SHA-256) bd5242e31abb7118808af3ff0106db26f571910945dd36ce1f201cbdfbc6e7b8
Checksum (SHA-512) 464f82b92180e459a4b9eaf88cb2ad0edb30e100eb43ab9202052061cc84445dbf…
GPG Signature
Storage Region  Dublin, Ireland
Type  Binary (contains binaries and binary artifacts)
Uploaded At 4 years, 10 months ago
Uploaded By quan
Slug Id netifaces-0109-cp37-cp37m-linux_x86_64whl
Unique Id lOnnknbnsqp0
Version (Raw) 0.10.9
Version (Parsed)
  • Major: 0
  • Minor: 10
  • Patch: 9
  • Type: SemVer (Strict)
  extended metadata
Abi cp37m
Classifiers Development Status :: 4 - Beta | Intended Audience :: Developers | License :: OSI Approved :: MIT License | Programming Language :: Python | Programming Language :: Python :: 2 | Programming Language :: Python :: 2.5 | Programming Language :: Python :: 2.6 | Programming Language :: Python :: 2.7 | Programming Language :: Python :: 3 | Programming Language :: Python :: 3.4 | Programming Language :: Python :: 3.5 | Programming Language :: Python :: 3.6 | Topic :: System :: Networking
Homepage URL https://github.com/al45tair/netifaces
Metadata Version 2.1
Py Filetype bdist_wheel
Py Version cp37
pkg netifaces-0.10.9-cp37-cp37m-lin… 127
37.9 KB
md5 sha1 sha256 sha512
Package Contents (netifaces-0.10.9-cp37-cp37m-linux_x86_64.whl)
Loading...

This package has 9 files/directories.

Security Scanning:
You can't see this because your subscription doesn't include this feature, sorry!

With Security Scanning, Cloudsmith will scan your artifacts for vulnerabilities when they're uploaded. These are then presented to you via the UI and the API, so that you can build rules into your CI/CD pipelines to decide how to handle low, medium, high and critical software vulnerabilities.

If you'd like to trial or ask about the Security Scanning feature, just ask us. We'll be happy to help!

Last scanned

3 hours ago

Scan result

Vulnerable

Vulnerability count

3

Max. severity

Critical
Target:
MEDIUM

CVE-2492-28745: library: vulnerability title



Package Name: package_name
Installed Version: 1.1.53
Fixed Version: 2.2.12

References: williams.net www.allison-cook.org www.morales-morris.com
MEDIUM

CVE-4251-31930: library: vulnerability title



Package Name: package_name
Installed Version: 1.3.93
Fixed Version: 2.9.67

References: www.fields-terry.com davenport.com www.lambert-dalton.com
MEDIUM

CVE-3154-45716: library: vulnerability title



Package Name: package_name
Installed Version: 1.4.28
Fixed Version: 2.1.87

References: villa.org www.white.com www.drake.com

You can embed a badge in another website that shows this or the latest version of this package.

To embed the badge for this specific package version, use the following:

[![This version of 'netifaces' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/0.10.9/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/?render=true)](https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/0.10.9/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/)
|This version of 'netifaces' @ Cloudsmith|
.. |This version of 'netifaces' @ Cloudsmith| image:: https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/0.10.9/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/?render=true
   :target: https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/0.10.9/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/
image::https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/0.10.9/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/?render=true[link="https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/0.10.9/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/",title="This version of 'netifaces' @ Cloudsmith"]
<a href="https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/0.10.9/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/0.10.9/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/?render=true" alt="This version of 'netifaces' @ Cloudsmith" /></a>

rendered as: This version of 'netifaces' @ Cloudsmith

To embed the badge for the latest package version, use the following:

[![Latest version of 'netifaces' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/latest/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/?render=true&show_latest=true)](https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/latest/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/)
|Latest version of 'netifaces' @ Cloudsmith|
.. |Latest version of 'netifaces' @ Cloudsmith| image:: https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/latest/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/?render=true&show_latest=true
   :target: https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/latest/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/
image::https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/latest/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/?render=true&show_latest=true[link="https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/latest/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/",title="Latest version of 'netifaces' @ Cloudsmith"]
<a href="https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/latest/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/latest/a=linux_x86_64;xa=cp37m;xf=bdist_wheel;xn=netifaces;xv=cp37/?render=true&show_latest=true" alt="Latest version of 'netifaces' @ Cloudsmith" /></a>

rendered as: Latest version of 'netifaces' @ Cloudsmith

These instructions assume you have setup the repository first (or read it).

To install/use netifaces @ version 0.10.9 ...

pip install 'netifaces==0.10.9'

You can also install the latest version of this package:

pip install --upgrade 'netifaces'

If necessary, you can specify the repository directly:

pip install \
  --index-url=https://dl.cloudsmith.io/public/agriconnect/python-musl/python/simple/ \
  netifaces==0.10.9

If you've got a project requirements.txt file, you can specify this as a dependency:

--index-url=https://dl.cloudsmith.io/public/agriconnect/python-musl/python/simple/
netifaces==0.10.9

In addition, you can use this repository as an extra index url. However, please read our documentation on this parameter before using it. For example in a requirements.txt file:

--extra-index-url=https://dl.cloudsmith.io/public/agriconnect/python-musl/python/simple/
netifaces==0.10.9
Warning: We highly recommend using pip (or similar) rather than installing directly.
Previous Version
Next Version
Top