Registry / devops / python-magnumclient

python-magnumclient

JSON →
library4.10.0pypypi✓ verified 86d ago

Client library for the OpenStack Magnum API, which manages containers and container orchestration engines (e.g., Kubernetes, Swarm). Current version 4.10.0, requires Python >=3.8. Releases follow OpenStack release cadence (approx. every 6 months with periodic stable updates).

pip install python-magnumclient
INSTALL
IMPORT
SIG · PYTHON-MAGNUMCLIEN
P
python-magnumclient
devopspythonv4.10.0
Install
10.1s avg
Import
1857ms
Disk
117MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.10.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.910 runs
installs and imports cleanly · install 0.0s · import 1.882s · 108.5MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 10.1s · import 1.831s · 110MB
117MB installed
● package 117MB
Code
Verified usage

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

client
from magnumclient import client
from magnum import client
Module is 'magnumclient', not 'magnum'
MagnumClient
from magnumclient.client import Client
from magnumclient import MagnumClient
The class is 'Client', not 'MagnumClient'. Instantiate with Client() or Client(version='1', ...)

Authenticate with OpenStack Keystone and list clusters.

from magnumclient import client from keystoneauth1 import session as ks_session from keystoneauth1.identity import v3 auth = v3.Password(auth_url='http://your-openstack:5000/v3', username='admin', password='secret', project_name='admin', user_domain_name='Default', project_domain_name='Default') sess = ks_session.Session(auth=auth) magnum = client.Client(session=sess, interface='public', region_name='RegionOne') print(magnum.clusters.list())
magnum --version
Debug
Known issues
breakingVersion 4.x dropped support for Python 2.7 and Python <3.8.
fix
Use Python >=3.8.
affects: >=4.0.0
gotchaThe commonly used 'magnumclient.client.Client()' may require explicit version argument; default version may not match your Magnum API.
fix
Pass version='1' (or the API microversion you need) to Client().
affects: All versions
breakingFrom version 3.x to 4.x, the 'magnum-api' service type changed from 'container-infra' to 'container' in Keystone catalog. Clients may fail to discover endpoints if configured with old service type.
fix
Ensure Keystone catalog has 'container' service type, or pass endpoint_override directly.
affects: >=4.0.0
Errors
Common errors & fixes
No module named 'magnum'
Importing the wrong module name; correct module is 'magnumclient'.
fix
Use 'from magnumclient import client'
magnumclient.exceptions.EndpointNotFound: Could not find a suitable endpoint
Keystone does not have the required service type in the catalog. Typically the service type is 'container' (not 'container-infra').
fix
Check Keystone service list for 'container' or set endpoint_override in the Client constructor.
Upgrade
Version history
4.10.0latest on PyPI · released Feb 27, 2026
Audit
Dependencies
keystoneauth1requiredAuthentication and session handling for OpenStack APIs
osc-librequiredOpenStackClient plugin support
python-openstackclientoptionalOptional: for use as an OSC plugin
Agent activity
8 hits · last 30 days
node
6
Resources
python-magnumclient — pip install python-magnumclient · libregistry