本文整理汇总了Python中__version__.__version__方法的典型用法代码示例。如果您正苦于以下问题:Python __version__.__version__方法的具体用法?Python __version__.__version__怎么用?Python __version__.__version__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类__version__
的用法示例。
在下文中一共展示了__version__.__version__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_version
# 需要导入模块: import __version__ [as 别名]
# 或者: from __version__ import __version__ [as 别名]
def set_version(self):
version = "".join(['v', __version__, ' ', __release__])
self.set_label_text(self.ui.VersionLabel, version)
示例2: get_user_agent
# 需要导入模块: import __version__ [as 别名]
# 或者: from __version__ import __version__ [as 别名]
def get_user_agent(self):
# TODO: add the sewer-acme versionto the User-Agent
return "python-requests/{requests_version} ({system}: {machine}) sewer {sewer_version} ({sewer_url})".format(
requests_version=requests.__version__,
system=platform.system(),
machine=platform.machine(),
sewer_version=sewer_version.__version__,
sewer_url=sewer_version.__url__)
示例3: version
# 需要导入模块: import __version__ [as 别名]
# 或者: from __version__ import __version__ [as 别名]
def version():
print("Current Version : %s" % __version__)
示例4: __init__
# 需要导入模块: import __version__ [as 别名]
# 或者: from __version__ import __version__ [as 别名]
def __init__(
self,
domain_name,
dns_class,
domain_alt_names=[],
registration_recovery_email=None,
account_key=None,
bits=2048,
digest='sha256',
ACME_REQUEST_TIMEOUT=65,
ACME_CHALLENGE_WAIT_PERIOD=4,
GET_NONCE_URL="https://acme-v01.api.letsencrypt.org/directory",
ACME_CERTIFICATE_AUTHORITY_URL="https://acme-v01.api.letsencrypt.org",
ACME_CERTIFICATE_AUTHORITY_TOS='https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf',
ACME_CERTIFICATE_AUTHORITY_CHAIN='https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem'
):
self.logger = get_logger(__name__).bind(
client_name=self.__class__.__name__)
self.domain_name = domain_name
self.dns_class = dns_class
self.domain_alt_names = domain_alt_names
self.all_domain_names = copy.copy(self.domain_alt_names)
self.all_domain_names.insert(0, self.domain_name)
self.registration_recovery_email = registration_recovery_email
self.bits = bits
self.digest = digest
self.ACME_REQUEST_TIMEOUT = ACME_REQUEST_TIMEOUT
self.ACME_CHALLENGE_WAIT_PERIOD = ACME_CHALLENGE_WAIT_PERIOD
self.GET_NONCE_URL = GET_NONCE_URL
self.ACME_CERTIFICATE_AUTHORITY_URL = ACME_CERTIFICATE_AUTHORITY_URL
self.ACME_CERTIFICATE_AUTHORITY_TOS = ACME_CERTIFICATE_AUTHORITY_TOS
self.ACME_CERTIFICATE_AUTHORITY_CHAIN = ACME_CERTIFICATE_AUTHORITY_CHAIN
self.User_Agent = self.get_user_agent()
self.certificate_key = self.create_certificate_key()
self.csr = self.create_csr()
self.certificate_chain = self.get_certificate_chain()
if not account_key:
self.account_key = self.create_account_key()
self.PRIOR_REGISTERED = False
else:
self.account_key = account_key
self.PRIOR_REGISTERED = True
self.logger = self.logger.bind(
sewer_client_name=self.__class__.__name__,
sewer_client_version=sewer_version.__version__,
domain_names=self.all_domain_names,
ACME_CERTIFICATE_AUTHORITY_URL=self.ACME_CERTIFICATE_AUTHORITY_URL)
# for staging/test, use:
# GET_NONCE_URL="https://acme-staging.api.letsencrypt.org/directory",
# ACME_CERTIFICATE_AUTHORITY_URL="https://acme-staging.api.letsencrypt.org"