本文整理汇总了Python中utils.get_value函数的典型用法代码示例。如果您正苦于以下问题:Python get_value函数的具体用法?Python get_value怎么用?Python get_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_value函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
self.image_name = get_value("REDIS_IMAGE")
docker_hosts = get_value("DOCKER_HOSTS")
sentinel_hosts = get_value("SENTINEL_HOSTS")
self.sentinel_hosts = json.loads(sentinel_hosts)
self.docker_hosts = json.loads(docker_hosts)
self.port_range_start = 49153
示例2: __init__
def __init__(self):
url = get_value("ZABBIX_URL")
user = get_value("ZABBIX_USER")
password = get_value("ZABBIX_PASSWORD")
self.host_id = get_value("ZABBIX_HOST")
self.interface_id = get_value("ZABBIX_INTERFACE")
from pyzabbix import ZabbixAPI
self.zapi = ZabbixAPI(url)
self.zapi.login(user, password)
self.items = self.mongo()['redisapi']['zabbix']
示例3: __init__
def __init__(self):
url = get_value("ZABBIX_URL")
user = get_value("ZABBIX_USER")
password = get_value("ZABBIX_PASSWORD")
self.host_id = get_value("ZABBIX_HOST")
self.host_name = os.environ.get("ZABBIX_HOST_NAME", "Zabbix Server")
self.interface_id = get_value("ZABBIX_INTERFACE")
from pyzabbix import ZabbixAPI
self.zapi = ZabbixAPI(url)
self.zapi.login(user, password)
self.items = self.mongo()["zabbix"]
示例4: agregar
def agregar(request):
"""
Agrega una nueva expecialidad de Medico
"""
plantilla = get_template('especialidades/nueva.html')
dict = generar_base_dict(request)
dict['titulo'] = 'Agregar Expecialidad'
query = int(request.POST.get('query', '0'))
dict['query'] = query
if query:
nombre = get_value(request, 'nombre', '')
if nombre != '':
if not(Expecialidades.objects.filter(nombre=nombre)):
exp = Expecialidades(nombre=nombre)
exp.save()
dict['msj_class'] = MSJ_OK
dict['mensaje'] = 'Se a Agregado %s' %nombre
else:
dict['msj_class'] = MSJ_ERROR
dict['mensaje'] = 'Error la expecialidad ya existe %s' %nombre
contexto = Context(dict)
html = plantilla.render(contexto)
return HttpResponse(html)
示例5: get_variable_value
def get_variable_value(self, name, value_type=None):
variable_sets = self.get_variable_sets(name)
# Nothing ?
if not variable_sets:
return None
# Get the last value
return get_value(variable_sets[-1], value_type)
示例6: obtain_data_set_avg
def obtain_data_set_avg(self):
result = []
now_value = utils.get_value(self.locations, self.raw_value)
if not utils.check_list_null(self.data_sets):
compare_set = map(utils.get_avg, self.data_sets)
return now_value, compare_set
else:
return None, None
示例7: releasetime
def releasetime(self):
return get_value(self._releasetime, self.envelope)
示例8: sustaintime
def sustaintime(self):
return get_value(self._sustaintime, self.envelope)
示例9: sustainlevel
def sustainlevel(self):
return get_value(self._sustainlevel, self.envelope)
示例10: speed
def speed(self):
return get_value(self._speed, self.signalchain)
示例11: volume
def volume(self):
return get_value(self._volume, self.parent)
示例12: freerun
def freerun(self):
return get_value(self._freerun, self.envelope)
示例13: legato
def legato(self):
return get_value(self._legato, self.envelope)
示例14: exponentialslope
def exponentialslope(self):
return get_value(self._exponentialslope, self.envelope)
示例15: loop
def loop(self):
return get_value(self._loop, self.envelope)