Skip to content

Miscellaneous Reference

kevinbotlib.util

kevinbotlib.util.fullclassname(o)

Get the full name of a class

Parameters:

Name Type Description Default
o object

The class to retrieve the full name of

required

Returns:

Name Type Description
str str

The name of the module and class

kevinbotlib.util.is_binary()

Detect if the application is running as a frozen executable or not.

Returns:

Type Description
bool

Is frozen?

kevinbotlib.util.socket_exists(host='localhost', port=6379, timeout=1.0)

Check if a TCP socket exists Args: host: Host to check port: Port to check timeout: Socket connection timeout

Returns:

Type Description
bool

Socket exists?

kevinbotlib.util.is_unix_socket(path)

Detect if a path is a valid Unix socket.

Parameters:

Name Type Description Default
path

Socket path

required

Returns:

Type Description

Is a UNIX socket?

kevinbotlib.licenses

kevinbotlib.licenses.MDURL_LICENSE = '\nCopyright (c) 2015 Vitaly Puzrin, Alex Kocharin.\nCopyright (c) 2021 Taneli Hukkinen\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the "Software"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n--------------------------------------------------------------------------------\n\n.parse() is based on Joyent\'s node.js `url` code:\n\nCopyright Joyent, Inc. and other Node contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.' module-attribute

kevinbotlib.licenses.get_licenses()

Return all licenses of KevinbotLib and it's dependencies

Returns:

Type Description
dict[str, str]

dict[str, str]: license name-license text

kevinbotlib.deployment

kevinbotlib.deployment.GitManifestData

Bases: TypedDict

Git data generated by the deployment process.

branch instance-attribute

Git branch

tag instance-attribute

Git tag

commit instance-attribute

Git commit

kevinbotlib.deployment.Manifest dataclass

Manifest contents generated by the deployment process.

deploytool instance-attribute

KevinbotLib DeployTool Version

timestamp instance-attribute

Deployment UTC Timestamp

git instance-attribute

Deployment Git Data

robot instance-attribute

Deployed Robot Name

__init__(deploytool, timestamp, git, robot)

kevinbotlib.deployment.ManifestParser

Parser for the deployment manifest.

path property

Get the manifest path.

Returns:

Type Description
Path

pathlib.Path: Manifest path.

manifest property

Get the parsed manifest.

Returns:

Type Description
Manifest | None

Parsed manifest.

__init__(path=None)

Parse the deployment manifest.

Parameters:

Name Type Description Default
path Path | str | None

The deployment manifest path. Defaults to "deploy/manifest.json" in the current working directory.

None