49 lines
949 B
Python
49 lines
949 B
Python
#!/usr/bin/env python
|
|
|
|
import random
|
|
import string
|
|
|
|
"""
|
|
Main Flask RESTful API
|
|
"""
|
|
|
|
__author__ = "@tormakris"
|
|
__copyright__ = "Copyright 2020, GoldenPogácsa Team"
|
|
__module_name__ = "messagesender"
|
|
__version__text__ = "1"
|
|
|
|
class MessageSender:
|
|
"""
|
|
Üzenetek küldéséért felelős komponens.
|
|
"""
|
|
|
|
def __init__(self):
|
|
"""
|
|
Inicializálja az osztályt.
|
|
"""
|
|
pass
|
|
|
|
|
|
def randomString(self, stringLength):
|
|
"""Generate a random string of fixed length """
|
|
letters = string.ascii_lowercase
|
|
return ''.join(random.choice(letters) for i in range(stringLength))
|
|
|
|
|
|
def createMessage(self, p) -> str:
|
|
"""
|
|
Ez egy metodus
|
|
:param szam:
|
|
:param szoveg:
|
|
:return: str tipus
|
|
"""
|
|
data = self.randomString(p)
|
|
|
|
return str(data)
|
|
pass
|
|
|
|
|
|
if __name__ == "__main__":
|
|
temp = MessageSender()
|
|
print(temp.createMessage(20))
|