Skip to content

Commit 99f89aa

Browse files
committed
Updated readmes with latest
1 parent b01fdaa commit 99f89aa

5 files changed

Lines changed: 47 additions & 20 deletions

File tree

README.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,68 @@
11
# serverless-python-dev
22

3-
Canonical source for [*Building Serverless Python Apps Using FastAPI and AWS*](https://www.amazon.com/dp/B09Z7CSDRX). Upload and maintain this repository on GitHub as **CloudBytesCollection/serverless-python-dev**.
3+
<p align="center">
4+
<img src="./python_book.jpg" alt="Building Serverless Python Apps on AWS" width="360" />
5+
</p>
46

5-
The **Node.js** book uses a separate tree: `serverless-nodejs-dev/` with `sample-aws-starter-project` and `sample-aws-book-api`. Do not mix the two books’ folders.
7+
Companion code for **Building Serverless Python Apps on AWS** (Cloud Bytes Collection). Clone this repo and open the project that matches the chapter you are on.
68

7-
## Projects in this repo
9+
## Which project should I use?
810

9-
| Path | Use in the book |
10-
|------|-----------------|
11-
| [sample-fastapi-graphql-starter-project](./sample-fastapi-graphql-starter-project/) | Chapter 2 — FastAPI + Strawberry starter (`hello_world`, local GraphQL) |
12-
| [sample-fastapi-graphql-book-api](./sample-fastapi-graphql-book-api/) | Main examplebooks/reviews API, MongoDB, Docker, CDK/Fargate, CI/CD |
13-
| [sample-fastapi-graphql-book-api-mcp](./sample-fastapi-graphql-book-api-mcp/) | Book API + Chapter 9 MCP (`fastapi-mcp`, REST routes as tools) |
11+
| Folder | When to use it |
12+
|--------|----------------|
13+
| [sample-fastapi-graphql-starter-project](./sample-fastapi-graphql-starter-project/) | **Chapter 2** — FastAPI + Strawberry starter (`hello_world`, local GraphQL) |
14+
| [sample-fastapi-graphql-book-api](./sample-fastapi-graphql-book-api/) | **Chapters 3–8**Books/reviews API, MongoDB, Docker, CDK/Fargate, CI/CD |
15+
| [sample-fastapi-graphql-book-api-mcp](./sample-fastapi-graphql-book-api-mcp/) | **Chapter 9** — Same API with MCP tools (`fastapi-mcp`, REST routes exposed to agents) |
1416

17+
Each folder has its own `README` with environment variables, Docker notes, and deploy steps.
1518

16-
## Tooling
19+
## Prerequisites
1720

1821
- Python **3.12** (see each project’s `.python-version`)
19-
- Dependencies via **[uv](https://docs.astral.sh/uv/)** (`uv.lock` in each project)
20-
- AWS CDK CLI **>= 2.1124.1** where CDK is used
22+
- **[uv](https://docs.astral.sh/uv/)** for installs (`uv sync` in each project directory)
23+
- **Docker** (for MongoDB and container builds in the book API projects)
24+
- **AWS CDK CLI** `>= 2.1124.1` when you reach the deploy chapters
2125

2226
## Quick start
2327

28+
### Chapter 2 starter
29+
2430
```bash
25-
# Starter (Chapter 2)
2631
cd sample-fastapi-graphql-starter-project
2732
uv sync --all-groups
2833
uv run pytest tests
2934
uv run python main.py
35+
```
36+
37+
Open GraphiQL at `http://127.0.0.1:8000/graph` (see that project’s README).
38+
39+
### Book API (main example)
3040

31-
# Book API
41+
```bash
3242
cd sample-fastapi-graphql-book-api
3343
uv sync --all-groups
44+
docker compose up mongo # in another terminal
3445
uv run pytest tests
46+
uv run uvicorn main:app --reload
47+
```
48+
49+
Copy or create a `.env` file using the variables listed in [sample-fastapi-graphql-book-api/README.MD](./sample-fastapi-graphql-book-api/README.MD).
50+
51+
### Book API + MCP (Chapter 9)
52+
53+
```bash
54+
cd sample-fastapi-graphql-book-api-mcp
55+
uv sync --all-groups
56+
docker compose up mongo
57+
uv run uvicorn main:app --reload
3558
```
3659

37-
## Publishing checklist
60+
See [sample-fastapi-graphql-book-api-mcp/README.MD](./sample-fastapi-graphql-book-api-mcp/README.MD) for MCP Inspector setup.
61+
62+
## Related repos
63+
64+
The **Node.js** book in this series uses a different repository: [serverless-nodejs-dev](https://github.com/CloudBytesCollection/serverless-nodejs-dev) (`sample-aws-starter-project`, `sample-aws-book-api`). Those projects are not part of this Python repo.
65+
66+
## License
3867

39-
1. Push this directory to `github.com/CloudBytesCollection/serverless-python-dev`.
40-
2. Ensure each subproject’s CI workflows pass on `main`.
41-
3. Book **Resources** should link to this monorepo (not the Node `sample-aws-starter-project` repo).
68+
Each subproject includes its own license file (typically BSD 3-Clause). See the folder you are working in.

python_book.jpg

199 KB
Loading

sample-fastapi-graphql-book-api-mcp/README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/)
77

88

9-
Book API with **GraphQL**, **REST**, and **MCP** ([fastapi-mcp](https://github.com/tadata-org/fastapi_mcp)) — Chapter 9 of [*Building Serverless Python Apps Using FastAPI and AWS*](https://www.amazon.com/dp/B09Z7CSDRX).
9+
Book API with **GraphQL**, **REST**, and **MCP** ([fastapi-mcp](https://github.com/tadata-org/fastapi_mcp)) — Chapter 9 of **Building Serverless Python Apps on AWS**.
1010

1111
Based on [sample-fastapi-graphql-book-api](../sample-fastapi-graphql-book-api/) with REST routes annotated for MCP tools (`operation_id`, `description`).
1212

sample-fastapi-graphql-book-api/README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
A sample python book-api project using FastAPI and GraphQL. This project leverages docker for containerization and provides the full setup to deploy to AWS Fargate using AWS CDK.
1010

11-
Part of the [serverless-python-dev](https://github.com/CloudBytesCollection/serverless-python-dev) monorepo for [*Building Serverless Python Apps Using FastAPI and AWS*](https://www.amazon.com/dp/B09Z7CSDRX) by [Eidan J. Rosado](https://eidanrosado.com). Chapter 2 starter: [sample-fastapi-graphql-starter-project](../sample-fastapi-graphql-starter-project/).
11+
Part of the [serverless-python-dev](https://github.com/CloudBytesCollection/serverless-python-dev) monorepo for **Building Serverless Python Apps on AWS** by [Eidan J. Rosado](https://eidanrosado.com). Chapter 2 starter: [sample-fastapi-graphql-starter-project](../sample-fastapi-graphql-starter-project/).
1212

1313
### Running Services with Docker
1414
To avoid setting up MongoDB and other such services locally, the team uses Docker. You'll need to install Docker to proceed pulling the image from the team's hub. Contact one of the team admins for access to the hub. To start peripheral services simply execute the following:

sample-fastapi-graphql-starter-project/README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
A python starter project using FastAPI and GraphQL. This project leverages docker for containerization and was the initial foundation for the complete project in [sample-fastapi-graphql-book-api](../sample-fastapi-graphql-book-api/).
99

10-
Part of the [serverless-python-dev](https://github.com/CloudBytesCollection/serverless-python-dev) monorepo for [*Building Serverless Python Apps Using FastAPI and AWS*](https://www.amazon.com/dp/B09Z7CSDRX) by [Eidan J. Rosado](https://eidanrosado.com).
10+
Part of the [serverless-python-dev](https://github.com/CloudBytesCollection/serverless-python-dev) monorepo for **Building Serverless Python Apps on AWS** by [Eidan J. Rosado](https://eidanrosado.com).
1111

1212
### Running Services with Docker
1313
To avoid setting up MongoDB and other such services locally, the team uses Docker. You'll need to install Docker to proceed pulling the image from the team's hub. Contact one of the team admins for access to the hub. To start peripheral services simply execute the following:

0 commit comments

Comments
 (0)