File: vault_api_base.py

package info (click to toggle)
python-hvac 2.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,800 kB
  • sloc: python: 29,360; makefile: 42; sh: 14
file content (17 lines) | stat: -rw-r--r-- 479 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Base class used by all hvac "api" classes."""
import logging
from abc import ABCMeta

logger = logging.getLogger(__name__)


class VaultApiBase(metaclass=ABCMeta):
    """Base class for API endpoints."""

    def __init__(self, adapter):
        """Default api class constructor.

        :param adapter: Instance of :py:class:`hvac.adapters.Adapter`; used for performing HTTP requests.
        :type adapter: hvac.adapters.Adapter
        """
        self._adapter = adapter