zipcode-features 0.0.1__tar.gz → 0.0.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zipcode_features
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: A tool to get features based on census data from zipcodes
5
5
  Home-page: https://github.com/EricSchles/zipcode_features
6
6
  Author: Eric Schles
@@ -10,7 +10,7 @@ README = (HERE / "README.md").read_text()
10
10
  # This call to setup() does all the work
11
11
  setup(
12
12
  name="zipcode_features",
13
- version="0.0.1",
13
+ version="0.0.2",
14
14
  description="A tool to get features based on census data from zipcodes",
15
15
  long_description=README,
16
16
  long_description_content_type="text/markdown",
@@ -1,4 +1,4 @@
1
- __version__ = '0.0.1'
1
+ __version__ = '0.0.2'
2
2
 
3
3
  import zipcodes
4
4
  from uszipcode.search import SearchEngine
@@ -22,10 +22,15 @@ def us_get_demographics(state: str, city: str = None, zip_list: list = None) ->
22
22
  https://github.com/EricSchles/uszipcode-project
23
23
  """
24
24
  search = SearchEngine()
25
- payload = {
26
- "state": state,
27
- "city": city
28
- }
25
+ if city is None:
26
+ payload = {
27
+ "state": state
28
+ }
29
+ else:
30
+ payload = {
31
+ "state": state,
32
+ "city": city
33
+ }
29
34
  if zip_list is None:
30
35
  zipcode_and_demo = [
31
36
  [zipcode["zip_code"], search.by_zipcode(zipcode["zip_code"])]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zipcode_features
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: A tool to get features based on census data from zipcodes
5
5
  Home-page: https://github.com/EricSchles/zipcode_features
6
6
  Author: Eric Schles