Skip to main content

Tina4Python - This is not another framework for Python

Project description

Tina4 Python — This is not a framework

Laravel joy. Python speed. 10× less code.

Quickstart

pip install tina4_python
tina4 init my_project
cd my_project
python app.py

You've just built your first Tina4 app — zero configuration, zero classes, zero boilerplate!

Features

  • Full ASGI compliance, use any ASGI compliant webserver
  • Full async support out of the box
  • Built-in JWT and Session handling
  • Automatic Swagger docs at /swagger
  • Instant CRUD interfaces with one line: result.to_crud(request)
  • Built-in Twig templating, migrations, WebSockets, authentication and middleware
  • Works with SQLite, PostgreSQL, MySQL, MariaDB, MSSQL, Firebird
  • Hot reload in development (uv run python -m jurigged app.py)

Install

pip install tina4-python

Routing

Here are some basic GET routes

# .src/__init__.py
from tina4_python import get

# simple get route
@get("/hello")
async def get_hello(request, response):
    return response("Hello, Tina4 Python!")

# simple get route with inline params
@get("/hello/{world}")
async def get_hello_world(world, request, response):
    return response(f"Hello, {world} ")

# simple route responding with json
@get("/hello/json")
async def get_hello_json(world, request, response):
    cars = [{"brand": "BMW"}, {"brand": "Toyota"}]

    return response(cars)

# respond with a file
@get("/hello/{filename}")
async def get_hello_file(filename, request, response):
   
    return response.file(filename, './src/public')

# respond with a redirection to another location
@get("/hello/redirect")
async def get_hello_redirect(request, response):
    
    return response.redirect("/hello/world")

@get("/hello/template")
async def get_hello_template(request, response):
    
    # renders any template in .src/templates
    return response.render("index.twig", {"data": request.params})

Further Documentation

https://tina4.com/

Community

License

MIT © 2007 – 2025 Tina4 Stack
https://opensource.org/licenses/MIT

Testing

uv run pytest --verbose


Tina4 – The framework that keeps out of the way of your coding.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

tina4_python-0.2.173.tar.gz (337.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tina4_python-0.2.173-py3-none-any.whl (356.8 kB view details)

Uploaded Python 3

File details

Details for the file tina4_python-0.2.173.tar.gz.

File metadata

  • Download URL: tina4_python-0.2.173.tar.gz
  • Upload date:
  • Size: 337.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tina4_python-0.2.173.tar.gz
Algorithm Hash digest
SHA256 02fea9472ce9648fb112f24984612fb0c6eaaa05216974dfd9711d299e157bd2
MD5 b36822be42ab86ca6782c69d264e587e
BLAKE2b-256 c532a2ec70ec4a7cec08c400e1e5f15d4f70aec39cfe3ebde4a1150f8c18594b

See more details on using hashes here.

File details

Details for the file tina4_python-0.2.173-py3-none-any.whl.

File metadata

  • Download URL: tina4_python-0.2.173-py3-none-any.whl
  • Upload date:
  • Size: 356.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tina4_python-0.2.173-py3-none-any.whl
Algorithm Hash digest
SHA256 c9f1dbf7d94d411f5c53a5f26c0bdf718f7aa91198f26b770576c75c5c6f9ad9
MD5 ea297c9ab51bb290b93a067e25aed4ee
BLAKE2b-256 c0aaecd3698eb3aa98715258bda86c08db29183bb70d7a50d5532099d4b2b179

See more details on using hashes here.

Supported by

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