Metadata-Version: 2.1
Name: tanoshi
Version: 0.0.1a0
Summary: A fast, asyncio based web-framework, that you'll enjoy using.
Home-page: https://github.com/justanotherbyte/tanoshi
Author: justanotherbyte
License: BSD
Project-URL: Documentation, https://tanoshi.readthedocs.io/en/latest/
Project-URL: Issue tracker, https://github.com/justanotherbyte/tanoshi/issues
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: BSD License
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.8.0
Description-Content-Type: text/markdown
Requires-Dist: starlette (==0.17.1)
Requires-Dist: itsdangerous (==2.0.1)
Requires-Dist: Jinja2 (==3.0.3)

<h1 align="center">
<sub>
    <img src="https://i.imgur.com/O8dSQLD.png" height="36">
</sub>
&nbsp;
Tanoshi
</h1>
<p align="center">
<sup>
A fast, asyncio based web-framework, that you'll enjoy using.
</sup>
<br>
<sup>
    <a href="">Read the docs.</a>
</sup>
</p>

## Why Tanoshi and what is it?

Tanoshi is a fast, asyncio based web-framework, that you'll really enjoy using. Tanoshi is built to revolve around your design decisions, not ours. Tanoshi has no boiler-plate code what so ever, allowing you to have an extremely flexible code base structure. Tanoshi can also be a heavy-weight framework if you choose to opt-in to it's heavy-weight features, such as a database ORM, as well as adaptable authentication. Tanoshi allows you to quickly prototype, as well as expand and scale quickly!

It's in the name! - *Tanoshi* (楽しい) - Enjoyable

## Key Features

- Modern `async` and `await` syntax.
- Seriously impressive performance thanks to Starlette.
- Opt-in heavy-weight features such as a fully-fledged database ORM.
- Extremely flexible.
- Jinja Templating Support.
- Session and Cookie Middleware.
- Quick and easy to get started with.

## Examples

```py
from tanoshi import Tanoshi
from tanoshi.shortcuts import render, redirect


app = Tanoshi(
    name="MyTanoshiApplication",
    debug=True,
    templates_directory="templates/"
)

@app.route("/", methods=["GET", "POST"])
async def index(request):
    context = {
        "message": "Hello Tanoshi!",
        "moreData": ["guido", "van", "rossum"]
    }
    return render(request, "index.html", context)

@app.route("/redirect")
async def redirect_route(request):
    return redirect("https://www.python.org/")
```

## Running tanoshi

Running `tanoshi` on a production server is super simple. Let's use the example above to learn how to run tanoshi. First, you'll need to install a production server such as `uvicorn`, which is the one I personally recommend. Simply run `pip instal uvicorn` to install uvicorn. Now, if you placed the example code into a file called `main.py`, you'd need to run `uvicorn main:app` inside the directory where your `main.py` file is housed.

This process is exactly the same as other asgi frameworks, no changes there!

