smartystreets-python-sdk 8.0.0__tar.gz → 8.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/PKG-INFO +2 -2
  2. {smartystreets_python_sdk-8.0.0/smartystreets_python_sdk/international_postal_code → smartystreets_python_sdk-8.1.0/smartystreets_python_sdk/international_autocomplete}/__init__.py +1 -0
  3. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_autocomplete/client.py +8 -0
  4. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_autocomplete/lookup.py +3 -1
  5. smartystreets_python_sdk-8.1.0/smartystreets_python_sdk/international_street/language_mode.py +27 -0
  6. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk.egg-info/PKG-INFO +2 -2
  7. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk.egg-info/SOURCES.txt +1 -0
  8. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk_version/__init__.py +1 -1
  9. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/LICENSE.md +0 -0
  10. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/README.md +0 -0
  11. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/setup.cfg +0 -0
  12. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/setup.py +0 -0
  13. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/__init__.py +0 -0
  14. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/basic_auth_credentials.py +0 -0
  15. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/batch.py +0 -0
  16. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/client_builder.py +0 -0
  17. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/custom_header_sender.py +0 -0
  18. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/custom_query_sender.py +0 -0
  19. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/errors.py +0 -0
  20. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/exceptions.py +0 -0
  21. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_autocomplete/candidate.py +0 -0
  22. {smartystreets_python_sdk-8.0.0/smartystreets_python_sdk/international_street → smartystreets_python_sdk-8.1.0/smartystreets_python_sdk/international_autocomplete}/language_mode.py +0 -0
  23. {smartystreets_python_sdk-8.0.0/smartystreets_python_sdk/international_autocomplete → smartystreets_python_sdk-8.1.0/smartystreets_python_sdk/international_postal_code}/__init__.py +0 -0
  24. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_postal_code/candidate.py +0 -0
  25. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_postal_code/client.py +0 -0
  26. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_postal_code/lookup.py +0 -0
  27. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/__init__.py +0 -0
  28. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/analysis.py +0 -0
  29. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/candidate.py +0 -0
  30. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/changes.py +0 -0
  31. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/client.py +0 -0
  32. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/components.py +0 -0
  33. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/lookup.py +0 -0
  34. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/metadata.py +0 -0
  35. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/international_street/rootlevel.py +0 -0
  36. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/license_sender.py +0 -0
  37. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/native_serializer.py +0 -0
  38. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/proxy.py +0 -0
  39. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/request.py +0 -0
  40. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/requests_sender.py +0 -0
  41. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/response.py +0 -0
  42. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/retry_sender.py +0 -0
  43. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/shared_credentials.py +0 -0
  44. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/signing_sender.py +0 -0
  45. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/static_credentials.py +0 -0
  46. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/status_code_sender.py +0 -0
  47. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/url_prefix_sender.py +0 -0
  48. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete/__init__.py +0 -0
  49. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete/client.py +0 -0
  50. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete/geolocation_type.py +0 -0
  51. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete/lookup.py +0 -0
  52. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete/source.py +0 -0
  53. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete/suggestion.py +0 -0
  54. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete_pro/__init__.py +0 -0
  55. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete_pro/client.py +0 -0
  56. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete_pro/geolocation_type.py +0 -0
  57. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete_pro/lookup.py +0 -0
  58. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete_pro/source.py +0 -0
  59. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_autocomplete_pro/suggestion.py +0 -0
  60. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_enrichment/__init__.py +0 -0
  61. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_enrichment/business/__init__.py +0 -0
  62. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_enrichment/business/detail.py +0 -0
  63. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_enrichment/business/summary.py +0 -0
  64. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_enrichment/client.py +0 -0
  65. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_enrichment/lookup.py +0 -0
  66. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_enrichment/response.py +0 -0
  67. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_extract/__init__.py +0 -0
  68. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_extract/address.py +0 -0
  69. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_extract/client.py +0 -0
  70. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_extract/lookup.py +0 -0
  71. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_extract/metadata.py +0 -0
  72. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_extract/result.py +0 -0
  73. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_reverse_geo/__init__.py +0 -0
  74. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_reverse_geo/address.py +0 -0
  75. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_reverse_geo/client.py +0 -0
  76. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_reverse_geo/coordinate.py +0 -0
  77. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_reverse_geo/lookup.py +0 -0
  78. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_reverse_geo/response.py +0 -0
  79. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_reverse_geo/result.py +0 -0
  80. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_reverse_geo/source.py +0 -0
  81. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/__init__.py +0 -0
  82. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/analysis.py +0 -0
  83. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/candidate.py +0 -0
  84. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/client.py +0 -0
  85. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/component_analysis.py +0 -0
  86. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/components.py +0 -0
  87. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/lookup.py +0 -0
  88. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/match_info.py +0 -0
  89. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/match_type.py +0 -0
  90. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/metadata.py +0 -0
  91. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_street/output_format.py +0 -0
  92. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_zipcode/__init__.py +0 -0
  93. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_zipcode/alternate_county.py +0 -0
  94. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_zipcode/city.py +0 -0
  95. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_zipcode/client.py +0 -0
  96. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_zipcode/lookup.py +0 -0
  97. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_zipcode/result.py +0 -0
  98. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk/us_zipcode/zipcode.py +0 -0
  99. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk.egg-info/dependency_links.txt +0 -0
  100. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk.egg-info/requires.txt +0 -0
  101. {smartystreets_python_sdk-8.0.0 → smartystreets_python_sdk-8.1.0}/smartystreets_python_sdk.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smartystreets_python_sdk
3
- Version: 8.0.0
3
+ Version: 8.1.0
4
4
  Summary: An official library to help Python developers easily access the SmartyStreets APIs
5
5
  Home-page: https://github.com/smartystreets/smartystreets-python-sdk
6
- Download-URL: https://github.com/smartystreets/smartystreets-python-sdk/tarball/8.0.0
6
+ Download-URL: https://github.com/smartystreets/smartystreets-python-sdk/tarball/8.1.0
7
7
  Author: SmartyStreets SDK Team
8
8
  Author-email: support@smartystreets.com
9
9
  License: Apache 2
@@ -1,3 +1,4 @@
1
1
  from .candidate import Candidate
2
2
  from .lookup import Lookup
3
3
  from .client import Client
4
+ from .language_mode import LanguageMode
@@ -1,6 +1,7 @@
1
1
  from smartystreets_python_sdk import Request
2
2
  from smartystreets_python_sdk.exceptions import SmartyException
3
3
  from smartystreets_python_sdk.international_autocomplete import Candidate
4
+ from smartystreets_python_sdk.international_autocomplete.language_mode import LanguageMode
4
5
 
5
6
 
6
7
  class Client:
@@ -45,6 +46,7 @@ class Client:
45
46
  self.add_parameter(request, 'geolocation', 'on')
46
47
  self.add_parameter(request, 'include_only_locality', lookup.locality)
47
48
  self.add_parameter(request, 'include_only_postal_code', lookup.postal_code)
49
+ self.add_parameter(request, 'language', self.normalized_language(lookup.language))
48
50
 
49
51
  for parameter in lookup.custom_parameter_array:
50
52
  self.add_parameter(request, parameter, lookup.custom_parameter_array[parameter])
@@ -59,3 +61,9 @@ class Client:
59
61
  def add_parameter(request, key, value):
60
62
  if value and value != 'none':
61
63
  request.parameters[key] = value
64
+
65
+ @staticmethod
66
+ def normalized_language(language):
67
+ if language is None:
68
+ return None
69
+ return LanguageMode.from_value(language).value
@@ -1,6 +1,6 @@
1
1
  class Lookup:
2
2
  def __init__(self, search=None, address_id=None, country=None, max_results=5, max_group_results=100,
3
- geolocation=False, locality=None, postal_code=None):
3
+ geolocation=False, locality=None, postal_code=None, language=None):
4
4
  """
5
5
  In addition to holding all the input data for this lookup, this class also will contain the result
6
6
  of the lookup after it comes back from the API.
@@ -10,6 +10,7 @@ class Lookup:
10
10
  :param administrative_area: Limit the results to only the administrative area provided
11
11
  :param locality: Limit the results to only the locality provided
12
12
  :param postal_code: Limit the results to only the postal code provided
13
+ :param language: The output language, Native or Latin (defaults to the country's language)
13
14
  """
14
15
  self.result = []
15
16
 
@@ -22,6 +23,7 @@ class Lookup:
22
23
  self.geolocation = geolocation
23
24
  self.locality = locality
24
25
  self.postal_code = postal_code
26
+ self.language = language
25
27
 
26
28
  def add_custom_parameter(self, parameter, value):
27
29
  self.custom_parameter_array[parameter] = value
@@ -0,0 +1,27 @@
1
+ from enum import Enum
2
+
3
+ from smartystreets_python_sdk.exceptions import UnprocessableEntityError
4
+
5
+
6
+ class LanguageMode(Enum):
7
+ """
8
+ A closed set of valid Language values, the closest Python equivalent to an enum-constrained field.
9
+ """
10
+ NATIVE = 'native'
11
+ LATIN = 'latin'
12
+
13
+ @staticmethod
14
+ def from_value(value):
15
+ """
16
+ Resolves a LanguageMode instance or a raw value (eg. from user input or config) into a LanguageMode,
17
+ matching 'native'/'latin' regardless of case.
18
+ """
19
+ if isinstance(value, LanguageMode):
20
+ return value
21
+
22
+ for mode in LanguageMode:
23
+ if str(value).lower() == mode.value:
24
+ return mode
25
+
26
+ raise UnprocessableEntityError(
27
+ "invalid Language value; must be unset, 'native', or 'latin' (case-insensitive)")
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smartystreets_python_sdk
3
- Version: 8.0.0
3
+ Version: 8.1.0
4
4
  Summary: An official library to help Python developers easily access the SmartyStreets APIs
5
5
  Home-page: https://github.com/smartystreets/smartystreets-python-sdk
6
- Download-URL: https://github.com/smartystreets/smartystreets-python-sdk/tarball/8.0.0
6
+ Download-URL: https://github.com/smartystreets/smartystreets-python-sdk/tarball/8.1.0
7
7
  Author: SmartyStreets SDK Team
8
8
  Author-email: support@smartystreets.com
9
9
  License: Apache 2
@@ -30,6 +30,7 @@ smartystreets_python_sdk.egg-info/top_level.txt
30
30
  smartystreets_python_sdk/international_autocomplete/__init__.py
31
31
  smartystreets_python_sdk/international_autocomplete/candidate.py
32
32
  smartystreets_python_sdk/international_autocomplete/client.py
33
+ smartystreets_python_sdk/international_autocomplete/language_mode.py
33
34
  smartystreets_python_sdk/international_autocomplete/lookup.py
34
35
  smartystreets_python_sdk/international_postal_code/__init__.py
35
36
  smartystreets_python_sdk/international_postal_code/candidate.py
@@ -1,2 +1,2 @@
1
1
  __version__ = '0.0.0' # DO NOT EDIT (this is updated by a build job when a new release is published)
2
- __version__="8.0.0"
2
+ __version__="8.1.0"