Skip to main content

Fayouts can do a lot, but they are just a tool

Project description

Datetime Module

Datetime 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 Docs

First, 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)
31
1| print(getData().year)
2022
1| print(getData().dateUs)
03.01.2022
1| print(getData().weekday)
Monday

Start Module

The 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 Docs

1 Create a folder with the name of your project

2 Create a main.py file in the root of the folder

3 In the file, write the following command

1| import fayouts.start.newproject

4 Run the main.py file, after creating the project, delete it

Files Module

The Files module lets you work with files much easier than in the original Python.

Files Docs

Functions

1 writeFile will let you write anything to a file

2 readFile will allow you to read all text from a file

3 addToFile will allow you to add some text to the file Differences: Python

file = open('name.txt', 'w')
file.write('Some text')
file.close()

Fayouts

writeFile('name.txt', 'Some text')

Python

file = open('name.txt', 'r')
print(file.read())
file.close()

Fayouts

print(readFile('name.txt'))

Aiobot Module

Attention! 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 Docs

To create a project, you need to create a main.py file and write:

import fayouts.aiobot.startproject

You 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 program

Discobot Module

The Discobot module allows you to work with the Discord plugin to create discord bots.

Discobot Docs

To create a project, you need to create a main.py file and write:

import fayouts.discobot.startproject

Fayouts Module

version 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 Docs

First, 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 fayouts
from fayouts.fayouts.main import *

# Fayout initialize
myfayout = Fayout('main')

After that, our fayout is ready to go. Let's get acquainted with its methods:

# Create a new field
myfayout.New('Field Name', 'Field Content')

# Reading an already created field
print(myfayout.Read('Field Name'))
-> Field Content

# Modifying an already created field
myfayout.Edit('Field Name', 'New Field Content')

# Deleting an already created field by name
myfayout.Delete('Field Name')

# Deleting the already created first field
myfayout.FPop()

# Deleting an already created last field
myfayout.LPop()

# Get the index of the field
myfayout.GetIndex('Field Name')

How to work with fayout fields:

1 You cannot create more than one field with the same name

2 Can't read an uncreated field

3 You cannot edit a field that has not yet been created.

4 You cannot delete a field that has not yet been created.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fayouts-1.1.0.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fayouts-1.1.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file fayouts-1.1.0.tar.gz.

File metadata

  • Download URL: fayouts-1.1.0.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Windows/10

File hashes

Hashes for fayouts-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9c82db726669f47661762283d8ab71867db2e43b176a4b7526e77037f6779914
MD5 cd483fd4cd7ab8fb7967891efb2c5c84
BLAKE2b-256 e7536452a72637ee2e2eff17f63561e08f69d8336211fe649690fb4501a54e40

See more details on using hashes here.

File details

Details for the file fayouts-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: fayouts-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Windows/10

File hashes

Hashes for fayouts-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03c0bd92979ddbe0784edda40178d9e78b5fbefcb6d0e8faf1f952ee8d57b328
MD5 e62b49e87a4b048331d8ddbc86f84ab0
BLAKE2b-256 c5848fe0fd9e70005835cb9b6eed4cf4d57ce4fc33bffa7405e0e21f2253c801

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page