Упрощает какие-то функции
Project description
xa_izipy Lib
🎯 Target: Make Python easier (izi) 😎🔥
This library provides a few simple functions to simplify Python scripting — from detecting paths to importing built-in modules faster.
❓ Changes:
typing_text()- Changed the logic of the commandcheck_available()- New function
🛠️ Function List (default module)
-
help(choice="en")– Shows info about the library in selected language"en"by default"ru"for Russian- Example:
help("ru")orhelp(choice="ru")
-
getdirectory()– Returns the full path to the script location 📂 -
fast_import(show_loading=True)– Automatically imports common Python libraries (os,time,random,logging,json)- Set
show_loading=Falseto disable import messages
- Set
-
get_platform_info()– Returns detailed system information as a dictionary:os— Operating system name (e.g., Windows, Linux, macOS)release— OS version or release number (e.g., 10, 11, kernel version)arch— CPU architecture (e.g., x86_64, AMD64, ARM)hostname— Network name of the computer (PC name)ram_total_GB— Total RAM in gigabytes (rounded to 2 decimals)ram_available_GB— Available/free RAM in gigabytes (rounded to 2 decimals)
-
typing_text("text", 0.1)— Outputs text with typing animation"text"– Output text"0.1"– Delay in seconds- Example:
typing_text("text", 0.1)ortyping_text("text", delay=0.1)
🧰 Function List (xa_izipy.tools)
-
create_logger(name="xa_izipy", level=logging.INFO)– Creates a logger instancename– Logger name (default:"xa_izipy")level– Logging level (default:logging.INFO)- Example:
create_logger()orcreate_logger("mylog", logging.DEBUG)
-
check_available(site, port=80, timeout=5)– Checks if a site/server is reachable on a given port within the timeout.site– Hostname or IP address to checkport– Port number to connect to (default: 80)timeout– Connection timeout in seconds (default: 5)- Returns
Trueif the connection is successful, otherwiseFalse
💻 Example usage
from xa_izipy import getdirectory, help, fast_import, get_platform_info, typing_text
print(f"This directory: {getdirectory()}") # Output full path of script
help() # Show info in English
help("ru") # Show info in Russian
fast_import() # Import default modules with logs
info = get_platform_info()
print("System info:")
for key, value in info.items():
print(f" - {key}: {value}")
typing_text("Hello World!", 0.15)
💻 Example usage (xa_izipy.tools)
from xa_izipy.tools import create_logger, check_available
logger = create_logger()
logger.info("I like cookie ;>")
logger.warning("I not love cookie :<")
logger.error("I hate cookie :/")
if check_available("google.com", port=80, timeout=5) == True:
print("Working!")
else:
print("Not working!")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xa_izipy-0.0.5.tar.gz.
File metadata
- Download URL: xa_izipy-0.0.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b5ad0001f220c1b6b763b5bf00761dc7e9d6c73d1b5b7804f89d842f46c2059
|
|
| MD5 |
786d7b42d4e96e6a190a098959dee4d4
|
|
| BLAKE2b-256 |
e1a5630dfce864e7461b0f8604c2d7d6b92ca047e5fccd355ae7e3077ab2f420
|
File details
Details for the file xa_izipy-0.0.5-py3-none-any.whl.
File metadata
- Download URL: xa_izipy-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd576af467ff1b99c253e825d866a31056e78ccf5adc1670f33d66f63329be6a
|
|
| MD5 |
73e84e405004372549fee76dc6ba8e64
|
|
| BLAKE2b-256 |
e41508b1695707af9ea28d3448fe6503d6a26bd308d34bb99942dc86c47d5e98
|