Skip to content
View tarsil's full-sized avatar

Sponsors

Block or report tarsil

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
tarsil/README.md

Who is tarsil?

tarsil is also known as Tiago Silva, not the football player but a Software Engineer.

Passionate to his core, tarsil is also the creator of Esmerald, Lilya, Edgy, Mongoz, Asyncz and many open source tools out there.

Hello from tarsil

Nothing like using Esmerald to say hi.

$ pip install esmerald
$ pip install uvicorn

Then, inside an app.py, add this.

import uvicorn

from esmerald import Esmerald, Gateway, JSONResponse, Request, get


@get()
def welcome() -> JSONResponse:
    return JSONResponse({"message": "Welcome to tarsil's Github"})


@get()
def user(user: str) -> JSONResponse:
    return JSONResponse({"message": f"Welcome to tarsil's Github, {user}"})


@get()
def user_in_request(request: Request) -> JSONResponse:
    user = request.path_params["user"]
    return JSONResponse({"message": f"Welcome to tarsil's Github, {user}"})


app = Esmerald(
    routes=[
        Gateway("/esmerald", handler=welcome),
        Gateway("/esmerald/{user}", handler=user),
        Gateway("/esmerald/in-request/{user}", handler=user_in_request),
    ]
)


if __name__ == "__main__":
    uvicorn.run(app, port=8000)

In the end, run the ./app.py and access your localhost in the endpoints. Have fun!

Pinned Loading

  1. dymmond/esmerald dymmond/esmerald Public

    Esmerald framework - Highly scalable, performant, easy to learn, easy to code and for every sizeable and complex application

    Python 322 18

  2. dymmond/lilya dymmond/lilya Public

    Yet another ASGI toolkit that delivers

    Python 41 4

  3. dymmond/edgy dymmond/edgy Public

    🔥 The perfect ORM to work with complex databases 🔥

    Python 208 10

  4. saffier saffier Public

    The only ORM that you will ever need for python.

    Python 63 4

  5. dymmond/mongoz dymmond/mongoz Public

    ODM with Pydantic made it simple

    Python 19 4

  6. dymmond/asyncz dymmond/asyncz Public

    A python scheduler that simply does the job

    Python 41 3