Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 1.2 How to use sockets in Python
- rite **a program which reads the address of a WWW site** (e.g., pythoninstitute.org) using the standar... oot document** (the main HTML document of the WWW site) of the specified site; * the program **outputs the document** to the screen; * the program **u... t will contain the requested root document of the site) - **close the socket** (end the connection)
- 1.3 JSON – our new friend
- opment is in fact based on TLA. What is TLA? It's simple – it's a Three-Letter Acronym. Close your eye... fferent types, including other objects) or even a single value in a way that can survive network trans... m conversions. JSON solves the problem using two simple tricks: * it uses **UTF-8 coded text** – t... able) and comprehensible by humans; * it uses a simple and not very expanded **format** (we can call
- 1.6 Making life easier with the requests module
- ren't able to avoid them) and we also need a tool simpler than the ''socket'' module to talk with the ... ckage manager) you should see a short help screen similar to the one presented here: {{ :info:cursos:p... response. As you can see, the code is extremely **simple and compact** – we don't need to cope with a ... works as expected, you will see a very short and simple result:<code>200</code> As the HTTP protocol
- 1.7 Four magic letters: CRUD
- base (or the service) may vary, e.g., it may be a simple relational database residing in a single file, or on the contrary, a huge, distributed cloud of c... HTTP method. Now we’re ready to carry out some simple but instructive experiments with JSON. We’ll ... ean value; * the initial file contains data for six cars – don't be surprised if the server modifies
- 1.1 Python Professional Course Series: RESTful APIs
- ferring the states enables you to achieve results similar to those caused by method invocations. **R... ograms working within one operating system (i.e., simultaneously present in the same computer system) ... TCP/IP protocol stack. Its functionality is very simple - it is able to **send a packet of data (a da... .e., their roles and routines are different. Both sides of the communication are aware that the other
- 1.5 What is XML and why do we prefer to use JSON?
- or nearly the same purpose. Take a look – it's a simple sample XML document: <code xml><?xml version ... XML uses **plain text**, and that's what makes it similar to JSON, but we should note that the similarities end at this point. Note the two phrases built... > <!--</code> and ends with: <code xml>--></code> Simple, isn't it? Of course, a comment, like any ot
- 1.4 Talking to JSON in Python
- the function's name means string. There is a very similar function with the name deprived of this suff... so don't expect miracles. Let’s start with some simple snippets. The first of our samples takes a n... arrays. Let’s check a **dictionary**. Here’s a simple test: <code python> import json my_dict = {'... ions. As you can see, Python uses a small set of simple rules to build JSON messages from its native
- 2.1 Python Professional Course Series: Lab & Assessment
- . Are you ready? == Lab 1 We want you to write a simple CLI (Command Line Interface) tool which can b... to be diagnosed (the diagnosis will be extremely simple, we just want to know if the server is dead o... ing that the tool is placed in a source file name sitechecker.py, here are some real-use cases: {{ :in