The micro web framework for inventors
Project description
Emmett55
Emmett55 is a Python micro web framework designed with simplicity in mind.
from emmett55 import App, request, response
from emmett55.tools import service, requires
app = App(__name__)
def is_authenticated():
return request.headers.get("api-key") == "foobar"
def not_authorized():
response.status = 401
return {"error": "not authorized"}
@app.route("/", methods='get')
@requires(is_authenticated, otherwise=not_authorized)
@service.json
async def index():
return {"message": "hello world"}
Compared with Emmett
Emmett55 is based on Emmett and shares the following features with it:
- application and modules
- routing
- request/response/session/websocket helpers
- the pipeline
- services (JSON only)
- caching (except for disk cache)
- HTML code generation
- extensions
- testing client
- CLI (with the
emmett55
command)
Consequentially, Emmett55 doesn't include:
- the ORM
- the authentication system
- the templating system
- the internationalization system
- validations
- forms utilities
- XML services
- disk caching
- the mailer
- the debugger
Typical use-cases for picking Emmett55 over Emmett are:
- the lack of need of the upper-mentioned missing features
- the desire to use different libraries in place of the Emmett components, like SQLAlchemy or Jinja
Documentation
While we're still in the process of developing Emmett55 documentation, the Emmett one can be examined – with the caviat to replace emmett
with emmett55
when mentioned and keep in mind the upper-mentioned list of non-included features.
License
Emmett55 is released under the BSD License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file emmett55-1.0.0.tar.gz
.
File metadata
- Download URL: emmett55-1.0.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 459e50db61c2efbebfa3913bbbc3caf6fe251d24bbc83c249017eb875e84dcc7 |
|
MD5 | 790c321182187bc6bf05eb52fb3f0624 |
|
BLAKE2b-256 | c66b9718933c7d5bcd3255b4106a4a71a2b4bbe14928b77490b94d3483e10124 |
File details
Details for the file emmett55-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: emmett55-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a371370cec3b397fc4caf7a07950a4683e2438b145d40183bf420e4e85b93a2 |
|
MD5 | 93902f57ca2e5df7dad30e9516e3997d |
|
BLAKE2b-256 | 8144d0d2303756777fc0c35c60cf3d6c5f5536a9f7be912402fe9e555e37addf |