Skip to main content

Adds functions to check if variables are integers and turns them into such.

Project description

Integer Checker

A lightweight Python module that handles converting compatable data types into integers.

Disclamer: Right now there is only the ability to use this when taking and converting user input. I will try to add more features later. This has only been tested in basic examples, please report any bugs so I can try to fix them.

Features

  • Safe Integer Checking: Easily verify and force user inputs to be valid integers without crashing your program.
  • Default Error Message: Has a default error message of "Please input a number!" This can be changed by adding a string as the second argument.

Installation

Just use pip as you normally would!

pip3 install int-checker

Usage Example

import int_checker

var1 = int_checker.conv_input("Give number: ", "This is a different error message")

print(2 + var1)

Syntax

The way you need to structure the code is quite simple. Using up to two arguments, you can define both the input request and error message, as shown before.

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

int_checker-0.1.0.tar.gz (1.2 kB view details)

Uploaded Source

Built Distribution

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

int_checker-0.1.0-py3-none-any.whl (1.7 kB view details)

Uploaded Python 3

File details

Details for the file int_checker-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for int_checker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d03fb57d3870f9b3011104ddd984a31f57f4f588d0a0eced5d7eb8a76509dec3
MD5 466a4eaa001cb4da9ec472eb8697be5e
BLAKE2b-256 b477aed68f30cb4b07a8536bf411e30c21295f13f0bb821dcc2b9492851b8d26

See more details on using hashes here.

File details

Details for the file int_checker-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for int_checker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df59f2ec257bf1e70f944c632a6574a6e8a549d1e7915bcc50a5f83338b3e15a
MD5 81e57225c6e0427ea4fae45568fe025b
BLAKE2b-256 8a4003db9df27bf4d194ed8a9733e598ba5f5213cdb4b278b1425dd64f6660d2

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