geolocaltime-py
Accurately enriches location data with local time and time-of-day insights.
This modern Python module represents an idiomatic client accessing the Geolocaltime location services being hosted on Rapid API Hub.
Features
The geolocaltime API provides three main endpoints for geospatial time intelligence:
🌍 /enrich - Location Time Enrichment
Enriches locations with current local date and time values using standardized time zones. The local date and time value for each location are determined at the time of execution.
🔄 /convert - UTC to Local Time Conversion
Converts date and time values from UTC to local time for specified locations using WGS84 coordinate system.
🕐 /timeofday - Time of Day Classification
Classifies local time values into meaningful time-of-day categories like "last night", "morning", "noon", "afternoon", "evening" and "night". The classifier uses seasonal locations of the sun and moon for realistic classifications.
Key Capabilities
- Batch Processing: All endpoints support batch processing of up to 100 coordinates per request
- Automatic Chunking: Library automatically handles >100 coordinates by chunking requests
- WGS84 Compatibility: Uses WGS84 spatial reference system for precision and global compatibility
- Comprehensive Validation: Validates coordinate bounds and input consistency
- Error Handling: Robust error handling with descriptive messages
Installation
pip install geolocaltime
Quick Start
from georapid.client import GeoRapidClient
from georapid.factory import EnvironmentClientFactory
from geolocaltime.services import enrich, convert, time_of_day
from geolocaltime.types import OutputType
# Set up client (requires RAPIDAPI_KEY environment variable)
host = 'geolocaltime.p.rapidapi.com'
client: GeoRapidClient = EnvironmentClientFactory.create_client_with_host(host)
# Define coordinates
latitudes = [50.0088, 39.437, 66.0557]
longitudes = [8.2756, -31.542, -23.7033]
utc_times = ['2024-10-19T09:18:42.542819'] * 3
# Enrich locations with current local time
enriched = enrich(client, latitudes, longitudes, OutputType.LOCAL)
# Convert UTC times to local times
converted = convert(client, latitudes, longitudes, utc_times, OutputType.LOCAL)
# Classify time of day
local_times = ['2025-06-09T21:58:01.010457+01:00', '2025-06-09T19:58:01.010457-01:00', '2025-06-09T20:58:01.010457+00:00']
time_classifications = time_of_day(client, latitudes, longitudes, local_times)
Documentation
For detailed documentation, visit geolocaltime.readthedocs.io.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Release files for geolocaltime 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| geolocaltime-0.1.tar.gz | 17.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| geolocaltime-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.5 kB
Release files / geolocaltime-0.1.tar.gz
| Download URL | geolocaltime-0.1.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88d4de7465c140b54eace8b92875a3a5707ca4ee449940c966a6b3389fa10887
|
|
BLAKE2b-256 checksum How to use checksums |
689815d61b5bbdb099d54aa425a8c9ad5efd9548b8007cea3611cca21eb5d45e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.15
|
Release files / geolocaltime-0.1-py3-none-any.whl
| Download URL | geolocaltime-0.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db36ba011868274160572d47fa03f6ac2e483933f267b10659aa929c24262bbd
|
|
BLAKE2b-256 checksum How to use checksums |
815767e4990f8169e5bc3a5b03012f6760fe3d8c7a5fb2ee84cf241b839b0ff0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.15
|