Core classes, functions, and methods:
-
main.py
: Entry point of our application. Contains the FastAPI app instance and the API endpoint definitions. -
scrape.py
:Scrape
class, handles the scraping of the webpages. -
gpt.py
:GPT
class, handles the generation of tags using the ChatGPT API. -
storage.py
:Storage
class, handles the storage of the JSON object in the cloud storage bucket. -
utils.py
: This file contains utility functions such asvalidate_url
for URL validation andcreate_json
for creating the JSON object. -
test_main.py
: Test cases for the application. -
Dockerfile
: This file contains the instructions to build the Docker image for our application. -
requirements.txt
: Lists all the Python dependencies needed for the application.