@@ -24,10 +24,10 @@ Usage
2424### Geocoding
2525
2626``` python
27- from geocodio import GeocodioClient
27+ from geocodio import Geocodio
2828
2929# Initialize the client with your API key
30- client = GeocodioClient (" YOUR_API_KEY" )
30+ client = Geocodio (" YOUR_API_KEY" )
3131
3232# Single forward geocode
3333response = client.geocode(" 1600 Pennsylvania Ave, Washington, DC" )
@@ -59,10 +59,10 @@ print(data.results[0].fields.timezone.name if data.results[0].fields.timezone el
5959The List API allows you to manage lists of addresses or coordinates for batch processing.
6060
6161``` python
62- from geocodio import GeocodioClient
62+ from geocodio import Geocodio
6363
6464# Initialize the client with your API key
65- client = GeocodioClient (" YOUR_API_KEY" )
65+ client = Geocodio (" YOUR_API_KEY" )
6666
6767# Get all lists
6868lists = client.get_lists()
@@ -94,17 +94,17 @@ Error Handling
9494--------------
9595
9696``` python
97- from geocodio import GeocodioClient
97+ from geocodio import Geocodio
9898from geocodio.exceptions import AuthenticationError, InvalidRequestError
9999
100100try :
101- client = GeocodioClient (" INVALID_API_KEY" )
101+ client = Geocodio (" INVALID_API_KEY" )
102102 response = client.geocode(" 1600 Pennsylvania Ave, Washington, DC" )
103103except AuthenticationError as e:
104104 print (f " Authentication failed: { e} " )
105105
106106try :
107- client = GeocodioClient (" YOUR_API_KEY" )
107+ client = Geocodio (" YOUR_API_KEY" )
108108 response = client.geocode(" " ) # Empty address
109109except InvalidRequestError as e:
110110 print (f " Invalid request: { e} " )
@@ -116,10 +116,10 @@ Geocodio Enterprise
116116To use this library with Geocodio Enterprise, pass ` api.enterprise.geocod.io ` as the ` hostname ` parameter when initializing the client:
117117
118118``` python
119- from geocodio import GeocodioClient
119+ from geocodio import Geocodio
120120
121121# Initialize client for Geocodio Enterprise
122- client = GeocodioClient (
122+ client = Geocodio (
123123 " YOUR_API_KEY" ,
124124 hostname = " api.enterprise.geocod.io"
125125)
0 commit comments