Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(5)  |  Derive(0)  |  Import(4)

src/m/t/mt-serverland-HEAD/serverland/dashboard/api/protobuf_emitter.py   mt-serverland(Download)
from base64 import b64encode
from piston.emitters import Emitter
from serverland.protobuf.TranslationRequestMessage_pb2 import \
     TranslationRequestMessage, TranslationRequestObject, \
     TranslationRequestList
        tr_obj.ready = dict_obj['ready']
        if 'result' in dict_obj:
            result_obj = TranslationRequestMessage()
            result_obj.request_id = dict_obj['request_id']
            result_obj.source_language = dict_obj['source_language']

src/m/t/mt-serverland-HEAD/serverland/dashboard/models.py   mt-serverland(Download)
from serverland.settings import LOG_LEVEL, LOG_HANDLER, \
  TRANSLATION_MESSAGE_PATH
from serverland.protobuf.TranslationRequestMessage_pb2 import \
  TranslationRequestMessage
 
 
            # Try to create TranslationRequestMessage object from String.
            instance = TranslationRequestMessage()
            # pylint: disable-msg=E1101
            instance.ParseFromString(message)
            handle.close()
 
            message = TranslationRequestMessage()
            # pylint: disable-msg=E1101
            message.ParseFromString(serialized)

src/m/t/mt-serverland-HEAD/serverland/dashboard/api/handlers.py   mt-serverland(Download)
from serverland.dashboard.models import WorkerServer, TranslationRequest
from serverland.dashboard.forms import TranslationRequestForm
from serverland.protobuf.TranslationRequestMessage_pb2 import \
     TranslationRequestMessage
from serverland.settings import TRANSLATION_MESSAGE_PATH
        new.worker = form.cleaned_data['worker']
        # create a new worker message
        message = TranslationRequestMessage()
        message.request_id = new.request_id
        message.source_language = form.cleaned_data['source_language']

src/m/t/mt-serverland-HEAD/serverland/dashboard/views.py   mt-serverland(Download)
from serverland.settings import LOG_LEVEL, LOG_HANDLER, DEPLOYMENT_PREFIX, \
  TRANSLATION_MESSAGE_PATH, COMMIT_TAG
from serverland.protobuf.TranslationRequestMessage_pb2 import \
  TranslationRequestMessage
 
              pk=int(request.POST['worker']))
 
            message = TranslationRequestMessage()
            message.request_id = new.request_id
            message.source_language = request.POST['source_language']