GithubHelp home page GithubHelp logo

minhphan03 / imagecollector Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 947 KB

A simple API and UI implementation of a Image Collector using Tornado, Docker Compose and MongoDB

Python 70.73% Dockerfile 3.15% HTML 26.12%
asynchronous-programming mongodb python python-tornado

imagecollector's Introduction

Image Collector

A simple local image collector using a local-backed MongoDB instance and implemented asynchronously using Python Tornado and Docker. This web app is developed with additional html code for more client-friendly support. You can also test this collector using an API Platform, such as Postman. For any inquiries, refer to the instructions below.

The master branch is the most up-to-date one and should be the only one used for testing and using.

General Instruction for both versions

  1. Clone this repository
  2. Make sure that you have Docker and Docker Compose installed
  3. Run docker compose up -d to build the app

Instructions for using the API version with Postman/Insomnia

Disclaimer: the instructions may vary based on the app you use. I use Postman to test the API, so variations may happen if you use another app

  1. Download the API testing app to your choosing
  2. To test uploading images:
    • In the target URL bar: type "http://localhost:8888/api" (no slash / at the end)
    • Choose POST as the API request type
    • In the request body, choose form-data type. Put "image" (no double quotes) as key (don't forget to switch the upload type to file) and upload the image into the value box
    • If successful, the request will return a UUID. Refer to this UUID to retrieve your image
  3. To test downloading images using the UUID:
    • In the target URL bar: type "http://localhost:8888/api/{UUID}" where UUID is the UUID of the photo (discard the curly brackets when type in the uuid)
    • Choose GET as the API request type
    • Make sure the request body is set as "none"
    • Click send to send the request. If successful, the result image will be display in the result box

Instructions for using the UI version with web browser

  1. Navigate to "http://localhost:8888/"
  2. Follow the instructions on the menu to upload and download images.

imagecollector's People

Contributors

minhphan03 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.