The project contains a bucket printer. It prints items in the MiNIO bucket.
There are two types of printers: StdoutPrinter and JsonPrinter. The environment
variable SW_ASSIGNMENT_MODE
is to set the printer type.
The Python application uses Poetry for dependency management.
This project sets up a Python application with MinIO using Docker Compose. The
files in minio_data
are mounted to the MinIO container. See the docker-compose.yml
.
- Docker
- Docker Compose
- Python 3.9.18
- Poetry
- Taskfile
-
Run the installation script to set up the required dependencies:
./install_dependencies.sh
This script will install Python 3.9.18, Taskfile, pipx, Poetry, and set up the Poetry environment.
-
Verify the project setup:
task all
This command will run all tasks, including formatting, linting, testing, building the Docker image, and running the Docker Compose setup.
sw_assignment/
: Main Python packagetests/
: Test filesDockerfile
: Docker configuration for the Python appdocker-compose.yml
: Docker Compose configurationTaskfile.yml
: Task runner configurationpyproject.toml
: Poetry project configuration
To run the application:
task up
To view the logs:
task logs
To stop the application:
task down
To run all together:
task run
- Use
task format
to run all formatters - Use
task lint
to run all linters - Use
task test
to run all tests - Use
task dev
to run the formatters, linters, and tests
For more detailed task information, refer to the Taskfile.yml
.