Files
opensearch-pyd/opensearchpy/connection/__init__.py
T
Harsha Vamsi KalluriandGitHub cfb2cf7b60 Adding async support for AWSSigV4 (#254)
* Adding async support for AWSSigV4

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Fix names for connection classes

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Update tests to async name space

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Add import exceptions to python < 3.6

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
2023-01-02 17:25:48 -05:00

53 lines
1.6 KiB
Python

# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
#
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import sys
from .base import Connection
from .http_requests import RequestsHttpConnection
from .http_urllib3 import Urllib3HttpConnection, create_ssl_context
__all__ = [
"Connection",
"RequestsHttpConnection",
"Urllib3HttpConnection",
"create_ssl_context",
]
try:
# Asyncio only supported on Python 3.6+
if sys.version_info < (3, 6):
raise ImportError
from .http_async import AsyncHttpConnection
__all__ += [
"AsyncHttpConnection",
]
except (ImportError, SyntaxError):
pass