Skip to content
Python Shell
Latest commit d97d92b Jun 22, 2016 @ynisha11 ynisha11 Improve docs for v3 projects
In preparation to add functional tests for v3 projects, this
change proposes to detail the method docs, because the tests
need to be based on them.

Change-Id: I3961945a2833fcd4a04c8e2fa294ecd3a12cfbe2


Python bindings to the OpenStack Identity API (Keystone)

Latest Version Downloads

This is a client for the OpenStack Identity API, implemented by the Keystone team; it contains a Python API (the keystoneclient module) for OpenStack's Identity Service. For command line interface support, use OpenStackClient.


Python API

By way of a quick-start:

# use v2.0 auth with
>>> from keystoneauth1.identity import v2
>>> from keystoneauth1 import session
>>> from keystoneclient.v2_0 import client
>>> auth = v2.Password(username=USERNAME, password=PASSWORD, tenant_name=TENANT, auth_url=AUTH_URL)
>>> sess = session.Session(auth=auth)
>>> keystone = client.Client(session=sess)
>>> keystone.tenants.list()
>>> tenant = keystone.tenants.create(tenant_name="test", description="My new tenant!", enabled=True)
>>> tenant.delete()
Something went wrong with that request. Please try again.