Registry / aws / python-neutronclient

python-neutronclient

JSON →
library11.8.0pypypi✓ verified 35d ago

python-neutronclient is a client library for the OpenStack Networking (Neutron) API. It provides Python API bindings and previously included a command-line interface. As of version 11.8.0, the project is deprecated; its CLI code has been removed, and no new features will be added. All new development and migrations under OpenStack governance are directed towards using OpenStackSDK and OpenStack Client.

awshttp-networkingdevops
Install & Compatibility
Where this runs
tested against v12.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.954s · 113.2MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 10.1s · import 0.878s · 115MB
122MB installed
● package 122MB
Code
Verified usage

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

from neutronclient.v2_0 import client

This quickstart demonstrates how to authenticate with OpenStack Keystone using environment variables and then initialize the Neutron client to list networks. It uses `keystoneauth1` for robust session management.

import os from keystoneauth1 import identity from keystoneauth1 import session from neutronclient.v2_0 import client # Set these environment variables or replace with actual values OS_AUTH_URL = os.environ.get('OS_AUTH_URL', 'http://auth.example.com:5000/v3') OS_USERNAME = os.environ.get('OS_USERNAME', 'your_username') OS_PASSWORD = os.environ.get('OS_PASSWORD', 'your_password') OS_PROJECT_NAME = os.environ.get('OS_PROJECT_NAME', 'your_project_name') OS_USER_DOMAIN_NAME = os.environ.get('OS_USER_DOMAIN_NAME', 'Default') OS_PROJECT_DOMAIN_NAME = os.environ.get('OS_PROJECT_DOMAIN_NAME', 'Default') # Authenticate using Keystone v3 password flow auth = identity.Password( auth_url=OS_AUTH_URL, username=OS_USERNAME, password=OS_PASSWORD, project_name=OS_PROJECT_NAME, user_domain_name=OS_USER_DOMAIN_NAME, project_domain_name=OS_PROJECT_DOMAIN_NAME ) sess = session.Session(auth=auth) # Create a Neutron client instance neutron_client = client.Client(session=sess) # Example: List networks try: networks = neutron_client.list_networks() print("Networks:") for net in networks['networks']: print(f" - {net['name']} ({net['id']})") except Exception as e: print(f"Error listing networks: {e}")
Debug
Known footguns
breakingThe `python-neutronclient` project is officially deprecated. Its command-line interface (CLI) code has been deleted, and no new features will be added to the Python API bindings. Users are strongly encouraged to migrate to `openstacksdk` for Python API interactions and `openstackclient` for CLI operations.
deprecatedThe `neutron` CLI (provided by older versions of `python-neutronclient`) was deprecated from the OpenStack Ocata release. While `python-neutronclient` provided extensions for the unified `openstackclient`, the primary CLI for networking functionality is now `openstackclient`.
gotchaAuthenticating with OpenStack Identity (Keystone) v2.0 is deprecated. Using v2.0 may lead to authentication issues or limited functionality as OpenStack services increasingly require v3.0.
gotchaCommon authentication failures, such as `Unauthorized` or `EndpointNotFound`, often result from incorrect or missing OpenStack environment variables (e.g., `OS_AUTH_URL`, `OS_USERNAME`, `OS_PASSWORD`, `OS_PROJECT_NAME`, `OS_USER_DOMAIN_NAME`, `OS_PROJECT_DOMAIN_NAME`) or an expired authentication token.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
18 hits · last 30 days
dotbot
4
gptbot
4
ahrefsbot
4
bingbot
2
script
1
amazonbot
1
bytedance
1
Resources