Skip to main content

Bottle plugin to session and caching library with WSGI Middleware

Example

import bottle
from bottle.ext import beaker

session_opts = {
    'session.type': 'file',
    'session.cookie_expires': 300,
    'session.data_dir': './data',
    'session.auto': True
}

app = beaker.middleware.SessionMiddleware(bottle.app(), session_opts)

@bottle.route('/test')
def test():
    s = bottle.request.environ.get('beaker.session')
    s['test'] = s.get('test',0) + 1
    s.save()
    return 'Test counter: %d' % s['test']

bottle.run(app=app)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bottle-beaker-0.1.3.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file bottle-beaker-0.1.3.tar.gz.

File metadata

  • Download URL: bottle-beaker-0.1.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bottle-beaker-0.1.3.tar.gz
Algorithm Hash digest
SHA256 36aec120bab18ff902b23ae34fc593a125cb56b4182e5f1205f1ff628d2694aa
MD5 36437243b5a66596fe3a07f6e3e2d799
BLAKE2b-256 4462f03fab8674fd7d256acd1d1cb1f15ae29e4134f6ec245b675834e62505ab

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 file

0.1.2

1 file

0.1.1

0.1.0

1 file

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