<commit_before>"""
Consulate: A client library for Consul

"""
__version__ = '0.5.0'

import logging
try:
    from logging import NullHandler
except ImportError:

    class NullHandler(logging.Handler):
        """Python 2.6 does not have a NullHandler"""

        def emit(self, record):
            """Emit a record
            :param record record: The record to emit
            """
            pass


logging.getLogger('consulate').addHandler(NullHandler())

from consulate import adapters
from consulate import api
from consulate import utils

DEFAULT_HOST = 'localhost'
DEFAULT_PORT = 8500
DEFAULT_SCHEME = 'http'
VERSION = 'v1'


class Consul(object):
    """Access the Consul HTTP API via Python.

    The default values connect to Consul via ``localhost:8500`` via http. If
    you want to connect to Consul via a local UNIX socket, you'll need to
    override both the ``scheme``, ``port`` and the ``adapter`` like so:

    .. code:: python

        consul = consulate.Consul('localhost', None, scheme='http+unix',
                                  adapters=consulate.adapters.UnixSocketRequest)
        services = consul.agent.services()

    :param str host: The host name to connect to (Default: localhost)
    :param int port: The port to connect on (Default: 8500)
    :param str datacenter: Specify a specific data center
    :param str token: Specify a ACL token to use
    :param str scheme: Specify the scheme (Default: http)
    :param class adapter: Specify to override the request adapter
        (Default: :py:class:`consulate.adapters.Request`)

    """

    def __init__(self,
                 host=DEFAULT_HOST,
                 port=DEFAULT_PORT,
                 datacenter=None,
                 token=None,
                 scheme=DEFAULT_SCHEME,
                 adapter=None):
        """Create a new instance of the Consul class"""<commit_msg>Fix docstring w.r.t. http+unix usage<commit_after>"""
Consulate: A client library for Consul

"""
__version__ = '0.5.0'

import logging
try:
    from logging import NullHandler
except ImportError:

    class NullHandler(logging.Handler):
        """Python 2.6 does not have a NullHandler"""

        def emit(self, record):
            """Emit a record
            :param record record: The record to emit
            """
            pass


logging.getLogger('consulate').addHandler(NullHandler())

from consulate import adapters
from consulate import api
from consulate import utils

DEFAULT_HOST = 'localhost'
DEFAULT_PORT = 8500
DEFAULT_SCHEME = 'http'
VERSION = 'v1'


class Consul(object):
    """Access the Consul HTTP API via Python.

    The default values connect to Consul via ``localhost:8500`` via http. If
    you want to connect to Consul via a local UNIX socket, you'll need to
    override both the ``scheme``, ``port`` and the ``adapter`` like so:

    .. code:: python

        consul = consulate.Consul('/path/to/socket', None, scheme='http+unix',
                                  adapter=consulate.adapters.UnixSocketRequest)
        services = consul.agent.services()

    :param str host: The host name to connect to (Default: localhost)
    :param int port: The port to connect on (Default: 8500)
    :param str datacenter: Specify a specific data center
    :param str token: Specify a ACL token to use
    :param str scheme: Specify the scheme (Default: http)
    :param class adapter: Specify to override the request adapter
        (Default: :py:class:`consulate.adapters.Request`)

    """

    def __init__(self,
                 host=DEFAULT_HOST,
                 port=DEFAULT_PORT,
                 datacenter=None,
                 token=None,
                 scheme=DEFAULT_SCHEME,
                 adapter=None):
        """Create a new instance of the Consul class"""
{'fraction_non_alphanumeric': 0.09122157588577472, 'fraction_numerical': 0.009518773135906928, 'mean_word_length': 2.5789971617786187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3787867', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1014, 'n_words': 379}