October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

Async Redis GEO in Python with wredis: Nearby Searches and Latency Limits

Redis GEO supports radius and rectangular proximity searches. See the GEOSEARCH options, the wredis API version mismatch, and what its complexity does—and does not—prove about latency.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Redis GEO can find indexed locations within a radius or an axis-aligned box, and Python applications can call it from asynchronous code. But neither Redis’s complexity notation nor the available wredis examples establish that a lookup will finish in under a millisecond. Verify the installed wredis version and its API before using a wrapper example in production.

What Redis GEO does

Redis GEO stores named members with longitude and latitude in a geospatial index. You can search those points by proximity—for example, to identify nearby drivers, fulfillment hubs, or local stores. Redis describes GEO as a basic point-search feature; applications needing richer geospatial indexing and query capabilities can consider Redis Search instead.

As an Amazon Associate I earn from qualifying purchases.

The core read operation is GEOSEARCH, available since Redis 6.2.0. Redis describes it as querying a geospatial index for members inside an area of a box or a circle.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How GEOSEARCH shapes a query

A query identifies the index key and an origin, then specifies either a radius or a rectangular width and height. The origin can be an existing member or explicit coordinates. When supplying coordinates, use longitude first and latitude second.

Choice What it controls
Origin An existing indexed member or a longitude/latitude pair.
Shape A circle with a radius, or an axis-aligned rectangle with a width and height.
Units Distance and dimensions can use meters (m), kilometers (km), feet (ft), or miles (mi).
Ordering Optional ascending or descending ordering by distance.
Count An optional result limit; ANY can be used with the count option when any matching results are acceptable.
Returned fields By default, results contain member names. Add WITHCOORD, WITHDIST, and/or WITHHASH to include coordinates, distance, and/or geohash information.

A box is aligned to the coordinate axes; it is not an arbitrary polygon. Keep units consistent between the requested shape and any distance values you present to users.

Index locations, then search them

The Redis workflow is to add named points with GEOADD and query the same key with GEOSEARCH. A Python-oriented example and further command details are in Redis’s geospatial guide. The essential command shape is:

GEOADD places  -73.9857 40.7484 store_1
GEOSEARCH places FROMLONLAT -73.99 40.75 BYRADIUS 2 km ASC WITHDIST

This example indexes one illustrative point and searches within two kilometers of a supplied longitude/latitude origin, returning distances in the selected unit. In application code, ensure the key, member naming, coordinate order, and units match your data conventions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the wredis API before using an example

The package listing and the article matching this topic show different interfaces, so their examples should not be combined as though they described one verified release. The wredis PyPI listing advertises synchronous and asyncio APIs, requires Python 3.9 or later, and lists a GEO module. Its documented GEO names include RedisGeoManager and methods such as add_location, distance, geo_radius, get_location, exist, and delete_geo. The listing reports version 1.0.3, uploaded on 2026-08-14.

By contrast, the matching DEV Community article imports AsyncRedisGeoManager from wredis.async_api, awaits add_location, and then calls search_nearby with coordinates, radius, and unit. That article is an example of a claimed interface, not confirmation that it is available in the listed package release.

Before adopting either pattern, inspect the documentation or source for the exact wredis version installed in your environment. Confirm the import path, class, method signatures, and expected return shape. Do not assume the article’s asynchronous names work with the API shown in the package listing.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What Redis’s complexity says—and does not say—about latency

Redis documents GEOSEARCH complexity as O(N+log(M)), where N relates to members in the grid-aligned bounding-box area around the query shape and M to members inside the shape. The command is also categorized @slow in Redis command metadata. This complexity description is not an end-to-end timing result or a guarantee of sub-millisecond responses.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The matching article uses the phrase “sub-millisecond” for proximity lookups but does not provide a benchmark method or measurements. It does not specify the dataset size, Redis version, machine, network placement, concurrency, latency percentile, or raw results. Treat the figure as unverified, not as an expected performance level.

Async I/O changes how an application can schedule work while waiting for Redis; it does not by itself make the Redis command execute faster. To make a defensible latency claim for your own service, benchmark the actual deployment and report the Redis version, data volume, query shape, network conditions, concurrency, and measured latency distribution.

When basic GEO is enough—and when to consider Redis Search

Choose the basic GEO data type when the need is straightforward lookup of nearby indexed points using circular or rectangular areas. The Redis geospatial guide distinguishes this from Redis Search, which offers richer geospatial formats and query options. The guide states that GEOSHAPE fields require Redis 7.2.0 or later. Select based on required query capabilities, deployed Redis version, and operational constraints; the available sources do not establish a latency or cost advantage for either approach.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.