File: usage.rst

package info (click to toggle)
python-shade 1.30.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,196 kB
  • sloc: python: 33,354; sh: 111; makefile: 15
file content (21 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
=====
Usage
=====

To use shade in a project:

.. code-block:: python

  import shade

For a simple example, see :ref:`usage_example`.

.. note::
  API methods that return a description of an OpenStack resource (e.g.,
  server instance, image, volume, etc.) do so using a `munch.Munch` object
  from the `Munch library <https://github.com/Infinidat/munch>`_. `Munch`
  objects can be accessed using either dictionary or object notation
  (e.g., ``server.id``, ``image.name`` and ``server['id']``, ``image['name']``)

.. autoclass:: shade.OpenStackCloud
   :members: