Package: fayouts
Datetime ModuleDatetime allows you to work with the current date and time. It adds only one function, and it allows you to get the date and time. Datetime is based on your PC's time zone.Datetime DocsFirst, you need to call the getData () function, which is called without parameters, then, separated by a period, you should indicate what you want to get, for example, minutes.1|print(getData().minutes)311|print(getData().year)20221|print(getData().dateUs)03.01.20221|print(getData().weekday)MondayStart ModuleThe Start Module allows you to create a new Python project, it creates a whole tree, including files, folders for source files, and so on. The module is called by a single import in a python file.Start Docs1 Create a folder with the name of your project2 Create a main.py file in the root of the folder3 In the file, write the following command1|importfayouts.start.newproject4 Run the main.py file, after creating the project, delete itFiles ModuleThe Files module lets you work with files much easier than in the original Python.Files DocsFunctions1 writeFile will let you write anything to a file2 readFile will allow you to read all text from a file3 addToFile will allow you to add some text to the file
Differences:
Pythonfile=open('name.txt','w')file.write('Some text')file.close()FayoutswriteFile('name.txt','Some text')Pythonfile=open('name.txt','r')print(file.read())file.close()Fayoutsprint(readFile('name.txt'))Aiobot ModuleAttention! This module does not work correctly on versions below 1.0.3!So far, the Aiobot module only allows you to create a template for the aiogram project, but soon there will be much more options. Unfortunately, it is impossible to guess exactly the structure of each bot, so my module creates just a simple template that everyone needs. I do not want to shove everything that is possible into this module at once, this is wrong, because this is how all customization disappears, all the opportunity to customize the bot for yourself.Aiobot DocsTo create a project, you need to create a main.py file and write:importfayouts.aiobot.startprojectYou can configure the bot in config.py, you must store all your filters in filters.py, and everything related to the bot itself in bot.py.
bot.py is the entry point to your bot's programDiscobot ModuleThe Discobot module allows you to work with the Discord plugin to create discord bots.Discobot DocsTo create a project, you need to create a main.py file and write:importfayouts.discobot.startprojectFayouts Moduleversion 1.1.0+The Fayouts module will allow you to create fields that persist even after the program is closed, you can refer to them by name from the Python code or from a .fy file.Fayouts DocsFirst, you need to create a file with the extension .fy and any name, in my case it will be main.fy, create it near the file from which you will access it.Next, we need to initialize our fayout, this is done with the following line in the main.py file:# Connecting a module to work with fayoutsfromfayouts.fayouts.mainimport*# Fayout initializemyfayout=Fayout('main')After that, our fayout is ready to go. Let's get acquainted with its methods:# Create a new fieldmyfayout.New('Field Name','Field Content')# Reading an already created fieldprint(myfayout.Read('Field Name'))->FieldContent# Modifying an already created fieldmyfayout.Edit('Field Name','New Field Content')# Deleting an already created field by namemyfayout.Delete('Field Name')# Deleting the already created first fieldmyfayout.FPop()# Deleting an already created last fieldmyfayout.LPop()# Get the index of the fieldmyfayout.GetIndex('Field Name')How to work with fayout fields:1 You cannot create more than one field with the same name2 Can't read an uncreated field3 You cannot edit a field that has not yet been created.4 You cannot delete a field that has not yet been created.