Skip to content

Commit 1e0edda

Browse files
authored
Merge pull request #24 from josemoracard/jose3-exercises
todos los ejercicios, .gitignore, learn.json
2 parents 1b12a8e + 0bb603d commit 1e0edda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+599
-354
lines changed

β€Ž.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
!/exercises
1616
!/exercises/*
17+
exercises/*/__pycache__/
1718

1819
!/.learn
1920
/.learn/**

β€Žexercises/00-hello-world/README.es.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

β€Žexercises/00-hello-world/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

β€Žexercises/00-welcome/README.es.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# `00` Welcome to Python API Requests!
2+
3+
Python Requests es una herramienta potente y ampliamente utilizada para interactuar con APIs y realizar solicitudes HTTP en aplicaciones Python. Simplifica el proceso de enviar solicitudes HTTP y manejar respuestas, convirtiΓ©ndose en una herramienta favorita entre los desarrolladores para integrarse con servicios web y obtener datos de APIs.
4+
5+
Con Python Requests, puedes hacer fΓ‘cilmente solicitudes GET, POST, PUT, DELETE para comunicarte con servidores web y obtener datos. Admite el manejo de autenticaciΓ³n, encabezados, cookies y sesiones, permitiendo una integraciΓ³n sin problemas con diversos servicios web.
6+
7+
AquΓ­ aprenderΓ‘s:
8+
9+
1. ΒΏCΓ³mo hacer solicitudes GET?
10+
2. ΒΏCΓ³mo obtener propiedades de datos e informaciΓ³n?
11+
3. ΒΏCΓ³mo configurar request headers?
12+
4. ΒΏCΓ³mo configurar request content-type?
13+
5. ΒΏCΓ³mo hacer solicitudes POST?
14+
15+
Haga clic en el botΓ³n `Next β†’` en la esquina superior derecha para continuar.

β€Žexercises/00-welcome/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# `00` Welcome to Python API Requests!
2+
3+
Python Requests is a powerful and widely-used package for interacting with APIs and performing HTTP requests in Python applications. It simplifies the process of sending HTTP requests and handling responses, making it a favorite tool among developers for integrating with web services and fetching data from APIs.
4+
5+
With Python Requests, you can easily make GET, POST, PUT, DELETE, to communicate with web servers and retrieve data. It supports handling authentication, headers, cookies, and sessions, allowing for seamless integration with various web services.
6+
7+
Here you will learn:
8+
9+
1. How to do GET requests?
10+
2. How to fetch data properties and information?
11+
3. How to set request headers?
12+
4. How to set request content-type?
13+
5. How to do POST requests?
14+
15+
Click the `Next β†’` button on the top right to continue.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# `01` Creating a Request
2+
3+
Python tiene integrado un [paquete de solicitudes (*requests package*)](https://requests.readthedocs.io/en/master/) eso permite a los desarrolladores crear solicitudes HTTP con bastante facilidad.
4+
5+
AsΓ­ es como en Python hacemos una solicitud HTTP GET:
6+
7+
```python
8+
response = requests.get('<destination url>')
9+
print(response.status_code)
10+
```
11+
12+
## πŸ“ Instrucciones:
13+
14+
Actualiza la variable `url` para que solicite a esta direcciΓ³n:
15+
16+
```bash
17+
https://assets.breatheco.de/apis/fake/sample/hello.php
18+
```
19+
20+
> Nota: La consola debe imprimir un cΓ³digo de estado 200.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 01 Creating a request
1+
# `01` Creating a Request
22

33
Python has a [requests package](https://requests.readthedocs.io/en/master/) that allows developers to create HTTP request pretty easily.
44

@@ -9,12 +9,12 @@ response = requests.get('<destination url>')
99
print(response.status_code)
1010
```
1111

12-
# πŸ“ Instructions
12+
## πŸ“ Instructions:
1313

14-
Change the variable url to make it request to:
14+
Update the `url` variable to make it request to this address:
1515

16-
```bash
16+
```text
1717
https://assets.breatheco.de/apis/fake/sample/hello.php
1818
```
1919

20-
Note: The console should print a 200 status code.
20+
> Note: The console should print a 200 status code.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import requests
2+
3+
url = "https://assets.breatheco.de/apis/fake/sample/hello.php"
4+
response = requests.get(url)
5+
6+
print("The response status is: "+str(response.status_code))

0 commit comments

Comments
Β (0)