Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 1.7 Four magic letters: CRUD
- n-server --watch cars.json</code> **Note (very important)** – the fact that the ''json-server'' serves... but will grow soon – we promise: <code python> import requests try: reply = requests.get("http://... print("Server error") </code> * line 1: we import the ''requests'' module; * line 3: we’re going... the address specified as localhost, listening at port number 3000; * line 5: have we succeeded? *
- 1.6 Making life easier with the requests module
- -vxx.yy.z-x86.msi'') from the LTS //(Long Time Support//) branch; accept all the default settings and l... calhost'') and you want the client to go to the **port number 3000** (json-server's default port). You should see something like this: {{ :info:cursos:pue:... 'requests'' module. Take a look: <code python> import requests reply = requests.get('http://localhost
- 1.2 How to use sockets in Python
- hon-pcpp1:m4:pasted:20240108-104229.png }} === Importing a socket We are in need - we need a socket. H... we'll put at the top of our code: <code python> import socket </code> === Obtaining user input We also... it better. Let's ask him or her: <code python> import socket server_addr = input("What server do you ... for us only to the extent that it is able to transport HTTP traffic, and HTTP is interesting for us onl
- 1.4 Talking to JSON in Python
- that you knew it before we asked: <code python> import json </code> The first JSON module's power is t... – we don't expect anything more: <code python> import json electron = 1.602176620898E10−19 print(json... ame but with a string, like this: <code python> import json comics = '"The Meaning of Life" by Monty P... do you think about this example? <code python> import json my_list = [1, 2.34, True, "False", None, [
- 2.1 Python Professional Course Series: Lab & Assessment
- ver is dead or alive) * (optional) the server's port number (any absence of the argument means that the tool should use port 80) * use the HEAD method instead of GET — it ... 40119-094505.png }} === solution <code python> import sys import socket if len(sys.argv) not in [2, 3]: print("Improper number of arguments: at least
- 1.5 What is XML and why do we prefer to use JSON?
- nt to show you how it’s built and what the most important differences between XML and JSON are. It can ... t's start with the first line – it plays a very important role: <code xml><?xml version = "1.0" encodin... hat to expect next. The second line isn't very important – do you know why? <code xml><!-- cars.xml -... elf-defining**; it's easy but it lacks one very important feature – the parser is not able to check if
- 1.1 Python Professional Course Series: RESTful APIs
- t take this literally) which drives lots of contemporary computer systems, especially those which work ... an acronym. It comes from three words of equal importance: * **RE**presentational * **S**tate *... tandard was adopted by POSIX (a standard of contemporary Unix-class operating systems) as **POSIX socke... tem inside which the socked is located; * the **port number** (more often referred to as service numb
- 1.3 JSON – our new friend
- objects. The mechanism which solves it should be portable and platform independent. How can we meet s... **strings** may look familiar, but there is one important difference – **you must not use apostrophes**... ould be noted that both ways can recursively incorporate any of the two, e.g., a list may contain an ob... erty specifications separated by commas**. One important (and very surprising) thing should be stated