Skip to main content

A simple Python tools package by Ibrahim Akhlaq

Project description

pytpro logo


pytpro

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, tau
  • speedoflight, planckconstant, gravitationalconstant
  • electronmass, protonmass, neutronmass
  • electronvolt, 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 default
  • toast_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


Download files

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

Source Distribution

pytpro-0.2.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

pytpro-0.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pytpro-0.2.0.tar.gz.

File metadata

  • Download URL: pytpro-0.2.0.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

Hashes for pytpro-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8f1780292007e22963354bb53f95de50cedd8c763685ef2ffa877b0514abb881
MD5 1b5a242a1c4293d391db88f03b9cb087
BLAKE2b-256 17f04ff61271c3d34f38567fd177746c1c240417842691f7884ca0395e4cc90f

See more details on using hashes here.

File details

Details for the file pytpro-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pytpro-0.2.0-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

Hashes for pytpro-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 714b2bd9522ee04940c9094b397c6cc6d3f2533c2f2c9760f43fa3d30ad62fee
MD5 f14f595610e2f5c7153d8089f7860a8c
BLAKE2b-256 40cefe59e1f0641167ce36046a56a37b0fcffdafa40e71931aebcc70e4d78bb2

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