当前位置: 首页>>代码示例>>Python>>正文


Python Observable.__init__方法代码示例

本文整理汇总了Python中meresco.core.Observable.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Observable.__init__方法的具体用法?Python Observable.__init__怎么用?Python Observable.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在meresco.core.Observable的用法示例。


在下文中一共展示了Observable.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, host=None, port=None, path=None, name=None, conversion=None):
     Observable.__init__(self, name=name)
     self._host = host
     self._port = port
     self._path = '' if path is None else path
     self._path += '/__lucene_remote__'
     self._conversion = Conversion() if conversion is None else conversion
开发者ID:FashtimeDotCom,项目名称:meresco-lucene,代码行数:9,代码来源:_remote.py

示例2: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, searchApiBaseUrl='https://api.histograph.io/search', **kwargs):
     Observable.__init__(self, **kwargs)
     parsedUrl = parseAbsoluteUrl(searchApiBaseUrl)
     self._host = parsedUrl.host
     self._port = parsedUrl.port
     self._path = parsedUrl.path
     self._ssl = (parsedUrl.scheme == 'https')
开发者ID:seecr,项目名称:dc-erfgeo-enrich,代码行数:9,代码来源:erfgeoquery.py

示例3: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, host=None, port=None, core=None):
     Observable.__init__(self)
     self._host = host
     self._port = port
     self._core = core
     if core is not None:
         self.observable_name = lambda: core
开发者ID:seecr,项目名称:meresco-solr,代码行数:9,代码来源:solrinterface.py

示例4: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, reactor, host=None, port=None, period=None, verbose=None, prio=None, name=None, err=None, autoStart=True, schedule=None, retryAfterErrorTime=30, compress=True):
     Observable.__init__(self, name=name)
     self._reactor = reactor
     self._host = host
     self._port = port
     self._schedule = schedule
     if schedule is None:
         if period is None:
             period = 1
         else:
             warn("Please use schedule instead of period.", DeprecationWarning) # since 2013-02-20
         self._schedule = Schedule(period=period)
     elif not period is None:
         raise ValueError("Using both schedule and period is invalid")
     self._prio = prio
     self._err = err or sys.stderr
     self._paused = not autoStart
     self._currentTimer = None
     self._currentProcess = None
     self._sok = None
     self._errorState = None
     self._retryAfterErrorTime = retryAfterErrorTime
     self._compress = compress
     if autoStart and (not self._host or not self._port):
         raise ValueError("Unless autoStart is set to False host and port need to be specified.")
     if verbose in [True, False]:
         warn('Verbose flag is deprecated', DeprecationWarning)
开发者ID:seecr,项目名称:meresco-components,代码行数:29,代码来源:periodicdownload.py

示例5: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, partName, namespace=None):
     Observable.__init__(self)
     if not correctNameRe.match(partName):
         raise Fields2XmlException('Invalid name: "%s"' % partName)
     self._identifier = None
     self._partName = partName
     self._namespace = namespace
开发者ID:seecr,项目名称:meresco-components,代码行数:9,代码来源:fields2xml.py

示例6: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, count, field, allowOverrideField=False, maximumCount=None, suggestMode=None):
     Observable.__init__(self)
     self._count = count
     self._field = field
     self._suggestMode = suggestMode
     self._allowOverrideField = allowOverrideField
     self._maximumCount = maximumCount
开发者ID:seecr,项目名称:meresco-components,代码行数:9,代码来源:suggestion.py

示例7: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, reactor, conversion=None, **kwargs):
     Observable.__init__(self, **kwargs)
     self._conversion = Conversion() if conversion is None else conversion
     self._dynamicHtml = DynamicHtml([dynamicPath],
             reactor=reactor,
             notFoundPage='notFound',
             additionalGlobals={
                 'VERSION': version,
                 'allCoreInfo': self._allCoreInfo,
                 'parseCql': parseString,
                 'cqlToExpression': cqlToExpression,
                 'cql2string': cql2string,
                 'dumps': dumps,
             }
         )
     self._internalTree = be((Observable(),
         (PathFilter('/', excluding=['/static', '/version']),
             (self._dynamicHtml,)
         ),
         (PathFilter('/static'),
             (PathRename(lambda path: path[len('/static'):]),
                 (FileServer(staticPath),)
             )
         ),
         (PathFilter('/version'),
             (StringServer("Meresco Lucene version %s" % version, ContentTypePlainText),)
         ),
     ))
开发者ID:seecr,项目名称:meresco-lucene,代码行数:30,代码来源:_service.py

示例8: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, name, settings, host=None, port=None, readonly=False, **kwargs):
     Observable.__init__(self, name=name)
     self._host, self._port = host, port
     self.settings = settings
     self._fieldRegistry = settings.fieldRegistry
     self._name = name
     self._readonly = readonly
开发者ID:seecr,项目名称:meresco-lucene,代码行数:9,代码来源:_lucene.py

示例9: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, serviceIdentifier, periodicDownloadName, sourceServiceType, sourceServiceIdentifier=None, pollIntervalConfigSelector=None, name=None, **kwargs):
     Observable.__init__(self, name)
     self._serviceIdentifier = serviceIdentifier
     self._periodicDownloadName = periodicDownloadName
     self._pollIntervalConfigSelector = pollIntervalConfigSelector or oaiDownloadConfigSelector
     self._sourceServiceType = sourceServiceType
     self._sourceServiceIdentifier = sourceServiceIdentifier
     self._extraKwargs = kwargs
开发者ID:seecr,项目名称:meresco-distributed,代码行数:10,代码来源:updateperiodicdownload.py

示例10: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, allowed=None, disallowed=None, **kwargs):
     Observable.__init__(self, **kwargs)
     if allowed and not disallowed:
         self._allowedMessage = lambda message: message in allowed
     elif disallowed and not allowed:
         self._allowedMessage = lambda message: message not in disallowed
     else:
         raise ValueError('Use disallowed or allowed')
开发者ID:seecr,项目名称:meresco-components,代码行数:10,代码来源:filtermessages.py

示例11: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, included=None, excluded=None):
     Observable.__init__(self)
     if included and excluded or not (included or excluded):
         raise ValueError("Use included OR excluded")
     if included:
         self._allowed = lambda name: name in included
     else:
         self._allowed = lambda name: not name in excluded
开发者ID:seecr,项目名称:meresco-components,代码行数:10,代码来源:filterdatabyname.py

示例12: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, should=None, could=None, namespaces=None, namespaceMap=None):
     Observable.__init__(self)
     if namespaceMap:
         warn("Please use 'namespaces=...'", DeprecationWarning)
         namespaces=namespaceMap
     self.xpath = _namespaces.copyUpdate(namespaces or {}).xpath
     self._should = _init(should)
     self._could = _init(could)
开发者ID:seecr,项目名称:meresco-components,代码行数:10,代码来源:venturi.py

示例13: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, title, description, link, antiUnaryClause='', **sruArgs):
     Observable.__init__(self)
     self._title = title
     self._description = description
     self._link = link
     self._antiUnaryClause = antiUnaryClause
     self._sortKeys = sruArgs.get('sortKeys', None)
     self._maximumRecords = sruArgs.get('maximumRecords', 10)
开发者ID:seecr,项目名称:meresco-components,代码行数:10,代码来源:rss.py

示例14: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, home="/", name=None):
     Observable.__init__(self, name=name)
     self._home = home
     self._actions = {
         'create': self.handleCreate,
         'update': self.handleUpdate,
         'delete': self.handleDelete,
     }
开发者ID:CatchPlus,项目名称:OAS-Open-Annotation-Service,代码行数:10,代码来源:dashboard.py

示例15: __init__

# 需要导入模块: from meresco.core import Observable [as 别名]
# 或者: from meresco.core.Observable import __init__ [as 别名]
 def __init__(self, name=None, stderr=stderr, sendRecordData=True, logErrors=True, enableCollectLog=False):
     Observable.__init__(self, name=name)
     self._stderr = stderr
     self._logErrors = logErrors
     self._sendRecordData = sendRecordData
     self._collectLogForScope = lambda **kwargs: None
     if enableCollectLog:
         self._collectLogForScope = collectLogForScope
开发者ID:seecr,项目名称:meresco-components,代码行数:10,代码来源:srurecordupdate.py


注:本文中的meresco.core.Observable.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。