Sign inSign up

musfiqdehan/amicodingparina-image

By musfiqdehan

Updated about 3 years ago

A Python-Django Project with REST API and Token-Based API Authentication, it is deployed on Render

Image
0

89

musfiqdehan/amicodingparina-image repository overview

আমি কোডিং পারি না!

A Python-Django Project with REST API and Token Based API Authentication, it is deployed on Render and containerized using Docker



Table of Contents

  • Necessary Links
  • Technology Used
  • How to Run Locally
    • From GitHub
    • From Docker
  • API Details

Technology Used

  • Frontend: HTML5, CSS3, Bootstrap5, JavaScript
  • Backend: Python=3.10.6, Django=4.2.3
  • Database: SQLite3
  • Deployment: Render
  • API: Django-Tastypie=0.14.5
  • Version Control: Git, GitHub
  • Containerization: Docker
  • Editor: VS Code
  • Operating System: WSL2 (Ubuntu 22.04 LTS)
  • Browser: Google Chrome, Microsoft Edge

How to Run Locally

From GitHub
  • Install Python 3.10.6
  • Install pip
sudo apt install python3-pip
  • Install pipenv
pip3 install pipenv
  • Clone the repository
git clone https://github.com/MusfiqDehan/amicodingparina.git
  • Go to the project directory
cd amicodingparina
  • Create a virtual environment
pipenv install
  • Activate the virtual environment
pipenv shell
  • Install the dependencies
pip3 install -r requirements.txt
  • Run the server
python manage.py runserver 8080
deactivate
From Docker
  • Pull the docker image.
docker pull musfiqdehan/amicodingparina:v0.1.0
  • Run the docker container
docker run -p 8000:8000 musfiqdehan/amicodingparina:v0.1.0
docker rmi musfiqdehan/amicodingparina:v0.1.0

API Details

  • Endpoint: https://ami-coding-pari-na.onrender.com/api/v1/items/

  • Method: GET

  • URL Parameters:

    • start_datetime=[datetime]
    • end_datetime=[datetime]
    • user_id=[integer]
  • Example:

    • To include multiple parameters in the URL, you can use the ? character to start the query string and the & character to separate each key-value pair.

    • For example, if you want to get all input values from user with id 1 between July 1, 2023, and August 1, 2023, you would format your URL like this:

    • Url with parameters: https://ami-coding-pari-na.onrender.com/api/v1/items/?start_datetime=2023-07-01T00:00:00Z&end_datetime=2023-08-01T00:00:00Z&user_id=1

    • In this URL:

      • start_datetime=2023-07-01T00:00:00Z: sets the start of the datetime range.
      • end_datetime=2023-08-01T00:00:00Z sets the end of the datetime range.
      • user_id=1 specifies the user.
    • The datetime format used in the URL is the ISO 8601 Datetime Format: YYYY-MM-DDTHH:MM:SSZ. This format is recognized by Django and many other web frameworks.

Tag summary

Content type

Image

Digest

sha256:2173e6566

Size

380.9 MB

Last updated

about 3 years ago

docker pull musfiqdehan/amicodingparina-image:v0.1.0