File: __init__.py

package info (click to toggle)
python-googleapi 1.5.0-2~bpo8%2B1
  • links: PTS
  • area: main
  • in suites: jessie-backports
  • size: 28,336 kB
  • sloc: python: 6,808; makefile: 64; sh: 53; xml: 5
file content (42 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""Retain apiclient as an alias for googleapiclient."""

from six import iteritems

import googleapiclient

try:
  import oauth2client
except ImportError:
  raise RuntimeError(
      'Previous version of google-api-python-client detected; due to a '
      'packaging issue, we cannot perform an in-place upgrade. To repair, '
      'remove and reinstall this package, along with oauth2client and '
      'uritemplate. One can do this with pip via\n'
      '  pip install -I google-api-python-client'
  )

from googleapiclient import channel
from googleapiclient import discovery
from googleapiclient import errors
from googleapiclient import http
from googleapiclient import mimeparse
from googleapiclient import model
from googleapiclient import sample_tools
from googleapiclient import schema

__version__ = googleapiclient.__version__

_SUBMODULES = {
    'channel': channel,
    'discovery': discovery,
    'errors': errors,
    'http': http,
    'mimeparse': mimeparse,
    'model': model,
    'sample_tools': sample_tools,
    'schema': schema,
}

import sys
for module_name, module in iteritems(_SUBMODULES):
  sys.modules['apiclient.%s' % module_name] = module