Added function to ping a host

This commit is contained in:
2024-04-07 14:24:43 +02:00
parent 439a7d545e
commit 87a3ee2886
1517 changed files with 278486 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
"""Module containing service classes and functions"""
import string
import random
def random_text(size):
"""Returns a random text of the specified size
:param size: Size of the random string, must be greater than 0
:type size int
:return: Random string
:rtype: str"""
return ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(size))