Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 1.7 Four magic letters: CRUD
- your cars.json is located and launch the server: <code bash>json-server --watch cars.json</code> **Note (very important)** – the fact that the ''json-server'' serves the data initially encoded as JSON has absolutely nothing to do with the fa... ll transmit JSON messages between the client (our code) and the server (''json-server''). The way the se
- 1.4 Talking to JSON in Python
- and 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 Py... utputs 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
- ipt run-time environment that executes JavaScript code outside of a browser//. Don't be afraid – we’re g... in, but we aren't going to force you to write any code in it. It’ll act as a **black box** for us, and w... overed, so when you issue the following command: <code bash>npm</code> (which is short for node.js package manager) you should see a short help screen simila
- 1.2 How to use sockets in Python
- ll 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** we... The user knows it better. Let's ask him or her: <code python> import socket server_addr = input("What
- 1.5 What is XML and why do we prefer to use JSON?
- Take a look – it's a simple sample XML document: <code xml><?xml version = "1.0" encoding = "utf-8"?> <!... y="GBP">32000</price> </car> </cars_for_sale></code> The document contains a part of an offer publis... the first line – it plays a very important role: <code xml><?xml version = "1.0" encoding = "utf-8"?></code> First of all, it **declares that the document con
- 1.3 JSON – our new friend
- lem using two simple tricks: * it uses **UTF-8 coded text** – this means that no machine/platform-dep... ollowing 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 b... e 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
- server availability checker; * a Vehicle data decoder/encoder; * a Stock Exchange viewer; * a Vintage Cars database. You will also have a chance to do ... tool prints an error message and returns an exit code equal to 1; * if there are two arguments in the... tool prints an error message and returns an exit code equal to 2; * if the tool experiences a timeout