This FastAPI application provides a backend service for managing Fertigungsmaschinen (manufacturing machines). It offers a RESTful API for accessing and manipulating data related to various manufacturing machines, their network connections, and participants.
- Retrieve a list of all Fertigungsmaschinen with detailed information.
- Get the total count of Fertigungsmaschinen.
- Additional management features for Fertigungsmaschinen (TBD).
.
├── README.md
├── backend
│ ├── Dockerfile
│ ├── app
│ │ ├── __init__.py
│ │ ├── data
│ │ │ └── fertigungsmaschinen.json
│ │ ├── dependencies.py
│ │ ├── main.py
│ │ ├── models.py
│ │ └── routes
│ │ ├── __init__.py
│ │ ├── fertigungsmaschinen.py
│ │ └── teilnehmer.py
│ ├── requirements.txt
│ └── tests
│ ├── __init__.py
│ └── test_main.py
├── cleanUp.sh
└── docker-compose.yml
Dockerfile
: Defines the Docker container setup for the application.app/
: Main application directory.data/
: Contains JSON data files likefertigungsmaschinen.json
.main.py
: Entry point of the FastAPI application.models.py
: Pydantic models for the application.routes/
: API routes of the application.
requirements.txt
: Lists the Python dependencies of the application.tests/
: Contains test scripts for the application.cleanUp.sh
: Shell script for Docker housekeeping.docker-compose.yml
: Docker Compose configuration file.
- Docker
- Python 3.9+
- FastAPI
- Uvicorn
-
Clone the repository:
git clone [repository-url]
-
Navigate to the
backend
directory:cd backend
-
Build the Docker image:
docker build -t fastapi-app .
-
Run the Docker container:
docker run -p 8000:8000 fastapi-app
-
The application will be available at
http://localhost:8000
.
After running the application, you can access the auto-generated API documentation by visiting:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
These pages provide an interactive way to explore the API's endpoints and their responses.
To run tests, navigate to the backend
directory and execute:
pytest
(Provide instructions for contributing to this project, if applicable.)