I am assuming you all might know what a Fibonacci sequence is, For those who don’t know, it’s the sequence of numbers such that each number is the sum of the two preceding ones, starting from 0 and 1. For example please refer to the following sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765
The question of finding a specific number from the series is what you could expect is a basic coding interview. Anyone from a coding background would know how to do this. …
This article is to show you how easy it is to make a simple file upload API using Django viewsets. There are other alternatives to do the same but in this article, we will be using a viewsets, a serializer, and Django default routing to make an API to upload any file.
I am writing this post to mention what I had been faced with when dealing Django rest framework file upload initially, which will support those who are trying to find out how to do so.
This article is the very beginning of my blog series explaining the deep learning textbook by Ian Goodfellow and Yoshua Bengio and Aaron Courville.
Disclaimer: If I am wrong please correct me, I will try my best to explain things in a much simpler and easier way.
You remember things well enough when you take good notes.
Yes, writing down something seems to help us understand it better. On the other hand, not writing down things simply asks forgetting. …
It took me hours to figure out how to add pdb to my Django project which resides in a Docker for software development. So I thought it would be great to make an article about it.
There can be mistakes in what I wrote and the things that I have conveyed, I am always ready to change or admit my mistake if found convincing.
A sample project is created to demonstrate:
This article is to show how we can do one of the advanced serializer usages called Dynamically modification fields. Dynamic modifying fields can make a Django rest framework API act like graphQL endpoint by retrieving only the required fields from the model, which is our primary goal for this article.
Once a serializer has been initialized, the dictionary of fields that are set on the serializer can be accessed using the
.fields attribute. Accessing and modifying this attribute allows you to dynamically modify the serializer.
fields argument explicitly helps you to do curious stuff, such as modifying the…
This article is about the deployment of the API flask application to Heroku server and having a continuous integration with Github.
We will be continuing the above article for deploying our API application. In brief, the above article follows a step by step process for creating our API application using Flask. The application can generate a random name and email on every request that hit the API.
To begin we have to commit and push our code to a Github repository. If you had followed the previous article you will be currently having a folder called flask_api and a file…
This article is for the beginner who is looking to create an API using the flask. We will be creating an API that can return a random name and email for every request that reaches the API.
Let's build an API!!
pip install flask
pip install Faker
Check if the flask is installed and working fine, make a file called hello.py with the following code.
from flask import Flask
app = Flask(__name__)
return "Hello World!"
And run the following code in the path where the file is created.