Skip to main content

Emmett

Emmett is a full-stack Python web framework designed with simplicity in mind.

The aim of Emmett is to be clearly understandable, easy to be learned and to be used, so you can focus completely on your product's features:

from emmett import App, request, response
from emmett.orm import Database, Model, Field
from emmett.tools import service, requires

class Task(Model):
    name = Field.string()
    is_completed = Field.bool(default=False)

app = App(__name__)
app.config.db.uri = "postgres://user:password@localhost/foo"
db = Database(app)
db.define_models(Task)
app.pipeline = [db.pipe]

def is_authenticated():
    return request.headers["Api-Key"] == "foobar"
    
def not_authorized():
    response.status = 401
    return {'error': 'not authorized'}

@app.route(methods='get')
@service.json
@requires(is_authenticated, otherwise=not_authorized)
async def todo():
    page = request.query_params.page or 1
    tasks = Task.where(
        lambda t: t.is_completed == False
    ).select(paginate=(page, 20))
    return {'tasks': tasks}

pip version Tests Status

Documentation

The documentation is available at https://emmett.sh/docs. The sources are available under the docs folder.

Examples

The bloggy example described in the Tutorial is available under the examples folder.

Status of the project

Emmett is production ready and is compatible with Python 3.7 and above versions.

Emmett follows a semantic versioning for its releases, with a {major}.{minor}.{patch} scheme for versions numbers, where:

  • major versions might introduce breaking changes
  • minor versions usually introduce new features and might introduce deprecations
  • patch versions only introduce bug fixes

Deprecations are kept in place for at least 3 minor versions, and the drop is always communicated in the upgrade guide.

How can I help?

We would be very glad if you contributed to the project in one or all of these ways:

  • Talking about Emmett with friends and on the web
  • Adding issues and features requests here on GitHub
  • Participating in discussions about new features and issues here on GitHub
  • Improving the documentation
  • Forking the project and writing beautiful code

License

Emmmett is released under the BSD License.

However, due to original license limitations, some components are included in Emmett under their original licenses. Please check the LICENSE file for more details.

Release files for emmett 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emmett 2.1.0
File Size Uploaded
Emmett-2.1.0.tar.gz 387.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for emmett 2.1.0
File Interpreter ABI Platform
Emmett-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 821.8 kB

Release files / Emmett-2.1.0.tar.gz

Download URL Emmett-2.1.0.tar.gz
Size 387.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bafc76fceac236e5bd9d8e2b9198c45f303749c2e1f379dfd19e457b94d3a7e5
BLAKE2b-256 checksum
How to use checksums
eb715b6b1da5f46c11de679312d3682e6db25902d5422e3bfef83c0e008475e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.3 CPython/3.8.6 Linux/5.4.0-1026-azure

Release files / Emmett-2.1.0-py3-none-any.whl

Download URL Emmett-2.1.0-py3-none-any.whl
Size 434.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65a4884cc81ce3ce89c8775c97bcfa4ff80ee9424160be7d507506f04b8ae752
BLAKE2b-256 checksum
How to use checksums
929e5880ee87f204cde82a0b2ce10772776654e2ff1c813f174a1dd12659539a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.3 CPython/3.8.6 Linux/5.4.0-1026-azure

Release history Release notifications | RSS feed

2.8.1

2 release files

2.8.0

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.13

2 release files

2.5.11

2 release files

2.5.9

2 release files

2.5.8

2 release files

2.5.7

2 release files

2.5.6

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.14

2 release files

2.4.13

2 release files

2.4.12

2 release files

2.4.11

2 release files

2.4.10

2 release files

2.4.9

2 release files

2.4.8

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

This release

2.1.0 This release

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

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