https://github.com/pydatablog/fast-demo
https://github.com/pydatablog/fast-demo
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pydatablog/fast-demo
- Owner: PyDataBlog
- Created: 2025-05-23T09:27:42.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-05-30T17:20:44.000Z (6 months ago)
- Last Synced: 2025-07-04T21:39:11.183Z (5 months ago)
- Language: Python
- Size: 90.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fast Demo API
This project is a FastAPI application.
## Running with Docker
### Prerequisites
- Docker installed on your system.
### Build the Docker Image
Navigate to the project's root directory (where the `Dockerfile` is located) and run the following command to build the Docker image:
```bash
docker build -t fast-demo .
```
### Run the Docker Container
Once the image is built, you can run it as a container:
```bash
docker run -p 8000:8000 fast-demo
```
This command will:
- Run the container in the foreground.
- Map port 8000 of the container to port 8000 on your host machine.
### Accessing the Application
Once the container is running, you can access the API endpoints:
- **Main API Root**: `http://localhost:8000/api/fast-demo/`
- **Main API Items (POST)**: `http://localhost:8000/api/fast-demo/items/`
- **Sub API v21 Index**: `http://localhost:8000/api/fast-demo/v21/`
- **Sub API v21 Sub-route**: `http://localhost:8000/api/fast-demo/v21/sub`
You can open these URLs in your browser or use an API client like Postman or curl. For example, to check the main API root:
```bash
curl http://localhost:8000/api/fast-demo/
```