Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Phoxett OP decorative library for verification

Project description

Phoxett OP

op-check decorative library

#Installation

pip install op-check

LIB op-check has six decorators:

  • integer check if function argument is int
from op_check import ints

@integer
def add(n):
    return n + 9
 
print(add(7))
#output 16
  • decimal check if function argument is float
from op_check import decimal

@decimal
def add(n):
    return n + 5
 
print(add(7.7))
#output 12.7
  • strings check in function argument is str
from op_check import string

@string
def hello(n):
    return n + ' world!!!'
 
print(hello('hello'))
  • lists check if function argument is list
from op_check import lists

@list
def num(n):
    return n + [3,4]

print(num([1,2]))
  • dicts check if function argument is dict
from op_check import dicts

@dicts
def user(n):
    return n

print(user({'name': 'John','name': 'Jan'}))
  • tuples check if function argument is tuple
from op_check import tuples

@tuples
def num(n):
    return n + (3,4)

print(num((1,2)))

multi-arguments my yet supported

Developer Contact email Location
Phoxett phoxett@gmail.com Stellenbosch, Western Cape

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for op-check, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size op-check-0.0.2.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page