Skip to main content

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 the XMap class.
  • 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 clase XMap.
  • 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

Metadata

Release files for geofaker 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geofaker 1.1
File Size Uploaded Provenance Actions
geofaker-1.1.tar.gz 103.4 kB Without provenance Details for geofaker-1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for geofaker 1.1
File Interpreter ABI Platform Actions
geofaker-1.1-py3-none-any.whl Python 3 none any Details for geofaker-1.1-py3-none-any.whl

Total release size: 212.2 kB

Release files / geofaker-1.1.tar.gz

Download URL geofaker-1.1.tar.gz
Size 103.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8d1253dcea82c0b4d2117437ce13019208fb622558739f438ea1150014526027
BLAKE2b-256 checksum
How to use checksums
8b8c31669e9f401e4255530d18c15b5222f96e8dc097198e663c1759ef77264d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.5

Release files / geofaker-1.1-py3-none-any.whl

Download URL geofaker-1.1-py3-none-any.whl
Size 108.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17863385bc754d02bdf082dddfbbe98abd235ca0e3d565ef6970adff587d14d9
BLAKE2b-256 checksum
How to use checksums
e14e9572198a71ec66baaa555e304071188a667432e31fac2d915575e40ecded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.5

Security for geofaker 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page