Skip to main content

A massive Python library to creatively check every mathematical property of numbers

Project description

🤪 gigity-goo

Welcome to gigity-goo, the most over-engineered, mathematically profound, and utterly ridiculous number-checking library ever conceived in Python.

Have you ever looked at a number and thought: "Sure, it's even, but is it a Spy Number? Is it over 9000? Is it spooky? What if I ask this Python module if a number is Peter Griffin?"

Well, my friend, gigity-goo is exactly what you didn't know you needed.

It is designed to demonstrate the power of Python's execution contexts, "magic" dunder methods, and operator overloading, all while insulting you with sarcastic errors if you do something stupid.

📦 Installation

pip install gigity-goo

🚀 Usage

Even though the package is named gigity-goo (because someone stole the name gigity on PyPI, looking at you, whoever you are), the module is imported simply as gigity:

import gigity

🧠 The "Magic" Behavior

The functions in this library never actually return a primitive boolean (True or False). Instead, they return a custom object (GigityResult) that reads your mind depending on where you use it.

It acts like a boolean for the cold logic of the computer, but screams sentences for the delicate eyes of the user!

1. Logic Contexts (__bool__)

If you use it in an if statement, it acts like a ninja. It evaluates strictly as True or False silently.

if gigity.isEven(4):          
    print("The computer knows it's even, but the module kept its mouth shut!")

2. Display Contexts (__repr__)

If you type it into an interactive REPL or print() it, it suddenly becomes chatty:

>>> gigity.isEven(2)
yes 2 is an even number

3. Doing Math with Sentences (__add__, __sub__, etc)

Because True acts as 1 and False acts as 0 in Python, we overloaded the math operators. You can literally add sentences together!

>>> gigity.isEven(2) + gigity.isEven(4)
2

>>> gigity.isEven(2) + 10
11

4. The Sarcastic Error Handler (__getattr__)

If you try to call a function that doesn't exist, it intercepts your typo and insults you:

>>> gigity.isFloatingPoint(3.14)
AttributeError: GigityError: I don't know how to check 'isFloatingPoint'. Who do you think I am?

>>> gigity.isHappy("yes")
TypeError: GigityBrainDamageError: You passed a str ('yes') to isHappy(). I only evaluate numbers, genius.

>>> gigity.isPeter(1)
AttributeError: GigityFamilyGuyError: Yes, I get the reference. But 'isPeter' isn't a real function.

>>> gigity.isMeg(2)
AttributeError: GigityError: Shut up, Meg.

🧮 The Arsenal of Checks

We support everything from basic middle-school math to college-level number theory, trigonometry, and pure internet brainrot.

Basic Math

>>> gigity.isEven(2)
yes 2 is an even number

>>> gigity.isPrime(7)
yes 7 is a prime number

>>> gigity.isPositive(-5)
no -5 is not a positive number

Advanced Nerd Math

>>> gigity.isFibonacci(8)
yes 8 is a Fibonacci number

>>> gigity.isArmstrong(153)
yes 153 is an Armstrong number

>>> gigity.isHappy(19)
yes 19 is a happy number

>>> gigity.isPronic(12)
yes 12 is a pronic number

>>> gigity.isFascinating(192)
yes 192 is a fascinating number

(Also supports: isSquare, isCube, isPerfect, isPowerOfTwo, isHarshad, isAbundant, isDeficient, isPalindrome, isTriangular, isAutomorphic, isNeon, isSpy)

Constants & Trigonometry

>>> gigity.isPi(3.14159)
yes 3.14159 is Pi (π)

>>> gigity.isGoldenRatio(1.61803)
yes 1.61803 is the Golden Ratio (φ)

>>> gigity.isRightAngle(90)
yes 90 is a right angle in degrees

Internet Brainrot & Memes

>>> gigity.isBeast(666)
yes 666 is the number of the beast! 🤘

>>> gigity.isLeet(1337)
yes 1337 is absolutely l33t.

>>> gigity.isOver9000(9001)
IT'S OVER 9000!!! (yes, 9001 is > 9000)

>>> gigity.isWeed(420)
420 blaze it! 🌿💨

>>> gigity.isSpooky(13)
woah 13 is super spooky! 👻

>>> gigity.isError404(404)
Error 404: Number not found.

>>> gigity.isMeaningOfLife(42)
yes 42 is the meaning of life, the universe, and everything.

>>> gigity.isGigity(69)
giggity giggity goo! 69 is gigity!

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

gigity_goo-0.0.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

gigity_goo-0.0.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file gigity_goo-0.0.1.tar.gz.

File metadata

  • Download URL: gigity_goo-0.0.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for gigity_goo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dd6cc2e5627a8af4e1b87381fce3fbfabcf6539c0f9e189d3af3881173843961
MD5 255cc2d13e51c32a399519ffc8b9335c
BLAKE2b-256 31897c171931661989458c5e9cf67efb9a7b639daa0fdfa054131e9d22703f0d

See more details on using hashes here.

File details

Details for the file gigity_goo-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gigity_goo-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for gigity_goo-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b22ee1165aa454f3454538426995b253303d0440e1781d4c3d35006ecf1c15f2
MD5 f447639c96090fcd0b44124aa8a8b761
BLAKE2b-256 519b6bf52029b52a7fe2fc08240b2baa3f416a5ea995f239e644bc06c9be08e1

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