neutron-lib
Neutron shared routines and utilities
What it is and what it does
Neutron-lib is a shared library within the OpenStack Neutron networking ecosystem that extracts common code, constants, validators, and utilities used across Neutron plugins and related projects. It exists to reduce duplication and provide a stable, versioned interface for code that multiple Neutron components depend on.
The library is built on top of Oslo libraries (oslo.config, oslo.db, oslo.policy, etc.) and other OpenStack infrastructure components, and is primarily consumed by Neutron plugins, agents, and related OpenStack networking services. It is not a general-purpose networking library, but rather an internal abstraction layer for the OpenStack Neutron project itself.
Use it for:
- Developing or extending OpenStack Neutron plugins that need access to shared constants, validators, and common abstractions.
- Building Neutron agents or services that require standardized configuration, logging, and policy handling via Oslo libraries.
- Integrating with OpenStack deployments where Neutron plugin code needs a stable, versioned set of shared utilities.
- Accessing OpenStack-specific networking constants and data models used across Neutron components.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Neutron-lib provides shared routines, utilities, and common abstractions for OpenStack Neutron networking projects, reducing code duplication across the Neutron ecosystem.
Yes, if you are developing or deploying OpenStack Neutron plugins or related networking services. No, if you are building standalone networking applications outside the OpenStack ecosystem—this library is tightly coupled to OpenStack infrastructure and has no value outside that context.
Install
neutron-lib on PyPI
pip
pip install neutron-libuv
uv add neutron-libpoetry
poetry add neutron-libInstalling neutron-lib
Before you install
Low install friction with a pure-Python wheel. Active maintenance with a release within the last day. Depends on 24 runtime packages, mostly Oslo libraries and other OpenStack components, which is typical for OpenStack infrastructure code.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, typical for OpenStack projects.
Quickstart
pip install neutron-lib
from neutron_lib import constants
from neutron_lib.api import validators
# Use shared constants and validators
port_id = constants.DEVICE_OWNER_COMPUTE_PREFIX
Requires Python 3.11 or later; intended for OpenStack deployments and Neutron plugin development.
Verify before relying
- Specific API surface and which Neutron plugin use cases are best served by this library versus direct Neutron imports.
- Whether the 24 runtime dependencies are all required for typical usage or if many are optional/conditional.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 24 — pbr, SQLAlchemy, pecan, keystoneauth1, netaddr, stevedore, os-ken, oslo.concurrency, oslo.config, oslo.context, oslo.db, oslo.i18n, oslo.log, oslo.messaging, oslo.policy, oslo.serialization, oslo.service, oslo.utils, oslo.versionedobjects, osprofiler, setproctitle, WebOb, os-traits, debtcollector |
| Maintenance | actively maintained — 1 days since the last release |
| First released | |
| Downloads | 161,217/month — #10,640 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: neutron_lib-5.0.0-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
python-neutronclientPython bindings and client library for the…
permissive · top 15,000 on PyPI
ruamel.baseProvides a shared foundation for ruamel…
permissive · top 15,000 on PyPI
os-kenos-ken is a component-based software defined…
permissive · top 15,000 on PyPI
glance-storeGlance Store Library provides backend storage…
permissive · top 15,000 on PyPI
braintrust-coreProvides shared core dependencies for packages…
unclear · top 5,000 on PyPI
os-vifos-vif provides a library for managing the…
permissive · top 15,000 on PyPI
os-testros-testr wraps the testr test runner to provide…
permissive · top 15,000 on PyPI
oslo.vmwareoslo.vmware provides a library for common…
permissive · top 15,000 on PyPI
scverse-miscProvides shared utility functions and helpers…
permissive · top 5,000 on PyPI
oslo.cacheoslo.cache wraps dogpile.cache to provide a…
permissive · top 15,000 on PyPI