Skip to main content

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. At its 1.0.0 release, itty3 weighed in at less than ~1k 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-cov
$ pytest tests

# For code coverage
$ pytest --cov=itty3 tests

Building Docs

$ pip install -r docs/requirements.txt
$ cd docs
$ make html

Metadata

Release files for itty3 1.1.1

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

Source distribution (sdist)

Source distribution for itty3 1.1.1
File Size Uploaded Provenance
itty3-1.1.1.tar.gz 318.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for itty3 1.1.1
File Interpreter ABI Platform
itty3-1.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 333.7 kB

Release files / itty3-1.1.1.tar.gz

Download URL itty3-1.1.1.tar.gz
Size 318.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7790f2b67747c0848af716e27b2579a4ee8dbd0adb496c8986e1fe421901bf4f
BLAKE2b-256 checksum
How to use checksums
682c780f4e5569047cf50bdb8b249b77b4388e08c202ef74730ae33d409fe91f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

Release files / itty3-1.1.1-py2.py3-none-any.whl

Download URL itty3-1.1.1-py2.py3-none-any.whl
Size 15.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
25320e5458e563cea8e1cdacc5d4dcc68fdac936b67c38bd1e9ad2ed6ba0283d
BLAKE2b-256 checksum
How to use checksums
f572c40a30a11b57ecdc479f0f275bc68d2fdb9bb61df5e76a99a546b8d87ead
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

Security for itty3 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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