Chapter 13: Python and Web Services Flashcards

1
Q

A contract between applications that defines the patterns of interaction between two application components.

A

API
Application Program Interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A built-in Python library used to parse XML data.

A

ElementTree

import xml.etree.ElementTree as ET

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Language-independent data-interchange format based on JavaScript objects.
Best for exchanging lists, dictionaries, or other internal information between programs, especially interactive web applications written in JavaScript

A

JSON
JavaScript Object Notation

import json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When an application is made of components connected across a network.

A

SOA
Service-Oriented Architecture

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Very structured language not concerned with formatting content. Format used for storing, sending and receiving data that is then formatted by HTML for display of document or webpage. User-definable tags.

A

XML
eXtensible Markup Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

XML opening and closing tag format

A

<element>
</element>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A branch of an XML tree that can have some text, some attributes, and other nested elements

A

element / node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

XML self-closing tag notation if element is empty (has no content)

A

< element / >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

XML example format

A

data = ‘’’

<person>
<name>Chuck</name>
<phone>
\+1 734 303 4456
</phone>
<email></email>
</person>

’’’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Method that converts XML string to XML tree

A

.fromstring()

tree = ET.fromstring(data)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

function to search XML tree and locate element that matches specified tag

A

find()

tree.find(‘name’).text
tree.find(‘email’).get(‘hide’) -prints hide attribute ‘yes’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

method to retrieve a Python list of subtrees that represent the node structures in the XML tree

A

.findall()

lst = stuff.findall(‘parent node/target nodes’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

JSON method to parse json string and extract list / dictionary

A

json.loads()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A unique identifier used to locate a resource on the internet. Includes a protocol (http) and a domain name that specifies its location on a computer network
aka web address

A

URL
Uniform Resource Locator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Language used by web browsers to interpret and compose text, images, and other material into visible or audible web pages.

A

HTML
Hypertext Markup Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Message sent from a web browser to a web server

A

HTTP request

17
Q

Application software that provides requests to the server for web documents and services. Receives information through HTTP protocol.
eg. Google, Chrome, FireFox, Edge, Safari

A

web browser

18
Q

A program which processes the network requests of the users and serves them with files that create web pages. This exchange takes place using Hypertext Transfer Protocol (HTTP)

A

web server

19
Q

A computer program or device that provides a service to another computer program and its user aka client

A

server

20
Q

A system that connects two or more computing devices for transmitting and sharing information.

A

computer network