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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytpro-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 f10d36a5748e349404d73861ed23fc6ea5b5ba9c2bbeac28c9a373ce9bf3b509
MD5 b0aba12723947de3567caa79774e052f
BLAKE2b-256 ec6892e9c413e0ebc4e5ab705b790bc11276385036f2a8f33d9d6a8192f1f998

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytpro-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b5a401f6b1cb020a1c33a704b66231fb2ccf9688191ce79434182632f5d0a4f3
MD5 aa185eb7b36f59ab93c5d5e345c71d20
BLAKE2b-256 b01c5c86ebbd89d1c3ff52081f44bcc030c6857ffb4b5ee6904c027e72f82052

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