# Path: scrypture/webapi.py
# class WebAPI(flask_wtf.Form):
# class PassHTTPAuthorizationHeader(requests.auth.AuthBase):
# def text_input(*args, **kwargs):
# def list_input(*args, **kwargs):
# def line_input(*args, **kwargs):
# def password_input(*args, **kwargs):
# def radio_field(*args, **kwargs):
# def submit_button(*args, **kwargs):
# def multiple_input(*args, **kwargs):
# def checkbox_field(*args, **kwargs):
# def file_field(*args, **kwargs):
#     def __init__(self, header):
#     def __call__(self, r):


from boltons import strutils
from scrypture import webapi
#!/usr/bin/env python
# .py
"""
Turns an integer value of nbytes into a human readable format
"""

def bytes_to_human(bytes):
    '''Turns an integer value of nbytes into a human readable format'''
    try:
        b = int(bytes)
    except:
        b = 0
    return strutils.bytes2human(b)

### WebAPI ###


# Path: scrypture/webapi.py
# class WebAPI(flask_wtf.Form):
# class PassHTTPAuthorizationHeader(requests.auth.AuthBase):
# def text_input(*args, **kwargs):
# def list_input(*args, **kwargs):
# def line_input(*args, **kwargs):
# def password_input(*args, **kwargs):
# def radio_field(*args, **kwargs):
# def submit_button(*args, **kwargs):
# def multiple_input(*args, **kwargs):
# def checkbox_field(*args, **kwargs):
# def file_field(*args, **kwargs):
#     def __init__(self, header):
#     def __call__(self, r):


# Path: scrypture/demo_scripts/Utils/bytes_to_human.py
from boltons import strutils
from scrypture import webapi

#!/usr/bin/env python
# .py
"""
Turns an integer value of nbytes into a human readable format
"""

def bytes_to_human(bytes):
    '''Turns an integer value of nbytes into a human readable format'''
    try:
        b = int(bytes)
    except:
        b = 0
    return strutils.bytes2human(b)

### WebAPI ###


class WebAPI(webapi.WebAPI):