Asyncs Web Libary.
================
<p style="color: darkgray;">A fast, asynchronous, and modular web framework for Python.</p>
### Getting Started
To use Asyncs, simply install it via pip:
```bash
$ pip install asyncs
```
Then, create a new Python file and import the library:
```python
from asyncs import Asyncs, Request
from asyncs.response import JSONResponse, HTMLResponse
```
Example Usage
Here's a simple example of creating a web application with Asyncs:
```python
from asyncs import Asyncs, Request
from asyncs.response import JSONResponse, HTMLResponse
app = Asyncs()
@app.get("/")
async def index(request: Request) -> JSONResponse:
return JSONResponse(status_code=200, content={"result": "Hello World!"})
@app.get("/index")
async def index(request: Request) -> HTMLResponse:
with open("index.html", encoding="utf-8") as f:
content = await f.read()
return HTMLResponse(status_code=200, content=content, variables={
"request": request,
"name": "Dmitry"
})
if __name__ == "__main__":
app.run(host="localhost", port=8080)
```
## Key Features
- Asynchronous: Asyncs is built on top of Python's asyncio library, allowing for fast and efficient handling of concurrent requests.
- Speed: Asyncs is designed to be fast and lightweight, making it perfect for high-performance web applications.
- Modular: Asyncs allows you to split your application into multiple files and routers, making it easy to manage and maintain large projects.
- Routing: Asyncs supports routing for GET, POST, PUT, and DELETE requests, making it easy to create RESTful APIs.
- Logger: Asyncs comes with a built-in logger that provides detailed information about requests and responses.
## Documentation
#### For more information on using Asyncs, please see the full documentation.
## License
#### Asyncs is licensed under the MIT License. See LICENSE for more information.
Raw data
{
"_id": null,
"home_page": "https://github.com/sscefalix/asyncs",
"name": "asyncs",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.10",
"maintainer_email": null,
"keywords": "web, aiohttp, asyncs, fastapi, web server",
"author": "sscefalix",
"author_email": "sscefalix@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a4/3c/c46c2eeba56c1646997e8918fc2eaa203d0b932b106abf3f1a5e090533f1/asyncs-1.0.0.tar.gz",
"platform": null,
"description": "Asyncs Web Libary.\r\n================\r\n<p style=\"color: darkgray;\">A fast, asynchronous, and modular web framework for Python.</p>\r\n\r\n### Getting Started\r\n\r\nTo use Asyncs, simply install it via pip:\r\n\r\n```bash\r\n$ pip install asyncs\r\n```\r\n\r\nThen, create a new Python file and import the library:\r\n```python\r\nfrom asyncs import Asyncs, Request\r\nfrom asyncs.response import JSONResponse, HTMLResponse\r\n```\r\n\r\nExample Usage\r\n\r\nHere's a simple example of creating a web application with Asyncs:\r\n\r\n```python\r\nfrom asyncs import Asyncs, Request\r\nfrom asyncs.response import JSONResponse, HTMLResponse\r\n\r\napp = Asyncs()\r\n\r\n@app.get(\"/\")\r\nasync def index(request: Request) -> JSONResponse:\r\n return JSONResponse(status_code=200, content={\"result\": \"Hello World!\"})\r\n\r\n@app.get(\"/index\")\r\nasync def index(request: Request) -> HTMLResponse:\r\n with open(\"index.html\", encoding=\"utf-8\") as f:\r\n content = await f.read()\r\n\r\n return HTMLResponse(status_code=200, content=content, variables={\r\n \"request\": request,\r\n \"name\": \"Dmitry\"\r\n })\r\n\r\nif __name__ == \"__main__\":\r\n app.run(host=\"localhost\", port=8080)\r\n```\r\n\r\n## Key Features\r\n\r\n- Asynchronous: Asyncs is built on top of Python's asyncio library, allowing for fast and efficient handling of concurrent requests.\r\n- Speed: Asyncs is designed to be fast and lightweight, making it perfect for high-performance web applications.\r\n- Modular: Asyncs allows you to split your application into multiple files and routers, making it easy to manage and maintain large projects.\r\n- Routing: Asyncs supports routing for GET, POST, PUT, and DELETE requests, making it easy to create RESTful APIs.\r\n- Logger: Asyncs comes with a built-in logger that provides detailed information about requests and responses.\r\n\r\n## Documentation\r\n#### For more information on using Asyncs, please see the full documentation.\r\n\r\n## License\r\n\r\n#### Asyncs is licensed under the MIT License. See LICENSE for more information.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple asynchronous web library based on aiohttp.",
"version": "1.0.0",
"project_urls": {
"Bug Reports": "https://github.com/sscefalix/asyncs/issues",
"Homepage": "https://github.com/sscefalix/asyncs",
"Source": "https://github.com/sscefalix/asyncs/"
},
"split_keywords": [
"web",
" aiohttp",
" asyncs",
" fastapi",
" web server"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a43cc46c2eeba56c1646997e8918fc2eaa203d0b932b106abf3f1a5e090533f1",
"md5": "74e4f69f331aecc0e08bef5f6f431396",
"sha256": "02288ad4954683f2f4d1d935b2361d9633680019bb2e991448f4414507bb604f"
},
"downloads": -1,
"filename": "asyncs-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "74e4f69f331aecc0e08bef5f6f431396",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.10",
"size": 7458,
"upload_time": "2024-07-18T14:17:51",
"upload_time_iso_8601": "2024-07-18T14:17:51.554705Z",
"url": "https://files.pythonhosted.org/packages/a4/3c/c46c2eeba56c1646997e8918fc2eaa203d0b932b106abf3f1a5e090533f1/asyncs-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-18 14:17:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sscefalix",
"github_project": "asyncs",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "uvicorn",
"specs": [
[
"~=",
"0.25.0"
]
]
},
{
"name": "fastapi",
"specs": [
[
"~=",
"0.111.0"
]
]
},
{
"name": "starlette",
"specs": [
[
"~=",
"0.37.2"
]
]
},
{
"name": "Jinja2",
"specs": [
[
"~=",
"3.1.4"
]
]
},
{
"name": "aiohttp",
"specs": [
[
"~=",
"3.9.5"
]
]
},
{
"name": "setuptools",
"specs": [
[
"~=",
"70.0.0"
]
]
}
],
"lcname": "asyncs"
}