# 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 import traceback from datahub import DataHub from datahub.utils import Configer from datahub.models import Topic, RecordType, FieldType, RecordSchema, TupleRecord, CursorType from datahub.errors import DatahubException, ObjectAlreadyExistException configer = Configer('datahub.ini') access_id = configer.get('datahub', 'access_id', '') access_key = configer.get('datahub', 'access_key', '') endpoint = configer.get('datahub', 'endpoint', '') project_name = configer.get('datahub', 'project_name', 'pydatahub_project_test') topic_name = configer.get('datahub', 'topic_name', 'pydatahub_tuple_topic_test') print "=======================================" print "access_id: %s" % access_id print "access_key: %s" % access_key print "endpoint: %s" % endpoint print "project_name: %s" % project_name print "topic_name: %s" % topic_name print "=======================================\n\n" if not access_id or not access_key or not endpoint: