# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['pykube']

package_data = \
{'': ['*']}

install_requires = \
['pyyaml', 'requests>=2.12']

extras_require = \
{'gcp': ['google-auth', 'jsonpath-ng'],
 'oidc': ['requests-oauthlib>=1.3.0,<2.0.0']}

setup_kwargs = {
    'name': 'pykube-ng',
    'version': '21.10.0',
    'description': 'Python client library for Kubernetes',
    'long_description': 'pykube-ng\n=========\n\n.. image:: https://img.shields.io/travis/hjacobs/pykube.svg\n   :target: https://travis-ci.org/hjacobs/pykube\n   :alt: Build status\n\n.. image:: https://coveralls.io/repos/github/hjacobs/pykube/badge.svg?branch=master;_=1\n   :target: https://coveralls.io/github/hjacobs/pykube?branch=master\n   :alt: Code Coverage\n\n.. image:: https://readthedocs.org/projects/pykube/badge/?version=latest\n   :target: https://pykube.readthedocs.io/\n   :alt: Documentation\n\n.. image:: https://img.shields.io/pypi/v/pykube-ng.svg\n   :target: https://pypi.python.org/pypi/pykube-ng/\n   :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pykube-ng.svg\n   :target: https://pypi.python.org/pypi/pykube-ng/\n   :alt: Python versions\n\n.. image:: https://img.shields.io/badge/license-apache-blue.svg\n   :target: https://pypi.python.org/pypi/pykube-ng/\n   :alt: Apache License\n\n.. image:: https://img.shields.io/badge/calver-YY.MM.MICRO-22bfda.svg\n   :target: http://calver.org/\n   :alt: CalVer\n\nPykube (pykube-ng) is a lightweight Python 3.6+ client library for Kubernetes.\n\nThis is a fork of `kelproject/pykube <https://github.com/kelproject/pykube>`_ which is no longer maintained (archived). Here the original text of the pykube README:\n\n    Kel is an open source Platform as a Service (PaaS) from Eldarion, Inc. that\n    makes it easy to manage web application deployment and hosting through the\n    entire lifecycle from development through testing to production. It adds\n    components and tools on top of Kubernetes that help developers manage their\n    application infrastructure. Kel builds on Eldarion\'s 7+ years experience running\n    one of the leading Python and Django PaaSes.\n    For more information about Kel, see `kelproject.com`_ or follow us on Twitter\n    `@projectkel`_.\n\n.. _kelproject.com: http://kelproject.com/\n.. _@projectkel: https://twitter.com/projectkel\n\nFeatures\n--------\n\n* HTTP interface using requests using kubeconfig for authentication\n* Python native querying of Kubernetes API objects\n\nInstallation\n------------\n\nTo install pykube, use pip::\n\n    pip install pykube-ng\n\n\nInteractive Console\n-------------------\n\nThe ``pykube`` library module can be run as an interactive console locally for quick exploration.\nIt will automatically load ``~/.kube/config`` to provide the ``api`` object, and it loads pykube classes (``Deployment``, ``Pod``, ..) into local context:\n\n.. code-block:: bash\n\n    python3 -m pykube\n    >>> [d.name for d in Deployment.objects(api)]\n\n\nUsage\n-----\n\nQuery for all ready pods in a custom namespace:\n\n.. code:: python\n\n    import operator\n    import pykube\n\n    api = pykube.HTTPClient(pykube.KubeConfig.from_file())\n    pods = pykube.Pod.objects(api).filter(namespace="gondor-system")\n    ready_pods = filter(operator.attrgetter("ready"), pods)\n\nAccess any attribute of the Kubernetes object:\n\n.. code:: python\n\n    pod = pykube.Pod.objects(api).filter(namespace="gondor-system").get(name="my-pod")\n    pod.obj["spec"]["containers"][0]["image"]\n\nSelector query:\n\n.. code:: python\n\n    pods = pykube.Pod.objects(api).filter(\n        namespace="gondor-system",\n        selector={"gondor.io/name__in": {"api-web", "api-worker"}},\n    )\n    pending_pods = pykube.objects.Pod.objects(api).filter(\n        field_selector={"status.phase": "Pending"}\n    )\n\nWatch query:\n\n.. code:: python\n\n    watch = pykube.Job.objects(api, namespace="gondor-system")\n    watch = watch.filter(field_selector={"metadata.name": "my-job"}).watch()\n\n    # watch is a generator:\n    for watch_event in watch:\n        print(watch_event.type) # \'ADDED\', \'DELETED\', \'MODIFIED\'\n        print(watch_event.object) # pykube.Job object\n\nCreate a Deployment:\n\n.. code:: python\n\n    obj = {\n        "apiVersion": "apps/v1",\n        "kind": "Deployment",\n        "metadata": {\n            "name": "my-deploy",\n            "namespace": "gondor-system"\n        },\n        "spec": {\n            "replicas": 3,\n            "selector": {\n                "matchLabels": {\n                    "app": "nginx"\n                }\n            },\n            "template": {\n                "metadata": {\n                    "labels": {\n                        "app": "nginx"\n                    }\n                },\n                "spec": {\n                    "containers": [\n                        {\n                            "name": "nginx",\n                            "image": "nginx",\n                            "ports": [\n                                {"containerPort": 80}\n                            ]\n                        }\n                    ]\n                }\n            }\n        }\n    }\n    pykube.Deployment(api, obj).create()\n\nDelete a Deployment:\n\n.. code:: python\n\n    obj = {\n        "apiVersion": "apps/v1",\n        "kind": "Deployment",\n        "metadata": {\n            "name": "my-deploy",\n            "namespace": "gondor-system"\n        }\n    }\n    pykube.Deployment(api, obj).delete()\n\nCheck server version:\n\n.. code:: python\n\n    api = pykube.HTTPClient(pykube.KubeConfig.from_file())\n    api.version\n\n\nRequirements\n------------\n\n* Python 3.6+\n* requests (included in ``install_requires``)\n* PyYAML (included in ``install_requires``)\n\n\nLocal Development\n-----------------\n\nYou can run pykube against your current kubeconfig context, e.g. local Minikube_:\n\n.. code-block:: bash\n\n    poetry install\n    poetry run python3\n    >>> import pykube\n    >>> config = pykube.KubeConfig.from_file()\n    >>> api = pykube.HTTPClient(config)\n    >>> list(pykube.Deployment.objects(api))\n\nTo run PEP8 (flake8) checks and unit tests including coverage report:\n\n.. code-block:: bash\n\n    make test\n\n\nLicense\n-------\n\nThe code in this project is licensed under the Apache License, version 2.0\n(included in this repository under LICENSE).\n\n\nContributing\n------------\n\nEasiest way to contribute is to provide feedback! We would love to hear what you like and what you think is missing.\nCreate an issue or `ping try_except_ on Twitter`_.\n\nPRs are welcome. Please also have a look at `issues labeled with "help wanted"`_.\n\n\nCode of Conduct\n----------------\n\nIn order to foster a kind, inclusive, and harassment-free community, this project follows the `Contributor Covenant Code of Conduct`_.\n\n.. _Contributor Covenant Code of Conduct: http://contributor-covenant.org/version/1/4/\n\n\n.. _ping try_except_ on Twitter: https://twitter.com/try_except_\n.. _issues labeled with "help wanted": https://codeberg.org/hjacobs/pykube-ng/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22\n.. _Minikube: https://github.com/kubernetes/minikube\n',
    'author': 'Eldarion, Inc.',
    'author_email': 'development@eldarion.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://codeberg.org/hjacobs/pykube-ng',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'extras_require': extras_require,
    'python_requires': '>=3.8',
}


setup(**setup_kwargs)
