Libreria que te proporciona direcciones reales de Estados Unidos
Project description
GeoFaker
GeoFaker is a Python library designed to work with real-world addresses selected from public datasets, verified using geocoding services such as the Google Maps API. Its purpose is to provide authentic address data that resolves correctly when geocoded, making it ideal for testing, simulations, or demonstrations that require realistic locations without compromising personal information.
In addition to real addresses, GeoFaker also generates complementary random data such as names, phone numbers, email addresses, and other typical profile details—allowing you to create richer, more realistic datasets for development or testing environments involving fictitious but coherent personal information.
Installation
You can install GeoFaker using pip:
pip install GeoFaker
Usage
from GeoFaker import XMap
# Load new instance ./utils, defs....
def XmapNewInstance():
try:
XMap.LoadMap()
return {
"street": XMap.GetMap("address1"),
"city": XMap.GetMap("city"),
"state": XMap.GetMap("state"),
"stid": XMap.GetMap("StateCode"),
"zipp": XMap.GetMap("PostalCode"),
"num": XMap.GetMap("Phone"),
"usuario": XMap.GetMap("User"),
"password": XMap.GetMap("Pass"),
"mail": XMap.GetMap("Mail"),
"name": XMap.GetMap("Fname"),
"last": XMap.GetMap("Lname"),
}
except Exception as e:
print(f"Error loading XMap data: {e}")
return None
# Use in your proyect
try:
NewMap = XmapNewInstance()
street = NewMap['street']
city = NewMap['city']
stid = NewMap['stid']
zipp = NewMap['zipp']
state = NewMap['state']
num = NewMap['num']
usuario = NewMap['usuario']
password = NewMap['password']
mail = NewMap['mail']
name = NewMap['name']
last = NewMap['last']
except Exception as u:
print(f"Error getting Xmap data: {e}")
return None
Project Structure
GeoFaker/
__init__.py
Func.py
data/
usa.json
README.md
setup.py
Func.py: Main logic of theXMapclass.data/usa.json: US address dataset.setup.py: Installation script.README.md: This file.
Requirements
- Python >= 3.10
- names
- Json
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GeoFaker
GeoFaker es una librería de Python diseñada para trabajar con direcciones reales seleccionadas a partir de conjuntos de datos públicos, verificadas mediante servicios de geocodificación como la API de Google Maps. Su propósito es ofrecer datos de direcciones auténticas que se resuelven correctamente al ser geocodificadas, lo que resulta útil para pruebas, simulaciones o demostraciones que requieran ubicaciones verídicas sin comprometer datos personales.
Además de direcciones reales, GeoFaker también genera datos aleatorios complementarios como nombres, números de teléfono, direcciones de correo electrónico y otros detalles típicos de perfiles, permitiendo crear conjuntos de datos más completos y realistas para entornos de desarrollo o pruebas de sistemas que manejen información personal ficticia pero coherente.
Instalación
Puedes instalar GeoFaker usando pip:
pip install GeoFaker
Uso
from GeoFaker import XMap
# Cargar una nueva instancia ./utils, defs....
def XmapNewInstance():
try:
XMap.LoadMap()
return {
"street": XMap.GetMap("address1"),
"city": XMap.GetMap("city"),
"state": XMap.GetMap("state"),
"stid": XMap.GetMap("StateCode"),
"zipp": XMap.GetMap("PostalCode"),
"num": XMap.GetMap("Phone"),
"usuario": XMap.GetMap("User"),
"password": XMap.GetMap("Pass"),
"mail": XMap.GetMap("Mail"),
"name": XMap.GetMap("Fname"),
"last": XMap.GetMap("Lname"),
}
except Exception as e:
print(f"Error loading XMap data: {e}")
return None
# Uso en tu proyecto
try:
NewMap = XmapNewInstance()
street = NewMap['street']
city = NewMap['city']
stid = NewMap['stid']
zipp = NewMap['zipp']
state = NewMap['state']
num = NewMap['num']
usuario = NewMap['usuario']
password = NewMap['password']
mail = NewMap['mail']
name = NewMap['name']
last = NewMap['last']
except Exception as u:
print(f"Error getting Xmap data: {e}")
return None
Estructura del Proyecto
GeoFaker/
__init__.py
Func.py
data/
usa.json
README.md
setup.py
Func.py: Lógica principal de la claseXMap.data/usa.json: Dataset de direcciones de EE.UU.setup.py: Script de instalación.README.md: Este archivo.
Requisitos
- Python >= 3.10
- names
- Json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geofaker-1.1.tar.gz.
File metadata
- Download URL: geofaker-1.1.tar.gz
- Upload date:
- Size: 103.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d1253dcea82c0b4d2117437ce13019208fb622558739f438ea1150014526027
|
|
| MD5 |
3b1d3480d47263998bb98be0def5febe
|
|
| BLAKE2b-256 |
8b8c31669e9f401e4255530d18c15b5222f96e8dc097198e663c1759ef77264d
|
File details
Details for the file geofaker-1.1-py3-none-any.whl.
File metadata
- Download URL: geofaker-1.1-py3-none-any.whl
- Upload date:
- Size: 108.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17863385bc754d02bdf082dddfbbe98abd235ca0e3d565ef6970adff587d14d9
|
|
| MD5 |
c9ec3d389cca801700b5a66e8f6ea449
|
|
| BLAKE2b-256 |
e14e9572198a71ec66baaa555e304071188a667432e31fac2d915575e40ecded
|