Skip to main content

Encrypted cookie support for Tornado Web Server

License

This software is under the MIT License

Requirements

  • PyCrypto

  • Tornado

Please file a bug for version issues. Tested on Python 3.2.

Encryption

Encryption is done using AES256 with a 32 byte block.

Example

Handler

from tornadoencookie.encookie import EncookieMixin

class MyHandler(tornado.web.RequestHandler, EncookieMixin):
    def get(self):
        #Get a cookie
        self.encookie.get_cookie('hello')

        #Get a secure cookie
        self.encookie.get_secure_cookie('hello')

        #Set a regular cookie
        self.encookie.set_cookie('hi', 'there')

        #Set a secure cookie
        self.encookie.set_secure_cookie('hello', 'Timmy')

Configuration

application = tornado.web.Application([
    (r'/', MyHandler),
], **{
    'encookie_secret': 'iamthecookiemons',
    },
)

Metadata

Release files for tornado-encookie 0.0.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 tornado-encookie 0.0.1
File Size Uploaded Provenance
tornado-encookie-0.0.1.tar.gz 2.9 kB Without provenance Details

Release files / tornado-encookie-0.0.1.tar.gz

Download URL tornado-encookie-0.0.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6f34d4dcd631cfb0f95a31fc0101a59fe4af4ef80656fc78e7b4d8816fd3fb24
BLAKE2b-256 checksum
How to use checksums
d2d692dce94b0192e9673f2529793a2971f030c1aba7056f071080ae34f70ade
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tornado-encookie 0.0.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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

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