This project uses FastAPI, MySQL, and supporting Python libraries for scraping, data processing, and API development.
Install the required Python packages:
pip install bs4 cloudscraper lxml mysql-connector-python pdfplumber "fastapi[standard-no-fastapi-cloud-cli]" uvicorn sqlalchemy pydanticOptional (in case mysql-connector doesn’t work):
pip install pymysqlNote: Installing
pdfplumberwill also installpdfminer.sixautomatically. No need to install them seperately.
Run the main API (main.py) using FastAPI:
fastapi dev api.pySHOW TABLES;
DROP TABLE People;
SELECT * FROM People;
SELECT url, image_url FROM People;Follow CVAT’s Docker setup guide if you are on ubuntu 22. Or check the Docker official site Or use Dockers Convenience Install Script
docker run --name mysql-server -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 -d mysql:oraclelinux9docker exec -it mysql-server /bin/bashmysql -u rootIf the container is stopped or the system reboots, you don’t need to run the full command again. Just restart the container:
docker start mysql-server