[PYTHON] Try to create a Qiita article with REST API [Environmental preparation]

It is a memorandum of setting.

background

Create an article by hitting Qiita's REST API in Python.

environment

Windows10 Python 3.8.1 External library: requests Visual Studio Code 1.42.0

Environmental preparation

"Installing Python" takes a long time It took me half a day for some reason. If you go fast, I think it will be finished within an hour.

1. Install Python

I installed both 2 and 3 series. To actually execute the code, use the latest version of 3 series. (The 2nd system is because the Python reference book used the 2nd system.)

Reference article: Install with Chocolatey so that Python 2.7 and Python 3.8 can coexist on Windows

2020-02-09 12:00:03,908 7028 [WARN ] - Environment Vars (like PATH) have changed. Close/reopen your shell to see the changes (or in powershell/cmd.exe just type refreshenv).

2. Install Visual Studio Code

Reference article: Installation and Japanese localization of Visual Studio Code

Install the extension as well. -Python for VS Code Extensions that point out syntax mistakes -Python Extended Extensions that complement your code -Python Indent Extension that formats indentation

3. Settings for switching between 2 and 3 Python

Place the Visual Studio Code configuration files in each folder. -Folder of 2 system execution environment ・ Folder of 3 system execution environment

Reference article: Switch Python execution environment used for each Workspace with VS Code

  1. Install the requests library on 3rd Python

C:\WINDOWS\system32>py -3 -m pip install requests

Reference article: How to use Python's package management system pip

Recommended Posts

Try to create a Qiita article with REST API [Environmental preparation]
Create a REST API to operate dynamodb with the Django REST Framework
[First API] Try to get Qiita articles with Python
Try to dynamically create a Checkbutton with Python's Tkinter
A story about adding a REST API to a daemon made with Python
Try to create a python environment with Visual Studio Code & WSL
How to create a serverless machine learning API with AWS Lambda
Try logging in to qiita with Python
I tried to create a linebot (preparation)
[Cloudian # 3] Try to create a new object storage bucket with Python (boto3)
Try to draw a life curve with python
Let's create a REST API using SpringBoot + MongoDB
How to get article data using Qiita API
Steps to create a Twitter bot with python
Try to create a new command on linux
How to create a multi-platform app with kivy
Try to beautify with Talking Head Anime from a Single Image [python preparation]
Try to create a Todo management site using WebSocket with Django (Swamp Dragon)
I want to create an API that returns a model with a recursive relationship in the Django REST Framework
Create a Todo app with Django REST Framework + Angular
I tried to create a table only with Django
Try to make a command standby tool with python
Try to create a battle record table with matplotlib from the data of "Schedule-kun"
How to create a submenu with the [Blender] plugin
Scraping your Qiita articles to create a word cloud
Create a Todo app with the Django REST framework
Try to make RESTful API with MVC using Flask 1.0.2
[GCP] Try a sample to authenticate users with Firebase
Create a tweet heatmap with the Google Maps API
Create a pseudo REST API server using GitHub Pages
A sample to try Factorization Machines quickly with fastFM
I want to manually create a legend with matplotlib
Try to create a waveform (audio spectrum) that moves according to the sound with python
[Python] Get user information and article information with Qiita API
Upload to a shared drive with Google Drive API V3
A script that makes it easy to create rich menus with the LINE Messaging API
[Go language] Try to create a uselessly multi-threaded line counter
Try to build a deep learning / neural network with scratch
I tried to automatically create a report with Markov chain
The first API to make with python Djnago REST framework
Create a Mastodon bot with a function to automatically reply with Python
Probably the easiest way to create a pdf with Python3
Try to bring up a subwindow with PyQt5 and Python
Tornado-Let's create a Web API that easily returns JSON with JSON
Create a web API that can deliver images with Django
Create a message corresponding to localization with python translation string
(For beginners) Try creating a simple web API with Django
Create a social integration API for smartphone apps with Django
I tried to create an article in Wiki.js with SQLAlchemy
Create an API with Django
Try programming with a shell!
Create a (simple) REST server
Create a homepage with django
Create a heatmap with pyqtgraph
Try to select a language
Qiita API Oauth with Django
I tried to easily create a high-precision 3D image with one photo [2]. (Try processing depth with numpy)
Operate Jupyter with REST API to extract and save Python code
[C language] [Linux] Try to create a simple Linux command * Just add! !!
Create an alias for Route53 to CloudFront with the AWS API
I wanted to create a smart presentation with Jupyter Notebook + nbpresent