Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Retrieve address suggestions from Geosupport

Topics

Resources

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages