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.
@NowWhat012 жыл бұрын
This was excellent. Thanks for sharing.
@scotter2 жыл бұрын
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.
@kwallaceccie2 жыл бұрын
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.
@fabrice98482 жыл бұрын
Thanks for this quality content.
@fabrice98482 жыл бұрын
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.
@Deepakpal-dq4ss2 жыл бұрын
How to generate token for restapi using python .when restapi is password protected
@MalamIbnMalam Жыл бұрын
You can use Djoser or some other Django tool to generate a token