Installation¶
This section provides detailed steps on how to install and set up the Quotes API project
Prerequisites¶
Before proceeding with the installation, ensure the following dependencies are installed on your system:
Python 3.9+: Quotes API requires Python version 3.9 or higher
You can check your current version of Python by running:
$ python3 --version
If it’s not installed or the version is too low, you can download Python from the official website: Python Downloads
Poetry: This project uses Poetry for dependency management. Poetry simplifies installing and managing dependencies
To install Poetry, follow the instructions in the official guide: Poetry Installation
wkhtmltoimage: The project relies on
wkhtmltoimageto generate quote images from HTML templates. Ensure it’s installed on your system:
Download the appropriate package for your distribution and install it using your package manager. Instructions for major distributions are available on the wkhtmltopdf downloads page
Installation Steps¶
Once the prerequisites are installed, follow these steps to install and set up Quotes API:
Clone the repository:
First, clone the Quotes API repository from GitHub to your local machine:
$ git clone https://github.com/Fl1yd/Quotes
Navigate to the project folder:
$ cd Quotes
Install dependencies using Poetry:
With Poetry installed, run the following command in the project directory to install all the necessary dependencies:
$ poetry install
Running the Application¶
Now that everything is installed, you can start the Quotes API server:
Start the FastAPI application:
Run the following command to launch the FastAPI application:
$ poetry run python -m app
This will start the application on the port specified in the config.toml file (by default, it uses port 1337)
Access the API documentation:
FastAPI automatically generates API documentation, which you can access in your browser: http://127.0.0.1:1337/docs. These interactive documentation pages will help you test and explore the available endpoints