File: index.rst

package info (click to toggle)
python-pykube-ng 22.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 424 kB
  • sloc: python: 2,336; makefile: 44
file content (56 lines) | stat: -rw-r--r-- 1,065 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Pykube
======

.. image:: https://img.shields.io/pypi/v/pykube-ng.svg
   :target:  https://pypi.python.org/pypi/pykube-ng/

.. image:: https://img.shields.io/pypi/pyversions/pykube-ng.svg
   :target:  https://pypi.python.org/pypi/pykube-ng/

.. image:: https://img.shields.io/badge/license-apache-blue.svg
   :target:  https://pypi.python.org/pypi/pykube-ng/

Pykube (pykube-ng) is a lightweight Python 3+ client library for Kubernetes.

Installation
------------

To install pykube, use pip::

    pip install pykube-ng

Usage
-----

Query for all ready pods in a custom namespace:

.. code:: python

    import operator
    import pykube

    api = pykube.HTTPClient(pykube.KubeConfig.from_file())
    pods = pykube.Pod.objects(api).filter(namespace="gondor-system")
    ready_pods = filter(operator.attrgetter("ready"), pods)

Documentation
-------------

.. toctree::
   :maxdepth: 2
   :glob:

   howtos/index
   api/modules
   README <readme>
   changelog
   users



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`