Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 1.7 Four magic letters: CRUD
- * each car is described by: * ''id'' – a unique item number; note – each item in the collection m... ll grow soon – we promise: <code python> import requests try: reply = requests.get("http://localhost:3000/cars") except requests.RequestException: print("Communication error"
- 1.6 Making life easier with the requests module
- = 1.6 Making life easier with the requests module We have reached the point where we can start the fina... ll enough equipped to start a discussion on the requests module – let's dive into it! The first program makes very basic use of the power of the ''requests'' module. Take a look: <code python> import requests reply = requests.get('http://localhost:3000')
- 1.2 How to use sockets in Python
- HTTP server** of a given address; - **send a request to the server** (the server wants to know what ... ve the server's response** (it will contain the requested root document of the site) - **close the so... conversation with the HTTP server consists of **requests (sent by the client) and responses (sent by the server)**. HTTP defines a set of acceptable requests - these are **the request methods or HTTP word
- 1.5 What is XML and why do we prefer to use JSON?
- FPI (Formal Public Identifier – a string which uniquely names the DTD on the scale of the universe) and... Let's dive into it. Try to answer the following question: how many cars can you buy here? <code xml> ... We hope that XML is clear now, but there is one question that has to be put here: **how do we process XML documents in Python?** The question (fortunately or not) has more than one answe
- 1.1 Python Professional Course Series: RESTful APIs
- inds of data using plain text?" It's a very good question. Probably the best question that can be put now. REST is focused on a very specific kind of data ... oesn't use handshakes, which has two serious consequences: * it is faster than TCP (due to fewer ove
- 1.3 JSON – our new friend
- It may be a bit disturbing, too, and some sudden questions may have appeared in your mind just now, e.... king such an assumption leads us to the following question – can we use Python's syntax to code and dec... t identify variables, so they don’t have to be unique. They don't have to start with a letter. They can
- 2.1 Python Professional Course Series: Lab & Assessment
- the server is working properly; the rest of the request remains the same as for GET. We also assume tha... is invalid or malformed - sorry.") exit(4) request = b"HEAD / HTTP/1.0\r\nHost: " + \ by... b"\r\nConnection:close\r\n\r\n" sock.send(request) answer = sock.recv(100).decode("utf8") sock.sh
- 1.4 Talking to JSON in Python
- e", null, ["a", 0]] </code> We want to ask you a question here – what will happen if we use a tuple in