Fastapi/docs/getting-started.md

54 lines
827 B
Markdown

# Getting Started
## Prerequisites
- Docker
- Python 3.7+
## Installation
1. Clone the repository
2. Build the Docker image:
```bash
docker build -t fastapi-service .
```
3. Run the container:
```bash
docker run -p 8000:8000 fastapi-service
```
## Development
To set up a development environment:
1. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Run the application:
```bash
uvicorn main:app --reload
```
The API will be available at http://localhost:8000.
## API Documentation
FastAPI provides automatic interactive API documentation. Once the server is running, you can access:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc