Skip to main content

The itty-bitty Python web framework... **Now Rewritten For Python 3!**

Project description

itty3

The itty-bitty Python web framework... Now Rewritten For Python 3!

If you're on Python 2, you're looking for itty for Python 2 instead...

Quick Start

import itty3

# Make an app (mostly just for routing & niceties).
app = itty3.App()

# Register your views with the app.
@app.get("/")
def index(request):
    return app.render(request, "Hello, world!")

if __name__ == "__main__":
    # Run a simple WSGI server!
    app.run()

Why?

itty3 is a micro-framework for serving web traffic. Prior to its inital release, itty3 weighed in at just 500 lines of code.

Granted, it builds on the shoulders of giants, using big chunks of the Python standard library. But it has no other external dependencies!

Reasons for itty3:

  • Extremely lightweight
  • Fast to start working with
  • Easy to produce initial/toy services
  • Minimal boilerplate
  • Useful for places where you can't/don't have a full Python setup
  • Useful for including directly, like when you lack permissions
  • Works with a variety of WSGI servers, including Gunicorn

If you need to produce a big application, you're probably better off with Django, Flask, or any of the other larger/more mature web frameworks. No pressure!

Setup

pip install itty3 is what most people will want.

That said, itty3 is completely self-contained to a single file & relies only on the Python standard library. You can directly copy itty3.py into your project & import it directly!

Dependencies

  • Python 3.7+

License

New BSD

Running Tests

$ pip install pytest
$ pytest tests

Building Docs

$ pip install sphinxcontrib-napoleon
$ cd docs
$ make html

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

itty3-1.0.0a0.tar.gz (255.8 kB view details)

Uploaded Source

Built Distribution

itty3-1.0.0a0-py2.py3-none-any.whl (11.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file itty3-1.0.0a0.tar.gz.

File metadata

  • Download URL: itty3-1.0.0a0.tar.gz
  • Upload date:
  • Size: 255.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4

File hashes

Hashes for itty3-1.0.0a0.tar.gz
Algorithm Hash digest
SHA256 5941cc91796cd5bbc49366377d0d133aeacb4a217e2da15ed740286335c7c318
MD5 a167c054a66f1252725f05fabbb91887
BLAKE2b-256 b7ff0dae087708a5dba501f1ff64ad86ebaadbd9ef34f1782fc2d9bf19a32620

See more details on using hashes here.

File details

Details for the file itty3-1.0.0a0-py2.py3-none-any.whl.

File metadata

  • Download URL: itty3-1.0.0a0-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4

File hashes

Hashes for itty3-1.0.0a0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7a16f7e9afc3dca0e9812bef123a493dfbd9b80e49041a92743d00c10e1bede4
MD5 35c379d7245d3400c4a50df021561b13
BLAKE2b-256 0b644af70eb545805278003beee0153454afd0e695b72261dc7e51b671dd5ea7

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