πΌοΈ Product Catalog Image API π
A REST API backend for product catalog image scraping and resizing. Streamline your image management with ease!
π How to Run:
- Activate your virtual environment.
- Install requirements:
pip install -r requirements.txt
- Migrate your database:
python manage.py makemigrations
&python manage.py migrate
- Launch the server:
python manage.py runserver
We can easily run the "dj_backend" project using Docker and Docker Compose for quick setup. Follow these steps:
-
Build the Docker Image:
docker build -t dj_backend .
-
Using Docker Compose:
docker-compose up --build -d # To run docker-compose stop # To stop
π΅οΈ How to Scrape Images:
To scrape images, simply run our custom management command: python manage.py scrape
π API Endpoints:
- Retrieve specific image info:
/api/v1/catalog/images/retrieve/{ID}/
- Get all scraped images from the original source URL name:
/api/v1/catalog/images/retrieve-by-source-url/{SOURCE_URL_NAME}/
- Fetch images of specific sizes by adding query parameters, e.g.,
/api/v1/catalog/images/retrieve/755b31ce-643b-427a-9f5b-0870a5fe9f43/?size=small
For inquiries or assistance, contact us at imamhossainroni95@gmail.com. Start optimizing your image workflows today! πΈβ¨