Skip to content

Releases: adhamsalama/simpleapi

v0.1.5

20 Apr 00:03
580cb72
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.3...v0.1.5

Add support for Query type hint validation

31 Mar 15:55
5323318
Compare
Choose a tag to compare

Now you can do this!

@app.get("/query-type-hint")
def query(
    age: Query,
    name: Query = "adhom",
):
    ...

where

Query = str | list[str]

Lists were supported in the previous release.
https://github.com/adhamsalama/simpleapi/releases/tag/v.0.1.3

What's Changed

Full Changelog: v.0.1.3...v0.1.4

Support for multiple values for the same query parameter

29 Mar 22:25
5323318
Compare
Choose a tag to compare

What's Changed

  • Support multiple values for the same query parameter as a list by @adhamsalama in #44

Full Changelog: v0.1.2...v.01.3

v0.1.2

06 Sep 09:23
Compare
Choose a tag to compare

Minor-updates, nothing to worry about.

SimpleAPI is WSGI-compliant!

27 Aug 17:11
Compare
Choose a tag to compare

This is a huge release!
I have rewritten SimpleAPI as a WSGI-compliant framework! You can run it with gunicorn!
I have also added Pydantic models to automatic validation, and added more tests!
And added documentation at https://adhamsalama.github.io/simpleapi/index.html

What's Changed

Full Changelog: v0.3...v0.1.0

Package SimpleAPI to PyPI

25 Jun 15:50
Compare
Choose a tag to compare
Pre-release

In this release, I packaged SimpleAPI and upload it to PyPI.
https://pypi.org/project/simplestapi/0.0.3/

Now the SimpleAPI can be install via pip install simplestapi.

I choose the package name "simplestapi" instead of "simpleapi" because it was already taken, but importing it should still be python import simpleapi

What's Changed

Full Changelog: v0.2...v0.3

Dynamic Routing

24 Jun 16:36
Compare
Choose a tag to compare
Dynamic Routing Pre-release
Pre-release

In this release, I added dynamic routing capabilites to SimpleAPI.

Here is an example.

@app.get("/greet/{name}")
def greet(request: Request):
    """Dynamic route that greets users"""
    return JSONResponse(message={"greetings": request.params["name"]})


@app.get("/greet/{first_name}/{last_name}")
def greet_fullname(request: Request):
    """Multiple dynamic route that greets users"""
    fullname = request.params["first_name"] + " " + request.params["last_name"]
    return JSONResponse(message={"fullname": fullname})

v0.0.1

05 Jun 16:51
Compare
Choose a tag to compare
v0.0.1 Pre-release
Pre-release

This is the initial release of SimpleAPI, a simple, unopinionated Python web framework inspired by FastAPI and Flask. So far it doesn't have any third-party dependencies.

As the name suggests, SimpleAPI is simple to use.

Here is a quick example.

from simpleapi import SimpleAPI, Request, JSONResponse

app = SimpleAPI()

@app.get("/hello")
def hello(request: Request):
    """Returns hello world in JSON format"""
    return JSONResponse(message={"hello": "world"})

app.run(port=8000)

SimpleAPI is not production-ready. I am making it only for educational purposes.
I will add more features to hopefully to the point where it has most of the features modern web frameworks have, and maybe one day improve it enough to become a production-ready framework.

What's Changed

New Contributors

Full Changelog: https://github.com/adhamsalama/simpleapi/commits/v0.1