grpc_framework.utils package

Submodules

grpc_framework.utils.credentials module

load_credential utils

grpc_framework.utils.credentials.load_credential_from_args(args)[source]

load credential from command

Args:
args(str): str join ,
Returns:
list of credential content
grpc_framework.utils.credentials.load_credential_from_file(filepath)[source]

grpc_framework.utils.log module

logging utils

class grpc_framework.utils.log.RequireDebugFalse(name='')[source]

Bases: logging.Filter

filter(record)[source]

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.

class grpc_framework.utils.log.RequireDebugTrue(name='')[source]

Bases: logging.Filter

filter(record)[source]

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.

class grpc_framework.utils.log.ServerFormatter(*args, **kwargs)[source]

Bases: logging.Formatter

format(record)[source]

Format the specified record as text.

The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.

uses_server_time()[source]
grpc_framework.utils.log.configure_logging(logging_config, logging_settings)[source]
grpc_framework.utils.log.log_response(message, response, logger=<Logger grpc.server (WARNING)>, level=None, exc_info=None)[source]

grpc_framework.utils.tools module

Generation class for grpc_tools.protoc

class grpc_framework.utils.tools.Generation(app)[source]

Bases: object

Generation class for grpc_tools.protoc

build_package_protos(app_root, strict_mode=False)[source]
run()[source]

Module contents