Skip to main content

The Pyramid Web Framework, a Pylons project

Project description

Pyramid

1.10-branch Travis CI Status 1.10-branch Documentation Status IRC Freenode

Pyramid is a small, fast, down-to-earth, open source Python web framework. It makes real-world web application development and deployment more fun, more predictable, and more productive.

from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response

def hello_world(request):
    return Response('Hello World!')

if __name__ == '__main__':
    with Configurator() as config:
        config.add_route('hello', '/')
        config.add_view(hello_world, route_name='hello')
        app = config.make_wsgi_app()
    server = make_server('0.0.0.0', 6543, app)
    server.serve_forever()

Pyramid is a project of the Pylons Project.

Support and Documentation

See Pyramid Support and Development for documentation, reporting bugs, and getting support.

Developing and Contributing

See HACKING.txt and contributing.md for guidelines on running tests, adding features, coding style, and updating documentation when developing in or contributing to Pyramid.

License

Pyramid is offered under the BSD-derived Repoze Public License.

Authors

Pyramid is made available by Agendaless Consulting and a team of contributors.

1.10 (2018-10-31)

  • No major changes from 1.10b1.

1.10b1 (2018-10-28)

Bug Fixes

1.10a1 (2018-10-15)

Features

Bug Fixes

  • Set appropriate code and title attributes on the HTTPClientError and HTTPServerError exception classes. This prevents inadvertently returning a 520 error code. See https://github.com/Pylons/pyramid/pull/3280

  • Replace webob.acceptparse.MIMEAccept from WebOb with webob.acceptparse.create_accept_header in the HTTP exception handling code. The old MIMEAccept has been deprecated. The new methods follow the RFC’s more closely. See https://github.com/Pylons/pyramid/pull/3251

  • Catch extra errors like AttributeError when unpickling “trusted” session cookies with bad pickle data in them. This would occur when sharing a secret between projects that shouldn’t actually share session cookies, like when reusing secrets between projects in development. See https://github.com/Pylons/pyramid/pull/3325

Deprecations

  • The pyramid.intefaces.ISession interface will move to require JSON-serializable objects in Pyramid 2.0. See “Upcoming Changes to ISession in Pyramid 2.0” in the “Sessions” chapter of the documentation for more information about this change. See https://github.com/Pylons/pyramid/pull/3353

  • The pyramid.session.signed_serialize and pyramid.session.signed_deserialize functions will be removed in Pyramid 2.0, along with the removal of pyramid.session.UnencryptedCookieSessionFactoryConfig which was deprecated in Pyramid 1.5. Please switch to using the SignedCookieSessionFactory, copying the code, or another session implementation if you’re still using these features. See https://github.com/Pylons/pyramid/pull/3353

  • Media ranges are deprecated in the accept argument of pyramid.config.Configurator.add_route. Use a list of explicit media types to add_route to support multiple types.

  • Media ranges are deprecated in the accept argument of pyramid.config.Configurator.add_view. There is no replacement for ranges to add_view, but after much discussion the workflow is fundamentally ambiguous in the face of various client-supplied values for the Accept header. See https://github.com/Pylons/pyramid/pull/3326

Backward Incompatibilities

  • On Python 3.4+ the repoze.lru dependency is dropped. If you were using this package directly in your apps you should make sure that you are depending on it directly within your project. See https://github.com/Pylons/pyramid/pull/3140

  • Remove the permission argument from pyramid.config.Configurator.add_route. This was an argument left over from a feature removed in Pyramid 1.5 and has had no effect since then. See https://github.com/Pylons/pyramid/pull/3299

  • Modify the builtin session implementations to set SameSite='Lax' on cookies. This affects pyramid.session.BaseCookieSessionFactory, pyramid.session.SignedCookieSessionFactory, and pyramid.session.UnencryptedCookieSessionFactoryConfig. See https://github.com/Pylons/pyramid/pull/3300

  • Variables defined in the [pshell] section of the settings will no longer override those set by the setup function. See https://github.com/Pylons/pyramid/pull/3318

  • pyramid.config.Configurator.add_notfound_view uses default redirect class exception pyramid.httpexceptions.HTTPTemporaryRedirect instead of previous pyramid.httpexceptions.HTTPFound. See https://github.com/Pylons/pyramid/pull/3328

  • Removed pyramid.config.Configurator.set_request_property which had been deprecated since Pyramid 1.5. Instead use pyramid.config.Configurator.add_request_method with reify=True or property=True. See https://github.com/Pylons/pyramid/pull/3368

  • Removed the principal keyword argument from pyramid.security.remember which had been deprecated since Pyramid 1.6 and replaced by the userid argument. See https://github.com/Pylons/pyramid/pull/3369

  • Removed the pyramid.tests subpackage that used to contain the Pyramid test suite. These changes also changed the format of the repository to move the code into a src folder. See https://github.com/Pylons/pyramid/pull/3387

Documentation Changes

Project details


Release history Release notifications | RSS feed

This version

1.10

Download files

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

Source Distribution

pyramid-1.10.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyramid-1.10-py2.py3-none-any.whl (325.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyramid-1.10.tar.gz.

File metadata

  • Download URL: pyramid-1.10.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.0

File hashes

Hashes for pyramid-1.10.tar.gz
Algorithm Hash digest
SHA256 3f91bcb8ee8ad3168eaf836d701b7b8c59481cec9ca085ab0251d1b953ffc46a
MD5 6cd7a25399961689765f345968ca5a6c
BLAKE2b-256 6cc6152f01aab635d90020be418c31e6d6424cd0dbbf6145b3dbf318b089498d

See more details on using hashes here.

File details

Details for the file pyramid-1.10-py2.py3-none-any.whl.

File metadata

  • Download URL: pyramid-1.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 325.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.0

File hashes

Hashes for pyramid-1.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e3cf837472c7c9acbd3a4169421a5b61ca79569054aacc1c3836274668015290
MD5 71e115aae9e02d97af743b6c70916b93
BLAKE2b-256 d1b7fb7177c13d85f8713e782090cd0f3b34eb7f305f6b7212d154ca4cec8ba4

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