osc-lib
OpenStackClient Library
What it is and what it does
osc-lib is a library extracted from OpenStackClient that provides reusable components for building OpenStack command-line tools and plugins. It bundles common modules for authentication, command handling, API interaction, logging, and CLI utilities that were previously embedded in the main OpenStackClient codebase.
Developers use osc-lib to write OSC plugins or standalone CLI tools that need to interact with OpenStack APIs. It abstracts away authentication (via keystoneauth1), session management, command framework scaffolding (via cliff), and common utilities, so plugin authors can focus on their specific command logic rather than reinventing OpenStack integration plumbing.
Use it for:
- Writing custom OpenStackClient plugins that extend the base OSC command set for domain-specific operations
- Building standalone command-line tools that need OpenStack API authentication and session handling without reimplementing it
- Migrating code from the main OpenStackClient repository to a shared plugin architecture using osc-lib's common modules
- Implementing CLI commands that leverage osc-lib's command framework and argument parsing utilities
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
osc-lib provides a shared library of common modules and utilities for building OpenStackClient (OSC) plugins and command-line tools that interact with OpenStack APIs.
Yes, if you are building OpenStackClient plugins or CLI tools for OpenStack. The library is actively maintained, has no known vulnerabilities, and low install friction. It is not a general-purpose package—install it only as a dependency for OSC plugin development or when explicitly required by OpenStack tooling.
Install
osc-lib on PyPI
pip
pip install osc-libuv
uv add osc-libpoetry
poetry add osc-libInstalling osc-lib
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a release 35 days ago. Requires Python 3.11 or later and depends on established OpenStack libraries (keystoneauth1, openstacksdk) and common utilities (cliff, stevedore, oslo packages).
License in practice
Licensed under Apache 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and license inclusion.
Quickstart
pip install osc-lib
from osc_lib.command import command
from osc_lib.utils import columns
class MyCommand(command.Command):
pass
Requires Python 3.11 or later; designed for building OSC plugins rather than standalone CLI use.
Verify before relying
- Whether osc-lib is suitable for direct end-user CLI use or primarily intended as a plugin/framework dependency for OpenStackClient extensions
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — cliff, keystoneauth1, openstacksdk, oslo.i18n, oslo.utils, pbr, requests, stevedore |
| Maintenance | actively maintained — 35 days since the last release |
| First released | |
| Downloads | 868,244/month — #4,852 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: osc_lib-4.7.0-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
osc-placementProvides a command-line interface to the…
permissive · top 15,000 on PyPI
python-openstackclientA unified command-line client for OpenStack…
permissive · top 5,000 on PyPI
python-swiftclientPython client library for OpenStack Object…
permissive · top 15,000 on PyPI
python-octaviaclientpython-octaviaclient is an OpenStack Client…
permissive · top 15,000 on PyPI
python-zaqarclientPython client library for the OpenStack Zaqar…
permissive · top 15,000 on PyPI
os-client-configCollects and manages OpenStack cloud client…
permissive · top 15,000 on PyPI
python-troveclientPython client library and command-line tool for…
permissive · top 15,000 on PyPI
python-heatclientPython client library and command-line tool for…
permissive · top 15,000 on PyPI
python-neutronclientPython bindings and client library for the…
permissive · top 15,000 on PyPI
python-glanceclientPython client library and command-line tool for…
permissive · top 15,000 on PyPI