A simple Python tools package by Ibrahim Akhlaq
Project description
pytpro is a lightweight Python package by Ibrahim Akhlaq that provides powerful utility functions for math, randomness, and HTML rendering. It's clean, minimal, and built to feel like magic.
🚀 Features
➕ Math Functions
add(a, b)/subtract(a, b)multiply(a, b)/divide(a, b)modulus(a, b)/floordivision(a, b)square(a)/cube(a)squareroot(a)/cuberoot(a)absolutevalue(a)/roundoff(a)exponent(a, b)/power(a, b)
🔢 Random Number Generators
randint(start=0, end=100)randfloat()randomintpositive(start, end, step=1)randomintnegative(start, end, step=1)randomfloatpositive(start, end)randomfloatnegative(start, end)
📐 Trigonometry & Logs
sine(x)/cosine(x)/tangent(x)/arctangent(x)log_base_2(x)/log_base_10(x)/natural_log(x)
📏 Constants (Auto-displayed)
pi,e,goldenratio,tauspeedoflight,planckconstant,gravitationalconstantelectronmass,protonmass,neutronmasselectronvolt,joule,kilojoule,megajoule,gigajoule,terajoule,petajoule,exajoule
Text
write(...)title(text)header(text)subheader(text)caption(text)
HTML Embeds
htmlcssjs(html_fragment)
Alert Boxes
alertbox_red(text)/alertbox_green(text)/alertbox_blue(text)alertbox_yellow(text)/alertbox_purple(text)/alertbox_orange(text)alertbox_pink(text)/alertbox_cyan(text)/alertbox_lime(text)alertbox_brown(text)/alertbox_gray(text)/alertbox_black(text)
Toast Notifications (auto-fade)
toast(text)– white defaulttoast_red(text)/toast_green(text)/toast_blue(text)toast_black(text)/toast_pink(text)
🖥️ Example Usage
import pytpro
pytpro.add(2, 3)
pytpro.square(6)
pytpro.pi()
pytpro.htmlcssjs("<h1>Hello!</h1><p>This is raw HTML.</p>")
🖥️ Instructions to install:
To install locally from your project directory, open PowerShell or terminal and run:
pip install pytpro
version:0.3.0
Project details
Release history Release notifications | RSS feed
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 pytpro-0.1.8.tar.gz.
File metadata
- Download URL: pytpro-0.1.8.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
065b2f7a9e47fb13402901f475df9417e34f91a15d67cbff0421993060ff0fc5
|
|
| MD5 |
54939c8fc009d00c4678a9ed66ea634f
|
|
| BLAKE2b-256 |
acb1a41eb9851d3e2a4ed4e05ce0dd3db8ac031135b3e589aeded5d90203a4ed
|
File details
Details for the file pytpro-0.1.8-py3-none-any.whl.
File metadata
- Download URL: pytpro-0.1.8-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d2aa7276570ef7a6cd494e23aa3d2f8ca7a1f7d1c7e1b65e2c2d8f2d5cc193f
|
|
| MD5 |
0c99839b8224787d8cc99d4f459475b7
|
|
| BLAKE2b-256 |
db84d93ed38a644637b6dca93b9e9497aab2081cc1a635ee232f55e5fe16a11e
|