cornice
Define Web Services in Pyramid.
Decision gist · record as of 2026-08-14
Yes, if you are building REST services with Pyramid. Cornice is actively maintained, has no known vulnerabilities, and significantly reduces boilerplate for service definition and validation. The copyleft license is a consideration only if you plan proprietary use. Low install friction and a single dependency make it a practical addition to Pyramid projects.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Pyramid to be installed and configured; Cornice is an extension layer, not a standalone framework.
- Low install friction with a single runtime dependency on pyramid.
- The project is actively maintained with recent commits and has been stable since its first release in 2011, indicating mature, well-tested code.
License · maintenance · safety
copyleft license (copyleft) — Licensed under Mozilla Public License 2.0 (copyleft), which requires derivative works to disclose source code and license under the same terms. Suitable for open-source projects but may constrain proprietary use.
last release 2024-02-08 (918 days) · last repo commit 2026-06-04 · 389 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 142,721 downloads/mo, #11,202 on PyPI
Alternatives
Verify before relying
pip install cornice
from cornice import Service
hello = Service(name='hello', path='/hello', description='A hello service')
@hello.get()
def get_hello(request):
return {'hello': 'world'}- Whether the package supports modern Python versions beyond what the fact sheet specifies.
- The scope and maturity of built-in API documentation features compared to alternatives.
What it is and what it does
Cornice is a set of helpers built on top of Pyramid that simplifies defining REST web services. It provides decorators to attach HTTP methods to service endpoints, built-in validation and error handling, and tools to generate API documentation. The package is designed for developers who want to build web services within the Pyramid framework without writing boilerplate routing and validation code.
Typically used by adding service definitions with decorators that specify HTTP methods, paths, and request/response schemas. Cornice handles the routing integration with Pyramid and provides utilities for common REST patterns like content negotiation and error responses. It depends only on Pyramid as a runtime dependency, making it lightweight to add to an existing Pyramid project.
Use it for
- Build REST APIs with Pyramid using declarative service decorators instead of manual routing configuration.
- Add automatic request validation and error handling to Pyramid endpoints without custom middleware.
- Generate API documentation from service definitions and docstrings for client developers.
- Define content-negotiated endpoints that serve different response formats based on client Accept headers.
- Implement standardized HTTP error responses and status codes across multiple service endpoints.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building REST services with Pyramid.
Cornice is actively maintained, has no known vulnerabilities, and significantly reduces boilerplate for service definition and validation. The copyleft license is a consideration only if you plan proprietary use. Low install friction and a single dependency make it a practical addition to Pyramid projects.
Install
cornice on PyPI
Before you install
Low install friction with a single runtime dependency on pyramid. The project is actively maintained with recent commits and has been stable since its first release in 2011, indicating mature, well-tested code.
Requires Pyramid to be installed and configured; Cornice is an extension layer, not a standalone framework.
License in practice
Licensed under Mozilla Public License 2.0 (copyleft), which requires derivative works to disclose source code and license under the same terms. Suitable for open-source projects but may constrain proprietary use.
Quickstart
pip install cornice
from cornice import Service
hello = Service(name='hello', path='/hello', description='A hello service')
@hello.get()
def get_hello(request):
return {'hello': 'world'}
Verify before relying
- Whether the package supports modern Python versions beyond what the fact sheet specifies.
- The scope and maturity of built-in API documentation features compared to alternatives.
Package facts
| License | copyleft license copyleft |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepyramid |
| Maintenance | Actively maintained 918 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 142,721 / month, #11,202 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: PylonsLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: WSGI :: Application |
Evidence: cornice-6.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “REST API framework pyramid”
- corniceCornice provides decorators and utilities to build REST web services…
- opentelemetry-instrumentation-pyramidAdds automatic tracing and metrics collection to Pyramid web…
- webargswebargs parses and validates HTTP request arguments (query strings,…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also pyramid · pyramid-jinja2 · pyramid-mako · pyramid-debugtoolbar · pyramid-retry · opentelemetry-instrumentation-pyramid · pyramid-tm · Flask-RESTful · factur-x