Skip to content

Commit 5072594

Browse files
authored
Merge pull request #66 from CarterG9/carter/smartykey-and-license
Carter/smartykey and license
2 parents 2570b98 + d14b553 commit 5072594

9 files changed

+31
-51
lines changed

Makefile

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,31 @@ package: test
1616
echo "__version__=\"${VERSION}\"" >> "$(VERSION_FILE)" \
1717
&& python3 setup.py sdist
1818

19-
.PHONY: clean test dependencies package
19+
international_autocomplete_api:
20+
PYTHONPATH=. python3 examples/international_autocomplete_example.py
21+
22+
international_street_api:
23+
PYTHONPATH=. python3 examples/international_example.py
24+
25+
us_autocomplete_pro_api:
26+
PYTHONPATH=. python3 examples/us_autocomplete_pro_example.py
27+
28+
us_enrichment_api:
29+
PYTHONPATH=. python3 examples/us_enrichment_example.py
30+
31+
us_extract_api:
32+
PYTHONPATH=. python3 examples/us_extract_example.py
33+
34+
us_reverse_geo_api:
35+
PYTHONPATH=. python3 examples/us_reverse_geo_example.py
36+
37+
us_street_api:
38+
PYTHONPATH=. python3 examples/us_street_single_address_example.py && PYTHONPATH=. python3 examples/us_street_multiple_addresses_example.py
39+
40+
us_zipcode_api:
41+
PYTHONPATH=. python3 examples/us_zipcode_single_lookup_example.py && PYTHONPATH=. python3 examples/us_zipcode_multiple_lookups_example.py
42+
43+
examples: international_autocomplete_api international_street_api us_autocomplete_pro_api us_enrichment_api us_extract_api us_reverse_geo_api us_street_api us_zipcode_api
44+
45+
46+
.PHONY: clean test dependencies package examples international_autocomplete_api international_street_api us_autocomplete_pro_api us_enrichment_api us_extract_api us_reverse_geo_api us_street_api us_zipcode_api

examples/international_autocomplete_example.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ def run():
2323

2424
client = ClientBuilder(credentials).build_international_autocomplete_api_client()
2525

26-
# (Advanced) Uncomment the below line to explicitly specify a license value
27-
# client = ClientBuilder(credentials).with_licenses(["international-autocomplete-v2-cloud"]).build_international_autocomplete_api_client()
28-
29-
# The appropriate license values to be used for your subscriptions
30-
# can be found on the Subscriptions page of the account dashboard.
31-
# https://www.smartystreets.com/docs/cloud/licensing
32-
3326
lookup = InternationalAutocompleteLookup('Louis')
3427
lookup.country = "FRA"
3528

examples/international_example.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ def run():
2323

2424
client = ClientBuilder(credentials).build_international_street_api_client()
2525

26-
# (Advanced) Uncomment the below line to explicitly specify a license value
27-
# client = ClientBuilder(credentials).with_licenses(['international-global-plus-cloud']).build_international_street_api_client()
28-
29-
# The appropriate license values to be used for your subscriptions
30-
# can be found on the Subscription page of the account dashboard.
31-
# https://www.smartystreets.com/docs/cloud/licensing
32-
3326
# Documentation for input fields can be found at:
3427
# https://smartystreets.com/docs/cloud/international-street-api#http-input-fields
3528

examples/us_autocomplete_pro_example.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ def run():
2828
# credentials = StaticCredentials(auth_id, auth_token)
2929

3030
client = ClientBuilder(credentials).build_us_autocomplete_pro_api_client()
31-
32-
# (Advanced) Uncomment the below line to explicitly specify a license value
33-
# client = ClientBuilder(credentials).with_licenses(["us-autocomplete-pro-cloud"]).build_us_autocomplete_pro_api_client()
34-
35-
# The appropriate license values to be used for your subscriptions
36-
# can be found on the Subscriptions page of the account dashboard.
37-
# https://www.smartystreets.com/docs/cloud/licensing
3831

3932
lookup = AutocompleteProLookup('1042 W Center')
4033

examples/us_enrichment_example.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ def run():
2525

2626
client = ClientBuilder(credentials).build_us_enrichment_api_client()
2727

28-
# (Advanced) Uncomment the below line to explicitly specify a license value
29-
# client = ClientBuilder(credentials).with_licenses(["us-property-data-principal-cloud"]).build_us_enrichment_api_client()
30-
31-
# The appropriate license values to be used for your subscriptions
32-
# can be found on the Subscriptions page of the account dashboard.
33-
# https://www.smartystreets.com/docs/cloud/licensing
34-
3528
# client = ClientBuilder(credentials).with_custom_header({'User-Agent': 'smartystreets ([email protected])', 'Content-Type': 'application/json'}).build_us_enrichment_api_client()
3629
# client = ClientBuilder(credentials).with_http_proxy('localhost:8080', 'user', 'password').build_us_street_api_client()
3730
# Uncomment the line above to try it with a proxy instead

examples/us_reverse_geo_example.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,7 @@ def run():
2222
# credentials = StaticCredentials(auth_id, auth_token)
2323

2424
client = ClientBuilder(credentials).build_us_reverse_geo_api_client()
25-
26-
# (Advanced) Uncomment the below line to explicitly specify a license value
27-
# client = ClientBuilder(credentials).with_licenses(["us-reverse-geocoding-cloud"]).build_us_reverse_geo_api_client()
28-
29-
# The appropriate license values to be used for your subscriptions
30-
# can be found on the Subscriptions page of the account dashboard.
31-
# https://www.smartystreets.com/docs/cloud/licensing
32-
25+
3326
# Documentation for input fields can be found at:
3427
# https://smartystreets.com/docs/cloud/us-reverse-geo-api#http-input-fields
3528

@@ -53,6 +46,7 @@ def run():
5346
print("State Abbreviation: {}".format(address.state_abbreviation))
5447
print("ZIP Code: {}".format(address.zipcode))
5548
print("License: {}".format(coordinate.get_license()))
49+
print("Smartykey: {}".format(address.smartykey))
5650
print()
5751

5852

examples/us_street_multiple_addresses_example.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ def run():
2323
credentials = StaticCredentials(auth_id, auth_token)
2424

2525
client = ClientBuilder(credentials).build_us_street_api_client()
26-
27-
# (Advanced) Uncomment the below line to explicitly specify a license value
28-
# client = ClientBuilder(credentials).with_licenses(['us-core-cloud']).build_us_street_api_client()
29-
30-
# The appropriate license values to be used for your subscriptions
31-
# can be found on the Subscription page of the account dashboard.
32-
# https://www.smartystreets.com/docs/cloud/licensing
3326

3427
batch = Batch()
3528

examples/us_street_single_address_example.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ def run():
2525

2626
client = ClientBuilder(credentials).build_us_street_api_client()
2727

28-
# (Advanced) Uncomment the below line to explicitly specify a license value
29-
# client = ClientBuilder(credentials).with_licenses(["us-core-cloud"]).build_us_street_api_client()
30-
31-
# The appropriate license values to be used for your subscriptions
32-
# can be found on the Subscriptions page of the account dashboard.
33-
# https://www.smartystreets.com/docs/cloud/licensing
34-
3528
# client = ClientBuilder(credentials).with_custom_header({'User-Agent': 'smartystreets ([email protected])', 'Content-Type': 'application/json'}).build_us_street_api_client()
3629
# client = ClientBuilder(credentials).with_http_proxy('localhost:8080', 'user', 'password').build_us_street_api_client()
3730
# Uncomment the line above to try it with a proxy instead

smartystreets_python_sdk/us_reverse_geo/address.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ def __init__(self, obj):
88
self.state_abbreviation = obj.get('state_abbreviation', None)
99
self.zipcode = obj.get('zipcode', None)
1010
self.source = obj.get('source', None)
11+
self.smartykey = obj.get('smarty_key', None)

0 commit comments

Comments
 (0)