A Python-Django Project with REST API and Token-Based API Authentication, it is deployed on Render
89
sudo apt install python3-pip
pip3 install pipenv
git clone https://github.com/MusfiqDehan/amicodingparina.git
cd amicodingparina
pipenv install
pipenv shell
pip3 install -r requirements.txt
python manage.py runserver 8080
Open the browser and go to http://127.0.0.1:8080/
To deactivate the virtual environment
deactivate
docker pull musfiqdehan/amicodingparina:v0.1.0
docker run -p 8000:8000 musfiqdehan/amicodingparina:v0.1.0
Open the browser and go to http://localhost:8000
Remove the docker image
docker rmi musfiqdehan/amicodingparina:v0.1.0
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.
Content type
Image
Digest
sha256:2173e6566…
Size
380.9 MB
Last updated
about 3 years ago
docker pull musfiqdehan/amicodingparina-image:v0.1.0