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.
netifaces 0.10.9
One-liner (summary)
Description
netifaces 0.10.8
Linux/macOS | |
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': '
Status | Completed |
---|---|
Checksum (MD5) | e2657fa9ff32861056e81bb31f3c44b9 |
Checksum (SHA-1) | 5847695d394321e7a79b8aee3760799c03b4bd88 |
Checksum (SHA-256) | 3872ceb8ee36c75cec1e23affe2decaf5edc4bb497c9ed8181c9dd55c317a5a8 |
Checksum (SHA-512) | b3b66d05e0efbf954cfa0264eaa901adbf8f87a89833056c8daf4e76806460c8ff… |
GPG Signature | |
Storage Region | Dublin, Ireland |
Type | Binary (contains binaries and binary artifacts) |
Uploaded At | 5 years ago |
Uploaded By | |
Slug Id | netifaces-0109-cp36-cp36m-linux_x86_64whl |
Unique Id | DUCPRPuOMWgJ |
Version (Raw) | 0.10.9 |
Version (Parsed) |
|
extended metadata | |
Abi | cp36m |
Author | Alastair Houghton <alastair@alastairs-place.net> |
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 | cp36 |
pkg | netifaces-0.10.9-cp36-cp36m-lin… |
105
34.8 KB |
md5 | sha1 | sha256 | sha512 |
This package has 9 files/directories.
netifaces |
105 |
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
2 days, 3 hours ago
Scan result
Vulnerable
Vulnerability count
5
Max. severity
CriticalTarget: | ||
CRITICAL |
CVE-6502-23022: library: vulnerability titlePackage Name: package_name Installed Version: 1.8.42 Fixed Version: 2.10.85 References: www.moore.com mitchell-ford.com beltran.com |
|
CRITICAL |
CVE-3409-41648: library: vulnerability titlePackage Name: package_name Installed Version: 1.5.6 Fixed Version: 2.2.61 References: www.weber.com bowman-odonnell.net www.romero.biz |
|
HIGH |
CVE-9183-91043: library: vulnerability titlePackage Name: package_name Installed Version: 1.8.54 Fixed Version: 2.10.83 References: www.smith.com www.randolph.com brown-stein.info |
|
LOW |
CVE-2057-32351: library: vulnerability titlePackage Name: package_name Installed Version: 1.7.7 Fixed Version: 2.5.37 References: www.buchanan.com mcmahon-prince.net www.smith.com |
|
LOW |
CVE-5827-30766: library: vulnerability titlePackage Name: package_name Installed Version: 1.1.68 Fixed Version: 2.3.64 References: www.reid.com www.simpson-miller.com randall.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=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/?render=true)](https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/0.10.9/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/)
|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=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/?render=true
:target: https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/0.10.9/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/
image::https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/0.10.9/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/?render=true[link="https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/0.10.9/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/",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=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/0.10.9/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/?render=true" alt="This version of 'netifaces' @ Cloudsmith" /></a>
rendered as:
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=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/?render=true&show_latest=true)](https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/latest/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/)
|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=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/?render=true&show_latest=true
:target: https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/latest/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/
image::https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/latest/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/?render=true&show_latest=true[link="https://cloudsmith.io/~agriconnect/repos/python-musl/packages/detail/python/netifaces/latest/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/",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=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python-musl/python/netifaces/latest/a=linux_x86_64;xa=cp36m;xf=bdist_wheel;xn=netifaces;xv=cp36/?render=true&show_latest=true" alt="Latest version of 'netifaces' @ Cloudsmith" /></a>
rendered as:
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