Skip to main content

Retrieve address suggestions from Geosupport

Project description

geosupport-suggest

Retrieve address suggestions from Geosupport using python-geosupport and a single input address.

Python 3.8+ Documentation Status PyPI version

Features

  • Thread-safe memory caching for improved performance
  • Parallel processing of address queries
  • GeoJSON export of geocoding results
  • Address normalization with consistent formatting
  • Borough code validation
  • Rate limiting for API protection
  • Context manager support
  • Batch address processing

Documentation

Full documentation is available at geosupport-suggest.readthedocs.io.

Install

$ pip install geosupport-suggest

or clone this repo, cd into it and

$ pip install .

Quick Start

from geosupport import Geosupport
from suggest import GeosupportSuggest

# create a Geosupport object
g = Geosupport()

# create a GeosupportSuggest object using Geosupport
s = GeosupportSuggest(g)

# Get suggestions
results = s.suggestions('100 Gold')

# Print formatted addresses
for result in results:
    print(s.format_address(result))

Advanced Usage

Caching for improved performance:

# Enable caching
s = GeosupportSuggest(g, use_cache=True)

# First call makes API request
results1 = s.suggestions('100 Gold St')

# Second call uses cache
results2 = s.suggestions('100 Gold St')  # Much faster

Convert results to GeoJSON:

# Get address suggestions
results = s.suggestions('350 5th Ave')  # Empire State Building

# Convert to GeoJSON for mapping
geojson = s.to_geojson(results)

Process multiple addresses:

addresses = [
    '100 Gold St',
    '350 5th Ave',
    {'address': '1 Police Plaza', 'borough_code': 1}  # With borough code
]

# Process all addresses (with parallel execution)
batch_results = s.suggestions_batch(addresses, parallel=True)

Contribute

Issues and PRs welcome. See Contributing for details.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geosupport_suggest-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geosupport_suggest-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file geosupport_suggest-0.1.0.tar.gz.

File metadata

  • Download URL: geosupport_suggest-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for geosupport_suggest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 de4cd0300e1b00387601409a90f2e9726bdc0f6e36bf68505e596fff705b98cd
MD5 ffcc22a4f0a9d3ae0828d479e1c52823
BLAKE2b-256 7b3c959bab1f281c19304ff46936fbbbde20021a08f2b63f28f841cc126148eb

See more details on using hashes here.

File details

Details for the file geosupport_suggest-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for geosupport_suggest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8678e2607bee08ad0e276f0f7b89cf991c3575cf1f154a00ed7764926912f384
MD5 3d9a590418b9ac4e8a92eaebe64ec062
BLAKE2b-256 6f6f3f53dc592be83f6d12543106a5c65af107f33ef125d6cc17a1f304368d6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page