Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emmett-framework/emmett
The web framework for inventors
https://github.com/emmett-framework/emmett
asgi asyncio emmett python web-framework
Last synced: 7 days ago
JSON representation
The web framework for inventors
- Host: GitHub
- URL: https://github.com/emmett-framework/emmett
- Owner: emmett-framework
- License: other
- Created: 2014-10-20T20:23:26.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-02T01:06:30.000Z (6 months ago)
- Last Synced: 2024-05-21T16:16:17.797Z (6 months ago)
- Topics: asgi, asyncio, emmett, python, web-framework
- Language: Python
- Homepage:
- Size: 3.71 MB
- Stars: 984
- Watchers: 32
- Forks: 70
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-python-web-frameworks - Emmett - a full-stack Python web framework designed with simplicity in mind. (Full-stack frameworks, including data layer (ORM))
- best-of-web-python - GitHub - 10% open · ⏱️ 29.05.2024): (Web Frameworks)
- awesome-repositories - emmett-framework/emmett - The web framework for inventors (Python)
README
![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, requiresclass 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 fixesDeprecations 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.