Skip to content

Releases: Notliam99/piApi

Functionaly Complete

29 Dec 01:40
664f4ab

Choose a tag to compare

Functionaly Complete Pre-release
Pre-release

Next Steps

Need to add developer documentation

How To Use

Some sample code for the API very basic but gives you an understanding of how it works.

./main.py

from piApi import Api


api = Api()


@api.get('/')
def hello_world(request):
    """
        Index route decorated by @api.get()
        ARGS:
            request: dict # contains the parsed request
        RETURNS:
            document: str
            responce_code: int # optional
            custom_headers: dict # optional Requries( responce_code )
    """
    doc = f'''
        <center>
            <h1>Hello World<h1>
            <hr>
            <p>{request}</p>
        </center>
    '''
    return doc, 200


def Main():
    api.run(80)


if __name__ == '__main__':
    Main()

WIFI

07 Dec 10:36

Choose a tag to compare

WIFI Pre-release
Pre-release

wifi now feature complete

release Notes

wifi at the moment has credentials saved in the generated config if left blank it starts a hotspot. in futre will have a landing portal for setup and offline configuration. in future i hope to make it a security free hotspot for first setup at the very least.

Hot spot Credentials

SSID: "Sprikiley"
PASSWORD: "12345678"