https://github.com/ishiland/geosupport-suggest
Retrieve address suggestions from Geosupport
https://github.com/ishiland/geosupport-suggest
address geosupport nyc python-library suggestions
Last synced: 5 months ago
JSON representation
Retrieve address suggestions from Geosupport
- Host: GitHub
- URL: https://github.com/ishiland/geosupport-suggest
- Owner: ishiland
- Created: 2019-08-14T20:56:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-04T22:10:24.000Z (about 1 year ago)
- Last Synced: 2025-04-04T22:29:55.036Z (about 1 year ago)
- Topics: address, geosupport, nyc, python-library, suggestions
- Language: Python
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# geosupport-suggest
Retrieve address suggestions from Geosupport using [python-geosupport](https://github.com/ishiland/python-geosupport) and a single input address.
[](https://www.python.org/downloads/release/python-380/) [](https://geosupport-suggest.readthedocs.io/en/latest/?badge=latest) [](https://pypi.python.org/pypi/geosupport-suggest/)
## 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](https://geosupport-suggest.readthedocs.io/).
## Install
```sh
$ pip install geosupport-suggest
```
or clone this repo, `cd` into it and
```sh
$ pip install .
```
## Quick Start
```python
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:
```python
# 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:
```python
# 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:
```python
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](https://geosupport-suggest.readthedocs.io/en/latest/contributing.html) for details.
### License
MIT