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.1.9.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.1.9-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytpro-0.1.9.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.1.9.tar.gz
Algorithm Hash digest
SHA256 0cf1e69a54cadd02136e5bab67080a264abc06c4966ad216bdfa00f3a959dc9f
MD5 cf5915be6958fb130740408c8fe8dc60
BLAKE2b-256 9d959b601b3cd68ab86f40a93feb97189f7a90b689902cb5aaa44efe864bf370

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytpro-0.1.9-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.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 afed278b92be6d8ad6d0e887f8e1a77e61223b6ab8711494f83772c79bf82093
MD5 04d77eaea224ae86042c1b868b39662e
BLAKE2b-256 0bd43df4de4ea2954d6d45024b8d6952485707832b52837d17949db66efa7e60

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