One note about response.json() method. It doesn’t return json. The telltale sign is the single quotes in the returned value. (valid json uses double quotes). The json() requests method is a json decoder method which expects a json string and returns a python data type like dict or list.
Thanks for this! I really like your style, taking it step by step, speaking clearly, etc. I'm somewhat new to Python, having only built like 6 or 7 applications. Not super familiar with industry-standard buzzwords. As I job hunt, I see a lot of "RESTful API" as a skill desired. Everything you show here is the exact way I've accessed APIs in a couple projects and I wonder if that means "RESTful" is something I can claim knowledge of? I had an assumption it was somehow "more" than this.
REST is really just a set of rules for how we interact with web services. Any API interaction that conforms to these rules is referred to as a RESTful API. So, it's very likely you have used RESTful APIs, especially if you're familiar with using HTTP requests to access or alter data.
I think the VScode equivalent to atom-beautify might be JSON Tools. Just remember that json requires double-quotes for strings, whereas python can use single quotes.
One note about response.json() method. It doesn’t return json. The telltale sign is the single quotes in the returned value. (valid json uses double quotes). The json() requests method is a json decoder method which expects a json string and returns a python data type like dict or list.
This was excellent. Thanks for sharing.
Thanks for this! I really like your style, taking it step by step, speaking clearly, etc. I'm somewhat new to Python, having only built like 6 or 7 applications. Not super familiar with industry-standard buzzwords. As I job hunt, I see a lot of "RESTful API" as a skill desired. Everything you show here is the exact way I've accessed APIs in a couple projects and I wonder if that means "RESTful" is something I can claim knowledge of? I had an assumption it was somehow "more" than this.
REST is really just a set of rules for how we interact with web services. Any API interaction that conforms to these rules is referred to as a RESTful API. So, it's very likely you have used RESTful APIs, especially if you're familiar with using HTTP requests to access or alter data.
Thanks for this quality content.
I think the VScode equivalent to atom-beautify might be JSON Tools.
Just remember that json requires double-quotes for strings, whereas python can use single quotes.
How to generate token for restapi using python .when restapi is password protected
You can use Djoser or some other Django tool to generate a token