Metadata-Version: 2.3
Name: emmett
Version: 2.6.1
Summary: The web framework for inventors
Project-URL: Homepage, https://emmett.sh
Project-URL: Documentation, https://emmett.sh/docs
Project-URL: Funding, https://github.com/sponsors/gi0baro
Project-URL: Source, https://github.com/emmett-framework/emmett
Project-URL: Issues, https://github.com/emmett-framework/emmett/issues
Author-email: Giovanni Barillari <g@baro.dev>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: asyncio,web
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Dist: click>=6.0
Requires-Dist: emmett-core[granian,rapidjson]~=1.0.2
Requires-Dist: emmett-pydal==17.3.1
Requires-Dist: pendulum~=3.0.0
Requires-Dist: pyyaml~=6.0
Requires-Dist: renoir~=1.6
Requires-Dist: severus~=1.1
Provides-Extra: orjson
Requires-Dist: orjson~=3.10; extra == 'orjson'
Provides-Extra: uvicorn
Requires-Dist: h11>=0.12; extra == 'uvicorn'
Requires-Dist: httptools~=0.6; (sys_platform != 'win32') and extra == 'uvicorn'
Requires-Dist: uvicorn~=0.19; extra == 'uvicorn'
Requires-Dist: websockets~=10.0; extra == 'uvicorn'
Description-Content-Type: text/markdown

![Emmett](https://emmett.sh/static/img/logo-bwb-xb-xl.png)

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:

```python
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.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 todo():
    page = request.query_params.page or 1
    tasks = Task.where(
        lambda t: t.is_completed == False
    ).select(paginate=(page, 20))
    return {'tasks': tasks}
```

## Documentation

The documentation is available at [https://emmett.sh/docs](https://emmett.sh/docs).    
The sources are available under the [docs folder](https://github.com/emmett-framework/emmett/tree/master/docs).

## Examples

The *bloggy* example described in the [Tutorial](https://emmett.sh/docs/latest/tutorial) is available under the [examples folder](https://github.com/emmett-framework/emmett/tree/master/examples). 

## Status of the project

Emmett is production ready and is compatible with Python 3.8 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](https://emmett.sh/docs/latest/upgrading).

## 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

Emmett is released under the BSD License.

However, due to original license limitations, contents under [validators](https://github.com/emmett-framework/emmett/tree/master/emmett/validators) and [libs](https://github.com/emmett-framework/emmett/tree/master/emmett/libs) are included in Emmett under their original licenses. Please check the source code for more details.
