Sleekify is a minimalistic, highly-performant, asychronous Python REST API framework. It's been designed with simplicity as the main focus, aiming to provide a straightforward and efficient way to create robust Web API's, drawing inspiration from both Express.js and FastAPI.
- Simple & Expressive: Sleekify is easy to write, with simple expressive syntax.
- Async-first: Built on the asynchronous server methodology, enabling high performance and speed in concurrency.
- Flexible: Supports a wide range of request handling features from simple routes to complex parameter parsing.
- Validated: Uses Python Type hints,
typing
to ensure your requests are properly validated and sanitised. - Easy Setup: You can get up and running in just a few lines of code!
Install using:
pip
pip install sleekify
conda
conda create --name my_env python=3.11 -y
conda activate sleekify
pip install sleekify
To get started with Sleekify, you can set up a basic web application with several routes as shown below:
from sleekify import App, Request
app = App()
@app.get("/")
async def endpoint():
return {"message": "Welcome to Sleekify!"}
To run your Sleekify application, use an ASGI server such as Uvicorn:
pip install uvicorn
Then, replace module_name
with the name of the Python file where your app is defined.
For example: If your app
is in the root directory of your project, use: uvicorn app:app --reload --port 8080
uvicorn module_name:app --reload
To run the Sleekify internal testing suite that uses pytest-asyncio
and httpx
, run the following command:
pytest test.py
pip install -r requirements.txt
uvicorn app:app --reload
curl http://localhost:8000/hello
pytest test.py
Documentation is currently being developed to better outline usage.
If you need support, please contact the developer directly: [email protected]
/ https://x.com/0mjs_