skillfed

neutron-lib

Neutron shared routines and utilities

neutron-lib v5.0.0 161.2K downloads/30d#10,640 on PyPI
Permissive license Apache-2.0 Active released

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-lib

uv

uv add neutron-lib

poetry

poetry add neutron-lib

Installing 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

Development Status :: 5 - Production/StableEnvironment :: OpenStackIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

openstack neutron shared libraryneutron utilities and helpersopenstack networking common codeneutron plugin development libraryopenstack network abstraction layer
openstackneutron-plugin

More Networking packages