1"""Retain apiclient as an alias for googleapiclient."""
2
3from six import iteritems
4
5import googleapiclient
6
7from googleapiclient import channel
8from googleapiclient import discovery
9from googleapiclient import errors
10from googleapiclient import http
11from googleapiclient import mimeparse
12from googleapiclient import model
13
14try:
15    from googleapiclient import sample_tools
16except ImportError:
17    # Silently ignore, because the vast majority of consumers won't use it and
18    # it has deep dependence on oauth2client, an optional dependency.
19    sample_tools = None
20from googleapiclient import schema
21
22__version__ = googleapiclient.__version__
23
24_SUBMODULES = {
25    "channel": channel,
26    "discovery": discovery,
27    "errors": errors,
28    "http": http,
29    "mimeparse": mimeparse,
30    "model": model,
31    "sample_tools": sample_tools,
32    "schema": schema,
33}
34
35import sys
36
37for module_name, module in iteritems(_SUBMODULES):
38    sys.modules["apiclient.%s" % module_name] = module
39