Skip to main content
Tjamgo

Tjamgo: Python Web Framework built for learning purpose

Static Badge PyPI Version

Tjamgo is a python web framework built for learning.

It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.

Installation

pip install tjamgo

How to use it

Basic usage:

from tjamgo.app import TjamgoApp

app = TjamgoApp()

@app.route("/home", allowed_methods=["get"])
def home(request, response):
    response.text = "Hello from the home page"


@app.route("/about", allowed_methods=["put"])
def about(request, response):
    response.text = "Hello from the about page"


@app.route("/hello/{name}")
def greeting(request, response, name):
    response.text = f"Hello {name}"


@app.route("/books")
class Books:
    def get(self, request, response):
        response.text = "Books page"

    def post(self, request, response):
        response.text = "Endpoint to create a book"


def new_handler(req, resp):
    resp.text = "From new handler"


app.add_route("/new-handler", new_handler)


@app.route("/template")
def template_handler(req, resp):
    resp.body = app.template(
        "home.html",
        context={"new_title": "tjamgo", "new_body": "Best framework"}
    )

Metadata

Release files for tjamgo 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tjamgo 0.1.6
File Size Uploaded
tjamgo-0.1.6.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tjamgo 0.1.6
File Interpreter ABI Platform
tjamgo-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / tjamgo-0.1.6.tar.gz

Download URL tjamgo-0.1.6.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b22ed3825006431fe3e0570e3d94ad5cdc1aeacae9de9ea10431aa54117f5963
BLAKE2b-256 checksum
How to use checksums
824fed76b7eccbe2767dbfbe1a1bece508f8ef6bbbaa1e46e4404a982c7eda95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / tjamgo-0.1.6-py3-none-any.whl

Download URL tjamgo-0.1.6-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec9c9c47af5623b0fcc0cdec966f81f96d033139abf96ebfaf194bd3c222b3bb
BLAKE2b-256 checksum
How to use checksums
95e9f7e216b5ebbd54ea0981a0b218630b59d665b769a60be2383aa4ef0a3960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

0.1.7

2 release files

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page