{"id":132691,"date":"2023-03-25T10:54:31","date_gmt":"2023-03-25T10:54:31","guid":{"rendered":"https:\/\/blog.finxter.com\/?p=1242421"},"modified":"2023-03-25T10:54:31","modified_gmt":"2023-03-25T10:54:31","slug":"how-i-created-a-machine-learning-web-application-using-django","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2023\/03\/25\/how-i-created-a-machine-learning-web-application-using-django\/","title":{"rendered":"How I Created a Machine Learning Web Application Using Django"},"content":{"rendered":"\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-top\" data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;1242421&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;1&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\\\/5 - (1 vote)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n<div class=\"kksr-stars\">\n<div class=\"kksr-stars-inactive\">\n<div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"kksr-stars-active\" style=\"width: 142.5px;\">\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\"> 5\/5 &#8211; (1 vote) <\/div>\n<\/p><\/div>\n<p>Deploying a <a href=\"https:\/\/blog.finxter.com\/deploying-a-machine-learning-model-in-fastapi\/\" data-type=\"post\" data-id=\"22109\" target=\"_blank\" rel=\"noreferrer noopener\">Machine Learning model<\/a> as a web application makes it easy for others with little or no programming experience to use it. <\/p>\n<p>In previous tutorials, where I explained how I created a <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.finxter.com\/how-i-built-a-house-price-prediction-app-using-streamlit\/\" data-type=\"post\" data-id=\"1104457\" target=\"_blank\">house price prediction app<\/a> and a <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.finxter.com\/how-i-built-and-deployed-a-python-loan-eligibility-prediction-app-on-streamlit\/\" data-type=\"post\" data-id=\"1080976\" target=\"_blank\">loan eligibility app<\/a>, we made use of Streamlit. Streamlit is easy to use. This is why it is a popular choice for data scientists.<\/p>\n<p>In a world where learning one framework isn\u2019t enough, won\u2019t it be nice to learn how to accomplish this using Django? <\/p>\n<p>Understandably, Django can be tough for beginners. The only remedy though is constant practice. If you have been going through <a href=\"https:\/\/blog.finxter.com\/how-i-created-a-text-to-html-converter-app-using-django\/\" data-type=\"post\" data-id=\"1220283\" target=\"_blank\" rel=\"noreferrer noopener\">some of my tutorials on Django<\/a>, there is no doubt that you have become familiar with the process.<\/p>\n<p>Therefore, in this tutorial, we will add to your knowledge by creating a machine learning application using Django. Guess what we will used for prediction? The famous Titanic dataset!<\/p>\n<h2>Developing Machine Learning Model<\/h2>\n<p>The Machine Learning classification problem aims to predict the survival of the passengers based on their attributes. There are multiple steps involved in creating a Machine Learning model. To keep things simple, we will skip those steps and focus on showing how to implement Machine Learning in Django.<\/p>\n<p>Create a folder for this project. Then, inside the folder, create a file named <code>model.py<\/code>. This is where we will develop our model. You can download the dataset on my <a href=\"https:\/\/github.com\/finxter\/ML_with_Django\" data-type=\"URL\" data-id=\"https:\/\/github.com\/finxter\/ML_with_Django\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub page<\/a>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import MinMaxScaler\nfrom sklearn.linear_model import LogisticRegression\nimport pickle df = pd.read_csv('titanic.csv', index_col=0) # selecting the features we need\ndf = df[['Pclass', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare', 'Embarked', 'Survived']] # encoding the column to a numberic value\ndf['Sex'] = df['Sex'].map({'male': 0, 'female': 1}) # converting the Age column to numberic type\ndf['Age'] = pd.to_numeric(df.Age) # filling the null values\ndf['Age'] = df.Age.fillna(np.mean(df.Age)) # creating additional features from Embarked columns after converting to dummy variables\ndummies = pd.get_dummies(df.Embarked)\ndf = pd.concat([df, dummies], axis=1)\ndf.drop(['Embarked'], axis=1, inplace=True) X = df.drop(['Survived'], axis=1)\ny = df['Survived'] # scaling the features\nscaler = MinMaxScaler(feature_range=(0,1))\nX_scaled = scaler.fit_transform(X) model = LogisticRegression(C=1)\nmodel.fit(X_scaled, y) # saving model as a pickle\npickle.dump(model, open('titanic.pkl', 'wb'))\npickle.dump(scaler, open('scaler.pkl', 'wb'))\n<\/pre>\n<p>After <a href=\"https:\/\/blog.finxter.com\/read-a-csv-file-to-a-pandas-dataframe\/\" data-type=\"post\" data-id=\"440655\" target=\"_blank\" rel=\"noreferrer noopener\">importing the CSV<\/a> file, we saw that there are missing values in the features selected. We simply fill them up with the mean of the values. We convert the Embarked column to a dummy variable. Then, we add them to the features.<\/p>\n<p>We are using <code><a href=\"https:\/\/blog.finxter.com\/logistic-regression-in-one-line-python\/\" data-type=\"post\" data-id=\"2537\" target=\"_blank\" rel=\"noreferrer noopener\">LogisticRegression<\/a><\/code> as the Machine Learning algorithm to make this prediction. Finally, we save the model as a <a href=\"https:\/\/blog.finxter.com\/serialization-part-1\/\" data-type=\"post\" data-id=\"173558\" target=\"_blank\" rel=\"noreferrer noopener\">pickle object<\/a> to be used later.<\/p>\n<h2>Creating Django Project<\/h2>\n<p>As covered in previous tutorials, the steps to set up a new Django project are as follows:<\/p>\n<ul>\n<li>create and activate a <a href=\"https:\/\/blog.finxter.com\/python-virtual-environments-with-venv-a-step-by-step-guide\/\" data-type=\"post\" data-id=\"3393\" target=\"_blank\" rel=\"noreferrer noopener\">virtual environment<\/a><\/li>\n<li><a href=\"https:\/\/blog.finxter.com\/how-to-install-xxx-in-python\/\" data-type=\"post\" data-id=\"653128\" target=\"_blank\" rel=\"noreferrer noopener\">install required libraries<\/a><\/li>\n<li>create a new Django project which we will call predictions<\/li>\n<li>create a <code>requirements.txt<\/code> file<\/li>\n<li>create a new app called <code>titanic<\/code><\/li>\n<li>perform a migration to set up the database<\/li>\n<li>update <code>settings.py<\/code><\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ python3 -m venv venv\n$ source venv\/bin\/activate\n(venv) $ pip install django tzdata scikit-learn pandas numpy\n(venv) $ pip freeze > requirements.txt\n(venv) $ django-admin startproject venv_predictions .\n(venv) $ python manage.py startapp titanic\n(venv) $ python manage.py migrate\n(venv) $ python manage.py runserver\n<\/pre>\n<p>The <code>(venv)<\/code> indicates that you are in the virtual environment. Don\u2019t forget to include the dot which signifies creating the project in the current directory. You will see the image below if everything was installed successfully.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"607\" height=\"398\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-347.png\" alt=\"\" class=\"wp-image-1242434\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-347.png 607w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-347-300x197.png 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/figure>\n<\/div>\n<p>Open the <code>settings.py<\/code> file to let Django know that a new app is created. We will do so in the <code>INSTALLED_APP<\/code> section.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # custom app 'titanic',\n]\n<\/pre>\n<p>Let\u2019s configure the URLs for our website. Open the <code>urls.py<\/code> in the project folder and make it appear like this:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from django.contrib import admin\nfrom django.urls import path, include urlpatterns = [ path('admin\/', admin.site.urls), path('', include('titanic.urls')),\n]\n<\/pre>\n<p>Let\u2019s now configure the URLs for the app. Create a <code>urls.py<\/code> in the app folder.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from django.urls import path\nfrom .views import home, result urlpatterns = [ path('', home, name='home'), path('result\/', result, name='result'),\n]\n<\/pre>\n<p>Let\u2019s create another file in the app folder named <code>predict.py<\/code>. This is where we will use the pickled files to make predictions.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import pickle def getPrediction(pclass, sex, age, sibsp, parch, fare, C, Q, S): model = pickle.load(open('titanic.pkl', 'rb')) scaled = pickle.load(open('scaler.pkl', 'rb')) transform = scaled.transform([[pclass, sex, age, sibsp, parch, fare, C, Q, S]]) prediction = model.predict(transform) return 'Not Survived' if prediction == 0 else 'Survived' if prediction == 1 else 'error'\n<\/pre>\n<p>The function contains the exact number of features used to train the model. <\/p>\n<p>Notice we first transform the values the user will input on the web page. Since the trained model was transformed, we have to do the same to any values the user enters. Finally, we return the results based on the prediction.<\/p>\n<p>Alright, let\u2019s head over to the <code>views.py<\/code> file in the app folder.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from django.shortcuts import render\nfrom .prediction import getPrediction # Create your views here.\ndef home(request): return render(request, 'home.html') def result(request): pclass = int(request.GET['pclass']) sex = int(request.GET['sex']) age = int(request.GET['age']) sibsp = int(request.GET['sibsp']) parch = int(request.GET['parch']) fare = int(request.GET['fare']) embC = int(request.GET['embC']) embQ = int(request.GET['embQ']) embS = int(request.GET['embS']) result = getPrediction(pclass, sex, age, sibsp, parch, fare, embC, embQ, embS) return render(request, 'result.html', {'result': result})\n<\/pre>\n<p>The <code>home()<\/code> function simply renders the <code>home.html<\/code> which contains the form where our users will input some details. Then the <code>result()<\/code> function will get those details, make predictions, and renders the prediction result. <\/p>\n<p>Notice that we made sure every detail corresponds to the features used in training the model.<\/p>\n<p>The final step is templates. Create a folder bearing the name. Make sure you are doing so in the current directory. Then register it in the <code>settings.py<\/code> file.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], # add these 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, },\n]\n<\/pre>\n<p>Don\u2019t forget to import the required module. Inside the templates folder, create a <code>home.html<\/code> file.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!DOCTYPE html>\n&lt;html lang=\"en\" dir=\"ltr\"> &lt;head> &lt;meta charset=\"utf-8\"> &lt;title>Home&lt;\/title> &lt;\/head> &lt;body> &lt;h1 style= \u201ccolor:blue\u201d>Titanic Survival Prediction&lt;\/h1> &lt;form action=\"{% url 'result' %}\"> {% csrf_token %} &lt;p>Passenger Class:&lt;\/p> &lt;input type=\"text\" name=\"pclass\"> &lt;br> &lt;p>Sex:&lt;\/p> &lt;input type=\"text\" name=\"sex\"> &lt;br> &lt;p>Age:&lt;\/p> &lt;input type=\"text\" name=\"age\"> &lt;br> &lt;p>Sibsp:&lt;\/p> &lt;input type=\"text\" name=\"sibsp\"> &lt;br> &lt;p>Parch:&lt;\/p> &lt;input type=\"text\" name=\"parch\"> &lt;br> &lt;p>Fare:&lt;\/p> &lt;input type=\"text\" name=\"fare\"> &lt;br> &lt;p>Embark Category C:&lt;\/p> &lt;input type=\"text\" name=\"embC\"> &lt;br> &lt;p>Embark Category Q:&lt;\/p> &lt;input type=\"text\" name=\"embQ\"> &lt;br> &lt;p>Embark Category S:&lt;\/p> &lt;input type=\"text\" name=\"embS\"> &lt;br> &lt;input type=\"submit\" value='Predict'> &lt;\/form> &lt;\/body>\n&lt;\/html>\n<\/pre>\n<p>This syntax <code>\"{% url 'result' %}\"<\/code> is Django templating language. It\u2019s a link to the <code>result.html<\/code>. Remember the name argument in the <code>path()<\/code> function in <code>urls.py<\/code>? That is another way to refer to the <code>result.html<\/code> URL. The <code>csrf_token<\/code> is for security reasons. It\u2019s mandatory when a form is created.<\/p>\n<p>Can you now see it\u2019s from this form we get those names in the <code>result()<\/code> function? It is here that the data will be collected and sent to the <code>result()<\/code> function which processes the data, makes predictions, and displays the result in the <code>result.html<\/code>.<\/p>\n<p>We now create the <code>result.html<\/code> file in the templates folder.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!DOCTYPE html>\n&lt;html lang=\"en\" dir=\"ltr\"> &lt;head> &lt;meta charset=\"utf-8\"> &lt;title>Result&lt;\/title> &lt;\/head> &lt;body> &lt;h1 style=\u201ccolor:blue\u201d>Prediction&lt;\/h1> &lt;p>Verdict: {{ result }} &lt;\/p> &lt;\/body>\n&lt;\/html>\n<\/pre>\n<p>It\u2019s very simple. The <code>{{ result }}<\/code> is a variable that will be rendered to this web page. Go back to your <code>result()<\/code> function to recall if you have forgotten.<\/p>\n<p>That\u2019s it. We are done. Thanks for staying with me so far in this tutorial. Let\u2019s check what we have done. Run the local server.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"708\" height=\"398\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-348.png\" alt=\"\" class=\"wp-image-1242444\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-348.png 708w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-348-300x169.png 300w\" sizes=\"auto, (max-width: 708px) 100vw, 708px\" \/><\/figure>\n<\/div>\n<p>That is the home page. Everything in the form is displayed. Enter details and make predictions. Remember, only numbers will be in the form. If you are lost, check the dataset using Pandas.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"708\" height=\"398\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-349.png\" alt=\"\" class=\"wp-image-1242445\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-349.png 708w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/03\/image-349-300x169.png 300w\" sizes=\"auto, (max-width: 708px) 100vw, 708px\" \/><\/figure>\n<\/div>\n<p>If you encounter an error saying, <code><em>\u201cNo such file or directory: 'titanic.pkl'\u201d<\/em><\/code>, you may have to manually run the <code>model.py<\/code> to generate the file.<\/p>\n<p class=\"has-base-background-color has-background\"><img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f4a1.png\" alt=\"\ud83d\udca1\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <strong>Recommended<\/strong>: <a href=\"https:\/\/blog.finxter.com\/pandas-quickstart\/\" data-type=\"post\" data-id=\"16511\" target=\"_blank\" rel=\"noreferrer noopener\">5 Minutes to Pandas<\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>Congratulations!! You are not only a data scientist but also a <strong><a href=\"https:\/\/blog.finxter.com\/django-developer-income-and-opportunity\/\" data-type=\"post\" data-id=\"248182\" target=\"_blank\" rel=\"noreferrer noopener\">Django developer<\/a><\/strong>. <\/p>\n<p>In this tutorial, we performed <strong>Machine Learning using Logistic Regression<\/strong>. <\/p>\n<p>We demonstrated how to implement it using Django. <\/p>\n<p class=\"has-base-background-color has-background\"><img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f4bb.png\" alt=\"\ud83d\udcbb\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <strong>Exercise<\/strong>: As an assignment, can you use what you have learned to make predictions on the iris dataset, the hello world of data science? Give it a try using Django. <\/p>\n<p>You are welcome. <img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f4aa.png\" alt=\"\ud83d\udcaa\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>5\/5 &#8211; (1 vote) Deploying a Machine Learning model as a web application makes it easy for others with little or no programming experience to use it. In previous tutorials, where I explained how I created a house price prediction app and a loan eligibility app, we made use of Streamlit. Streamlit is easy to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[857],"tags":[73,468,528],"class_list":["post-132691","post","type-post","status-publish","format-standard","hentry","category-python-tut","tag-programming","tag-python","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/132691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=132691"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/132691\/revisions"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=132691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=132691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=132691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}