Interactive demo | demos/4-file

Intro

Returns a json file describing the length of the file in bytes
Run
Server offline
Idle

Parameters

Result

(none yet)

Sample api request

Source code

def endpoint(data:bytes=b'fdslbhvlbnlnfdlskv') -> bytes:
    """Returns a json file describing the length of the file in bytes"""
    return {"len": len(data)} | aS(json.dumps) | op().encode()