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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytpro-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 3fe3d8ccf800e805e9ea673509ac7089a81b2cdba200103d3db1bf248fdd98fc
MD5 3818b10df2c65cb9e5a30bea2f73d628
BLAKE2b-256 d9b5d8ce9b449f019fa3bb883a4b26db173e98ccfdc5a692fe1bf85555a61b07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytpro-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 82db037161af89960faa9fdcc1ca9b676d2aeae82609ebecbd1f6d5dca17211f
MD5 4769717e29fb1254968eb1477caa6f65
BLAKE2b-256 75bb449313b3a3e82a76c6ce57aad7f3b1f5bc143bc3306e1462b1f1e799544c

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