Skip to main content

A simple Python tools package by Ibrahim Akhlaq

Project description

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.6.tar.gz (7.8 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.6-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytpro-0.1.6.tar.gz
  • Upload date:
  • Size: 7.8 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.6.tar.gz
Algorithm Hash digest
SHA256 181534a0987bdfb122d0baa16f7ca22dfa11d547951e2da232c55c0bb823d862
MD5 8b1e67b7b5b5b174e455a879e2e136c0
BLAKE2b-256 77230a7c86ec2054d68b732af7b2635324f54b55d82e3029361a10c7f1f41ff6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytpro-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5209b4fd082a857a87a3654fc1324fd513beb06c6d734fb9fdef376cb8b7dff9
MD5 c5253d404c79176fa4a33b6d3d16b4d1
BLAKE2b-256 8c44407460d95e733027779d510ddcc68b19b146f59e1cad14f1183eb9298235

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