This release is a pre-release and may not be stable for production use.
allin
Allin is an experimental asynchronous web framework.
I didn't expect this framework to be used in a production environment, as it's still in the early stages of development. Not sure when this framework can be used in production 😬
You can help this project get better by creating an issue or PR. Thank you for your time!
Table of Contents:
Allin is heavily inspired by Flask, Starlette & Falcon.
:raised_eyebrow: Why ?
I'm just curious :monocle_face:
Yup, I'm curious about how a web application based on ASGI works.
It may not yet fully comply with the ASGI application specifications as documented. But, for the main features like route mapping, HTTP responses, error handling, parsing the request body it's there.
...and I want to build my own framework from scratch so I know how the application works.
Literally, the "framework parts" weren't built from scratch as I also used third party modules and some "parts from other sources" were used as references.
This is part of the journey
:books: Roadmap
-
Lifespan Protocol
-
HTTP Protocol
-
HTTP Headers
-
HTTP Request
- JSON Body Support
- MessagePack Body Support
- Form Data Support
- Cookies
- Query Parameters
-
HTTP Responses
- JSONResponse
- MessagePackResponse
-
HTTP Middleware
- Before HTTP Request
- After HTTP Request
-
Routing
- Decorator shortcuts such as
@get,@post,@put, etc. are available. - Nesting routers
- Decorator shortcuts such as
-
-
Extension
-
Websocket Support
:star_struck: Features
- Global variables. (It means, you can access the
appandrequestobject instances globally) - Error handling
-
JSONandMessagePackrequests are supported out of the box (thanks to msgspec) - Form Data Support (
application/x-www-form-urlencodedormultipart/form-data) - Decorator shortcuts such as
@get,@post,@put, etc. are available. - Nesting routers
:love_you_gesture: Quick Start
Here is an example application based on the Allin framework and I'm sure you are familiar with it.
from allin import Allin, JSONResponse
app = Allin()
@app.route("/")
async def index():
return JSONResponse({"message": "Hello World!"})
:point_down: Explanation
- The
appvariable is the ASGI application instance. - And we create an endpoint with the route
/on the lineapp.route(...) - Then we add the
index()function to handle the/route. - And the handler function will return a JSON response with the content
{"message": "Hello World!"}
That's it! looks familiar right?
Want more? check out other sample projects here
:sunglasses: Installation
Install from source
git clone --depth 1 https://github.com/aprilahijriyan/allin.git
cd allin
Need https://python-poetry.org/ installed on your device
poetry build
pip install ./dist/*.whl
Install with pip
Currently I just published the pre-release version v0.1.1a0. So, maybe you need to install it with the --pre option. Example:
pip install --pre allin
Metadata
Release files for allin 0.1.1a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| allin-0.1.1a1.tar.gz | 20.6 kB | Without provenance | Details for allin-0.1.1a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| allin-0.1.1a1-py3-none-any.whl | Python 3 | none | any | Details for allin-0.1.1a1-py3-none-any.whl |
Total release size: 43.9 kB
Release files / allin-0.1.1a1.tar.gz
| Download URL | allin-0.1.1a1.tar.gz |
|---|---|
| Size | 20.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe50cbee0f85a28e8394584b3903a9dc6432a77257118f78e07a473136359f95
|
|
BLAKE2b-256 checksum How to use checksums |
bf03e110aab815b592680e04fce6bba8071e46478da0bfb35d2f8deffbed16f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / allin-0.1.1a1-py3-none-any.whl
| Download URL | allin-0.1.1a1-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
958512e65ac22860d18c7b44daa029a921a41cd1d976a02325d5487818ce8c0e
|
|
BLAKE2b-256 checksum How to use checksums |
f0086ed275083234db2d33a8bc1eec942db7bfe540d4f541bd903fd9ae008838
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for allin 0.1.1a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.