# allin
Allin is an experimental asynchronous web framework.
Table of Contents:
* [:raised_eyebrow: Why ?](#๐คจ-why)
* [:books: Roadmap](#๐-roadmap)
* [:star_struck: Features](#๐คฉ-features)
* [:love_you_gesture: Quick Start](#๐ค-quick-start)
* [:sunglasses: Installation](#๐-installation)
* [From source](#install-from-source)
* [With `pip`](#install-with-pip)
`Allin` is heavily inspired by [Flask](https://flask.palletsprojects.com/en/2.2.x/), [Starlette](https://www.starlette.io/) & [Falcon](https://falconframework.org/).
## :raised_eyebrow: Why ?
> I'm just curious :monocle_face:
[ASGI]: https://asgi.readthedocs.io/en/latest
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
- [x] ASGI Lifespan Support
- [x] HTTP Support
- [x] Parse HTTP Headers
- [x] Parse HTTP Request
- [x] Request Body Stream (Useful for dealing with large data)
- [x] JSON Body Support
- [x] MessagePack Body Support
- [x] Form Data Support
- [x] Cookies
- [x] Query Parameters
- [x] HTTP Responses
- [x] JSONResponse
- [x] MessagePackResponse
- [ ] HTTP Middleware
- [ ] Before HTTP Request
- [ ] After HTTP Request
- [x] Routing
- [x] Decorator shortcuts such as `@get`, `@post`, `@put`, etc. are available.
- [x] Nesting routers
- [ ] Websocket Support
## :star_struck: Features
- [x] Global variables. (It means, you can access the `app` and `request` object instances globally)
- [x] Error handling
- [x] `JSON` and `MessagePack` requests are supported out of the box (thanks to [msgspec](https://github.com/jcrist/msgspec))
- [x] Form Data Support (`application/x-www-form-urlencoded` or `multipart/form-data`)
- [x] Decorator shortcuts such as `@get`, `@post`, `@put`, etc. are available.
- [x] 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.
```python
from allin import Allin, JSONResponse
app = Allin()
@app.route("/")
async def index():
return JSONResponse({"message": "Hello World!"})
```
<details>
<summary>:point_down: Explanation</summary>
* The `app` variable is the ASGI application instance.
* And we create an endpoint with the route `/` on the line `app.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!"}`
</details>
That's it! looks familiar right?
Want more? check out other [sample projects here](https://github.com/aprilahijriyan/allin/tree/main/examples)
## :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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/aprilahijriyan/allin",
"name": "allin",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "asgi,framework",
"author": "Aprila Hijriyan",
"author_email": "hijriyan23@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/74/68/90a82b4426f3b1f6695075c65bb72e57c3b77acaded236c13f911119b933/allin-0.1.1a0.tar.gz",
"platform": null,
"description": "# allin\n\nAllin is an experimental asynchronous web framework.\n\nTable of Contents:\n\n* [:raised_eyebrow: Why ?](#\ud83e\udd28-why)\n* [:books: Roadmap](#\ud83d\udcda-roadmap)\n* [:star_struck: Features](#\ud83e\udd29-features)\n* [:love_you_gesture: Quick Start](#\ud83e\udd1f-quick-start)\n* [:sunglasses: Installation](#\ud83d\ude0e-installation)\n\n * [From source](#install-from-source)\n * [With `pip`](#install-with-pip)\n\n`Allin` is heavily inspired by [Flask](https://flask.palletsprojects.com/en/2.2.x/), [Starlette](https://www.starlette.io/) & [Falcon](https://falconframework.org/).\n\n## :raised_eyebrow: Why ?\n\n> I'm just curious :monocle_face:\n\n[ASGI]: https://asgi.readthedocs.io/en/latest\n\nYup, I'm curious about how a web application based on [ASGI] works.\n\nIt 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.\n\n...and I want to build my own framework from scratch so I know how the application works.\n\nLiterally, 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.\n\n> _This is part of the journey_\n\n## :books: Roadmap\n\n- [x] ASGI Lifespan Support\n- [x] HTTP Support\n\n - [x] Parse HTTP Headers\n - [x] Parse HTTP Request\n - [x] Request Body Stream (Useful for dealing with large data)\n - [x] JSON Body Support\n - [x] MessagePack Body Support\n - [x] Form Data Support\n - [x] Cookies\n - [x] Query Parameters\n\n - [x] HTTP Responses\n - [x] JSONResponse\n - [x] MessagePackResponse\n\n - [ ] HTTP Middleware\n - [ ] Before HTTP Request\n - [ ] After HTTP Request\n\n - [x] Routing\n\n - [x] Decorator shortcuts such as `@get`, `@post`, `@put`, etc. are available.\n - [x] Nesting routers\n\n- [ ] Websocket Support\n\n## :star_struck: Features\n\n- [x] Global variables. (It means, you can access the `app` and `request` object instances globally)\n- [x] Error handling\n- [x] `JSON` and `MessagePack` requests are supported out of the box (thanks to [msgspec](https://github.com/jcrist/msgspec))\n- [x] Form Data Support (`application/x-www-form-urlencoded` or `multipart/form-data`)\n- [x] Decorator shortcuts such as `@get`, `@post`, `@put`, etc. are available.\n- [x] Nesting routers\n\n## :love_you_gesture: Quick Start\n\nHere is an example application based on the `Allin` framework and I'm sure you are familiar with it.\n\n```python\nfrom allin import Allin, JSONResponse\n\napp = Allin()\n\n@app.route(\"/\")\nasync def index():\n return JSONResponse({\"message\": \"Hello World!\"})\n```\n\n<details>\n<summary>:point_down: Explanation</summary>\n\n* The `app` variable is the ASGI application instance.\n* And we create an endpoint with the route `/` on the line `app.route(...)`\n* Then we add the `index()` function to handle the `/` route.\n* And the handler function will return a JSON response with the content `{\"message\": \"Hello World!\"}`\n\n</details>\n\nThat's it! looks familiar right?\n\nWant more? check out other [sample projects here](https://github.com/aprilahijriyan/allin/tree/main/examples)\n\n## :sunglasses: Installation\n\n### Install from source\n\n```\ngit clone --depth 1 https://github.com/aprilahijriyan/allin.git\ncd allin\n```\n\nNeed https://python-poetry.org/ installed on your device\n\n```\npoetry build\npip install ./dist/*.whl\n```\n\n### Install with `pip`\n\nCurrently I just published the pre-release version `v0.1.1a0`. So, maybe you need to install it with the `--pre` option. Example:\n\n```\npip install --pre allin\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Allin is an experimental asynchronous web framework.",
"version": "0.1.1a0",
"split_keywords": [
"asgi",
"framework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "166394e8b922226cf612b886fe3b558f03f3f6b7433196ba4a0e914c126cda51",
"md5": "2017bc578326056f273709a383a8a864",
"sha256": "cc2e40e89e5d81bfcb1c41554bb14ed6a09a102e7603ecb714c4a400d674d836"
},
"downloads": -1,
"filename": "allin-0.1.1a0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2017bc578326056f273709a383a8a864",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 21268,
"upload_time": "2023-01-28T04:39:47",
"upload_time_iso_8601": "2023-01-28T04:39:47.915080Z",
"url": "https://files.pythonhosted.org/packages/16/63/94e8b922226cf612b886fe3b558f03f3f6b7433196ba4a0e914c126cda51/allin-0.1.1a0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "746890a82b4426f3b1f6695075c65bb72e57c3b77acaded236c13f911119b933",
"md5": "66f2622ec8f9ea8687e62d3bc8778ed1",
"sha256": "602f890567ba2c9529212a132ce0d2fe77e34bb21bceb76eca9a9aca255df27c"
},
"downloads": -1,
"filename": "allin-0.1.1a0.tar.gz",
"has_sig": false,
"md5_digest": "66f2622ec8f9ea8687e62d3bc8778ed1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 19438,
"upload_time": "2023-01-28T04:39:49",
"upload_time_iso_8601": "2023-01-28T04:39:49.316687Z",
"url": "https://files.pythonhosted.org/packages/74/68/90a82b4426f3b1f6695075c65bb72e57c3b77acaded236c13f911119b933/allin-0.1.1a0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-28 04:39:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "aprilahijriyan",
"github_project": "allin",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "allin"
}