Skip to main content

A CGI environment framework.

Project description

PyTin is a CGI framework that provides shortcuts for application writers to focus less on common tasks and more on their application’s functionality.

Requests

Requests take all the data that exists in different areas like environment variables and standard input, and puts it all into one, cleanly organized object.

Responses

Responses are file-like objects, but with convenience methods named w (with a newline) and wn (without one). They also have custom attributes for setting common HTTP headers like Content-Type and Location.

RQMods/RSMods

These are applied to requests and responses. You pass a list of them as the rqmods and rsmods keyword arguments. They’re not required, and PyTin doesn’t even ship with any (yet), but they could be very helpful if you’re in a situation where you’d need one.

Bake

Bake is the major function you need to know. It will publish your object, collect the environment variables, enable tracebacks if needed, and pass extra settings to your application. After your request has been returned, it will be compiled and returned.

Prebake

The prebake function is designed to allow extra security and lighter script files. It’s a command-line-based wizard that produces a simple file that imports a function stored in a module and automatically bakes it.

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

PyTin-1.1.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file PyTin-1.1.tar.gz.

File metadata

  • Download URL: PyTin-1.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyTin-1.1.tar.gz
Algorithm Hash digest
SHA256 df22f11493d44530d2a9499e4d4f034b05e73befeba11a52d0bc3400301055d4
MD5 dd5d4a9f035e7a0492c83d8a1b6dad07
BLAKE2b-256 6ba65ef25bc8ab3e64c403770abb7a9730a47f9e11078a65ec5a68fa65815992

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