Skip to content

Commit

Permalink
Add encoding.py file that imports encoding_helper and extra_types
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonGregg committed Jun 15, 2018
1 parent d18f568 commit d020d7c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 15 deletions.
38 changes: 38 additions & 0 deletions apitools/base/py/encoding.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env python
#
# Copyright 2015 Google Inc.
#
# Licensed 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.

"""Common code for converting proto to other formats, such as JSON."""

# pylint:disable=wildcard-import
from apitools.base.py.encoding_helper import *
import apitools.base.py.extra_types # pylint:disable=unused-import


# pylint:disable=undefined-all-variable
__all__ = [
'CopyProtoMessage',
'JsonToMessage',
'MessageToJson',
'DictToMessage',
'MessageToDict',
'PyValueToMessage',
'MessageToPyValue',
'MessageToRepr',
'GetCustomJsonFieldMapping',
'AddCustomJsonFieldMapping',
'GetCustomJsonEnumMapping',
'AddCustomJsonEnumMapping',
]
15 changes: 0 additions & 15 deletions apitools/base/py/encoding_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,6 @@
from apitools.base.protorpclite import protojson
from apitools.base.py import exceptions

__all__ = [
'CopyProtoMessage',
'JsonToMessage',
'MessageToJson',
'DictToMessage',
'MessageToDict',
'PyValueToMessage',
'MessageToPyValue',
'MessageToRepr',
'GetCustomJsonFieldMapping',
'AddCustomJsonFieldMapping',
'GetCustomJsonEnumMapping',
'AddCustomJsonEnumMapping',
]


_Codec = collections.namedtuple('_Codec', ['encoder', 'decoder'])
CodecResult = collections.namedtuple('CodecResult', ['value', 'complete'])
Expand Down

0 comments on commit d020d7c

Please sign in to comment.