Registry / devops / neutron

neutron

JSON →
library28.0.0pypypi✓ verified 84d ago

OpenStack Networking (neutron) is an SDN networking project for OpenStack that provides network connectivity as a service between interface devices managed by other OpenStack services. This entry covers the Python client library (not the system service). Version 28.0.0 requires Python >=3.10.

pip install python-neutronclient
INSTALL
IMPORT
SIG · NEUTRON
N
neutron
devopspythonv28.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from neutronclient.v2_0 import client
import neutronclient
The correct way to get the client class is from neutronclient.v2_0.client.

Authenticate using Keystone V3 password and list networks.

from neutronclient.v2_0 import client from keystoneauth1 import session from keystoneauth1.identity import v3 auth = v3.Password(auth_url='http://YOUR_OS_AUTH_URL/v3', username=os.environ.get('OS_USERNAME', ''), password=os.environ.get('OS_PASSWORD', ''), project_name=os.environ.get('OS_PROJECT_NAME', ''), user_domain_name='Default', project_domain_name='Default') sess = session.Session(auth=auth) neutron = client.Client(session=sess) # List networks for net in neutron.list_networks()['networks']: print(net['name'], net['id'])
Debug
Known issues
deprecatedAPI v2.0 is the current stable version; older versions (v1, v2.0) are deprecated.
fix
Use neutronclient.v2_0.client.
affects: all
breakingIn version 28.0.0, support for Python 3.8 and 3.9 was dropped. Requires Python >=3.10.
fix
Upgrade Python to 3.10 or later.
affects: >=28.0.0
gotchaThe neutronclient package is separate from the neutron service. Do not install 'neutron' directly; it installs the server-side service, not the client.
fix
Install python-neutronclient instead of neutron.
affects: all
gotchaWhen using session authentication, ensure the 'endpoint_type' is set if you need public/internal/admin endpoints. Default is 'public'.
fix
client.Client(session=sess, endpoint_type='internal')
affects: all
Errors
Common errors & fixes
AttributeError: module 'neutronclient' has no attribute 'client'
Importing the top-level module instead of the specific submodule.
fix
Use: from neutronclient.v2_0 import client
keystoneauth1.exceptions.http.Unauthorized: Unauthorized (HTTP 401)
Authentication credentials missing or incorrect.
fix
Set environment variables OS_USERNAME, OS_PASSWORD, OS_AUTH_URL, OS_PROJECT_NAME.
neutronclient.common.exceptions.EndpointNotFound: Endpoint not found
Service catalog does not contain a matching endpoint for the requested region or service type.
fix
Check that the endpoint is accessible and your OpenStack deployment has the networking service enabled.
Upgrade
Version history
28.0.0latest on PyPI · released Apr 1, 2026
Audit
Dependencies
keystoneauth1requiredAuthentication for OpenStack APIs
Agent activity
4 hits · last 30 days
node
4
Resources

No resource links recorded.

neutron — pip install neutron · libregistry