Comments (3)
import requests
def obtener_direccion_falsa():
url = "https://fakerapi.it/api/v1/addresses?_quantity=1"
respuesta = requests.get(url)
datos = respuesta.json()
direccion = datos['data'][0]
return direccion
direccion_falsa = obtener_direccion_falsa()
print("Dirección falsa generada:")
print("Calle:", direccion_falsa['address'])
print("Ciudad:", direccion_falsa['city'])
print("Código postal:", direccion_falsa['zip'])
print("País:", direccion_falsa['country'])
from public-apis.
import requests
url = "https://fakerapi.it/api/v1/persons"
params = {
"_quantity": 1,
"_gender": "male",
"_birthday_start": "2005-01-01"
}
response = requests.get(url, params=params)
if response.status_code == 200:
data = response.json()
person = data['data'][0]
print("Información de la persona:")
print("Nombre:", person['firstname'], person['lastname'])
print("Género:", person['gender'])
print("Fecha de nacimiento:", person['birthday'])
print("Dirección:", person['address'])
print("Email:", person['email'])
print("Teléfono:", person['phone_number'])
else:
print("Error al obtener los datos de la API.")
from public-apis.
import requests
def obtener_lugar():
url = "https://fakerapi.it/api/v1/places?_quantity=1"
response = requests.get(url)
data = response.json()
lugar = data['data'][0]
return lugar
if name == "main":
lugar = obtener_lugar()
print("Lugar generado aleatoriamente:")
print("Nombre:", lugar['name'])
print("Dirección:", lugar['address'])
print("Ciudad:", lugar['city'])
print("Estado:", lugar['state'])
print("País:", lugar['country'])
print("Código postal:", lugar['zipcode'])
from public-apis.
Related Issues (20)
- A
- Hi community
- 新しいlssue
- Why is `client_secret` compulsory int he following requests ? HOT 1
- public
- 新しい
- public 新しい
- و
- Apis
- maru
- public
- AAA
- Feature Request: Add OpenAPI spec HOT 3
- NASA API website HOT 3
- ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=WalletConnect_WalletConnectSwiftV2&pullRequest=1348) **Quality Gate passed**
- package.json HOT 1
- module.exports = { trailingSlash: true, }
- **Describe the bug**
- ice cream api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from public-apis.