Skip to content

Commit

Permalink
Update documentation (#331)
Browse files Browse the repository at this point in the history
* Update documentation

* remove requirements
  • Loading branch information
Kludex authored Sep 20, 2024
1 parent 93baf9c commit 4a95083
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 71 deletions.
11 changes: 0 additions & 11 deletions .codecov.yml

This file was deleted.

7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
<a href="https://pypi.org/project/mangum/">
<img src="https://badge.fury.io/py/mangum.svg" alt="Package version">
</a>
<a href="https://travis-ci.org/jordaneremieff/mangum">
<img src="https://travis-ci.org/jordaneremieff/mangum.svg?branch=master" alt="Build Status">
</a>
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/mangum.svg?style=flat-square">

Mangum is an adapter for running [ASGI](https://asgi.readthedocs.io/en/latest/) applications in AWS Lambda to handle Function URL, API Gateway, ALB, and Lambda@Edge events.
Expand All @@ -24,10 +21,6 @@ Mangum is an adapter for running [ASGI](https://asgi.readthedocs.io/en/latest/)

- Startup and shutdown [lifespan](https://asgi.readthedocs.io/en/latest/specs/lifespan.html) events.

## Requirements

Python 3.7+

## Installation

```shell
Expand Down
8 changes: 4 additions & 4 deletions docs/asgi-frameworks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Frameworks

Mangum is intended to provide support to any [ASGI](https://asgi.readthedocs.io/en/latest/) (*Asynchronous Server Gateway Interface*) application or framework. The ["turtles all the way down"](https://simonwillison.net/2009/May/19/djng/?#turtles-all-the-way-down) principle of ASGI allows for a great deal of interoperability across many different implementations, so the adapter should "just work"* for any ASGI application or framework.
Mangum is intended to provide support to any [ASGI](https://asgi.readthedocs.io/en/latest/) (*Asynchronous Server Gateway Interface*) application or framework. The ["turtles all the way down"](https://simonwillison.net/2009/May/19/djng/?#turtles-all-the-way-down) principle of ASGI allows for a great deal of interoperability across many different implementations, so the adapter should "just work"* for any ASGI application or framework.

<small>* if it doesn't, then please open an [issue](https://github.com/erm/mangum/issues). :)</small>

Expand Down Expand Up @@ -75,7 +75,7 @@ handler = Mangum(app)

### FastAPI

[FastAPI](https://fastapi.tiangolo.com/) is a modern, fast (high-performance), web framework for building APIs with Python based on standard Python type hints.
[FastAPI](https://fastapi.tiangolo.com/) is a modern, fast (high-performance), web framework for building APIs with Python based on standard Python type hints.

```python
from fastapi import FastAPI
Expand All @@ -98,7 +98,7 @@ handler = Mangum(app)

### Responder

[Responder](https://responder.readthedocs.io/en/latest) is a familiar HTTP Service Framework for Python, powered by Starlette. The `static_dir` and `templates_dir` parameters must be set to none to disable Responder's automatic directory creation behaviour because AWS Lambda is a read-only file system - see the [limitations](https://mangum.io/asgi-frameworks/#limitations) section for more details.
[Responder](https://responder.readthedocs.io/en/latest) is a familiar HTTP Service Framework for Python, powered by Starlette. The `static_dir` and `templates_dir` parameters must be set to none to disable Responder's automatic directory creation behaviour because AWS Lambda is a read-only file system - see the [limitations](#limitations) section for more details.

```python
from mangum import Mangum
Expand Down Expand Up @@ -157,7 +157,7 @@ handler = Mangum(app)

### Django

[Django](https://docs.djangoproject.com/) is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
[Django](https://docs.djangoproject.com/) is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

It started introducing ASGI support in version [3.0](https://docs.djangoproject.com/en/3.0/releases/3.0/#asgi-support). Certain async capabilities are not yet implemented and planned for future releases, however it can still be used with Mangum and other ASGI applications at the outer application level.

Expand Down
9 changes: 1 addition & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
<a href="https://pypi.org/project/mangum/">
<img src="https://badge.fury.io/py/mangum.svg" alt="Package version">
</a>
<a href="https://travis-ci.org/jordaneremieff/mangum">
<img src="https://travis-ci.org/jordaneremieff/mangum.svg?branch=master" alt="Build Status">
</a>
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/mangum.svg?style=flat-square">

Mangum is an adapter for running [ASGI](https://asgi.readthedocs.io/en/latest/) applications in AWS Lambda to handle Function URL, API Gateway, ALB, and Lambda@Edge events.

***Documentation***: https://mangum.fastapiexpert.com/
***Documentation***: [https://mangum.fastapiexpert.com/]()

## Features

Expand All @@ -24,10 +21,6 @@ Mangum is an adapter for running [ASGI](https://asgi.readthedocs.io/en/latest/)

- Startup and shutdown [lifespan](https://asgi.readthedocs.io/en/latest/specs/lifespan.html) events.

## Requirements

Python 3.7+

## Installation

```shell
Expand Down
14 changes: 11 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ site_description: AWS Lambda & API Gateway support for ASGI
site_url: http://mangum.fastapiexpert.com

theme:
name: "material"
name: material
palette:
primary: "brown"
accent: "orange"
primary: brown
accent: orange

repo_name: Kludex/mangum
repo_url: https://github.com/Kludex/mangum
Expand All @@ -25,3 +25,11 @@ markdown_extensions:
- mkautodoc
- markdown.extensions.codehilite:
guess_lang: false
- pymdownx.details
- pymdownx.superfences
- pymdownx.snippets
- pymdownx.highlight:
pygments_lang_class: true

plugins:
- search
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ dev-dependencies = [
"mypy",
"brotli",
"brotli-asgi",
"mkdocs",
"mkdocs-material",
"mkautodoc",
"mkdocs>=1.6.0; python_version >= '3.12'",
"mkdocs-material; python_version >= '3.12'",
]

[project.urls]
Expand Down
5 changes: 5 additions & 0 deletions scripts/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -e

set -x # print executed commands to the terminal

uv run mkdocs serve
Loading

0 comments on commit 4a95083

Please sign in to comment.