Skip to main content

MVC Web Framework

Project description

Sriracha

I put that on everything!

Sriracha is an MVC web framework written in Python with the purpose of making big and complex web applications easy to maintain, it serves as the Python equivalent of something like Rails for Ruby, Spring for Java, and could be seen somewhat similar to Angular.

Quick Start

python3 -m pip install sriracha
sri new myproject
cd myproject
./bin/dev-start

FAQ

Why this name? it's difficult to spell

You can think of it as sri-racha

Can I use it?

Sure, go ahead. You can get started with Quick Start

What templating engine does it use?

Liquid, this implementation. If you have experience with Jekyll or Shopify, you might be familiar with its syntax.

Is it fast?

That depends on your WSGI server! (sometimes.)

I chose Gunicorn and did a benchmark using wrk:

$ gunicorn http://0.0.0.0:8000
Running 10s test @ http://0.0.0.0:8000
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.21ms  336.15us  12.99ms   92.05%
    Req/Sec     1.55k    62.25     1.65k    75.50%
  30797 requests in 10.00s, 11.06MB read
Requests/sec:   3079.11
Transfer/sec:      1.11MB

Compared to the results of this (which should be much faster as it doesn't have to do any complex routing or messing with views or controllers):

def app(environ, start_response):
        data = b"Hello, World!\n"
        start_response("200 OK", [
            ("Content-Type", "text/plain"),
            ("Content-Length", str(len(data)))
        ])
        return iter([data])
Running 10s test @ http://0.0.0.0:8000
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.34ms  126.20us   5.88ms   97.70%
    Req/Sec     3.66k   234.92     6.84k    97.51%
  73109 requests in 10.10s, 10.67MB read
Requests/sec:   7238.95
Transfer/sec:      1.06MB

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

sriracha-0.1.1.tar.gz (8.1 kB view hashes)

Uploaded Source

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