Skip to main content

Python package to check the type of a variable or object.

Project description

✅ whatType

Python package to check the type of a variable or object.

🚀 Usage

from whatType import *

# Check for 'function' type
def test():
    pass
isFunction(test) # Returns True

# Check for 'int' type
isInt(1234) # Returns True

# Check for 'float' type
isFloat(3.1415) # Returns True

# Check for 'complex' type
isComplex(3+4j) # Returns True

# Check for 'str' type
isStr('Hello, World!') # Returns True

# Check for 'list' type
isList([1,2,3]) # Returns True

# Check for 'dict' type
isDict({"hello":"world"}) # Returns True

# Check for 'tuple' type
isTuple((1,2,3))

# Check for 'NoneType' type
isNone(None) # Returns True

# Check for 'bool' type
isBool(True) # Returns True

# Check for 'bytes' type
isBytes(b'Hello, World!') # Returns True

# Check for 'type' (class) type
class Test:
    pass
isClass(Test)

📦 Installation

Run the following to install:

$ pip install whatType

👨‍💻 Developing isType

To install whatType, along with the tools you will need to develop and run tests, run the following in your virtualenv:

$ pip install -e .[dev]

🚦 Development Progress

Unstable Development

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

whatType-0.0.1.tar.gz (15.0 kB view hashes)

Uploaded Source

Built Distribution

whatType-0.0.1-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page