Cerca

Heus ací els resultats de la cerca.

1.7 Four magic letters: CRUD
96 Resultats, Darrera modificació:
P method. == U means Update You update data inside a collection when you modify the contents of the ... ur cars.json is located and launch the server: <code bash>json-server --watch cars.json</code> **Note (very important)** – the fact that the ''json-serve... transmit JSON messages between the client (our code) and the server (''json-server''). The way the se
1.4 Talking to JSON in Python
71 Resultats, Darrera modificació:
d we're sure that you knew it before we asked: <code python> import json </code> The first JSON module's power is the ability to automatically **convert ... puts a number – we don't expect anything more: <code python> import json electron = 1.602176620898E10−19 print(json.dumps(electron)) </code> The code outputs: <code ; output> 16021766189.98
1.6 Making life easier with the requests module
70 Resultats, Darrera modificació:
ed ''json-server'', implemented on top of the ''Node.js'' environment. ''Node.js'' is – as Wikipedia claims – //an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser//. Don't be afraid – we’re going to encounter JavaScript again, but we aren't go
1.5 What is XML and why do we prefer to use JSON?
58 Resultats, Darrera modificació:
ke a look – it's a simple sample XML document: <code xml><?xml version = "1.0" encoding = "utf-8"?> <!... <brand>Aston Martin</brand> <model>Rapide</model> <production_year>2010</production_y... "GBP">32000</price> </car> </cars_for_sale></code> The document contains a part of an offer publis... e first line – it plays a very important role: <code xml><?xml version = "1.0" encoding = "utf-8"?></c
1.2 How to use sockets in Python
50 Resultats, Darrera modificació:
you? This is what we'll put at the top of our code: <code python> import socket </code> === Obtaining user input We also need **the name of the HTTP server** ... he user knows it better. Let's ask him or her: <code python> import socket server_addr = input("What
1.3 JSON – our new friend
40 Resultats, Darrera modificació:
tion As you can see, there’s a little riddle inside the name. It may be a bit disturbing, too, and so... lowing question – can we use Python's syntax to code and decode network messages in ''REST''? Yes, we can, but it won't be JSON. If you want your data to... of ''2.78''. This is how JSON comes to this: <code ruby> { "prop": 2.78 } </code> Simple? Absolutel
2.1 Python Professional Course Series: Lab & Assessment
12 Resultats, Darrera modificació:
ool prints an error message and returns an exit code equal to 1; * if there are two arguments in the... ool prints an error message and returns an exit code equal to 2; * if the tool experiences a timeout... essage is printed and 3 is returned as the exit code; * if the connection fails due to any other rea... r message appears and 4 is returned as the exit code; * if the connection succeeds, the very first l
1.1 Python Professional Course Series: RESTful APIs
6 Resultats, Darrera modificació:
he way in which **data or states are retained inside the system and presented to the users** (humans o... using a TCP/IP network (note: this doesn't preclude the use of INET sockets to communicate processes ... * the **IP address** of the computer system inside which the socked is located; * the **port numbe... s for both sides of the communication: * the side that initiates the connection (caller) is named *