Skip to main content

A fast, asyncio based web-framework, that you'll enjoy using.

Project description

  Tanoshi

A fast, asyncio based web-framework, that you'll enjoy using.
Read the docs.

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

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tanoshi-0.0.1a0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

tanoshi-0.0.1a0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file tanoshi-0.0.1a0.tar.gz.

File metadata

  • Download URL: tanoshi-0.0.1a0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for tanoshi-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 af12af72d7d9848fd4207bbca4ea8eb9747648523d752887c1c9fc4da0476592
MD5 35ad622a869829f59981d4dddde3be78
BLAKE2b-256 1554a33066fca647e3cb8ebe5c4c45b4eef79261c272ae38dd253575aae333de

See more details on using hashes here.

File details

Details for the file tanoshi-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: tanoshi-0.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for tanoshi-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1df4090b294c630195cf6bdaf35073da970cc7c476860edab57531fa95b3d64
MD5 c3b4ff15f6347668e27d900132161df5
BLAKE2b-256 ae80d077774cbfa79e2f626a4b2b86b8a2cc62524b76c9747ca1697b18cc47ea

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page