vos-data-utils 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl

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.

Potentially problematic release.


This version of vos-data-utils might be problematic. Click here for more details.

vdutils/__init__.py CHANGED
@@ -10,11 +10,11 @@ Correction function to align with the current legal district by reflecting chang
10
10
  Conversion function to transform address strings into Parcel Number (PNU)
11
11
  Generation function for unique transaction case IDs in ValueofSpace
12
12
  """
13
- version = "1.0.3"
13
+ version = "1.0.4"
14
14
  author = "ValueOfSpace"
15
15
  description = "description"
16
16
  license = "MIT License"
17
- python_version = "3.7, 3.8, 3.9, 3.10, 3.11"
17
+ python_version = "3.8, 3.9, 3.10, 3.11"
18
18
 
19
19
  def __version__():
20
20
  return version
vdutils/bjd.py CHANGED
@@ -35,10 +35,10 @@ class Bjd():
35
35
  load_dotenv()
36
36
  try: self.api_key: str = os.environ['BJD_API_KEY']
37
37
  except: self.api_key = None
38
- try: self.api_key: str = os.environ['BJD_API_BASE_URL'] # https://www.data.go.kr/iim/api/selectAPIAcountView.do
39
- except: self.api_key = None
40
- try: self.api_key: str = os.environ['BJD_API_SUB_URL'] # https://www.data.go.kr/data/15063424/fileData.do#layer-api-guide API 목록 중 국토교통부_전국 법정동_20230710 GET
41
- except: self.api_key = None
38
+ try: self.api_base_url: str = os.environ['BJD_API_BASE_URL'] # https://www.data.go.kr/iim/api/selectAPIAcountView.do
39
+ except: self.api_base_url = None
40
+ try: self.api_get_url: str = os.environ['BJD_API_SUB_URL'] # https://www.data.go.kr/data/15063424/fileData.do#layer-api-guide API 목록 중 국토교통부_전국 법정동_20230710 GET
41
+ except: self.api_get_url = None
42
42
 
43
43
  self.sep = __sep__
44
44
  self.index = __index__
@@ -92,6 +92,7 @@ class Bjd():
92
92
  api_page = self.api_page
93
93
  while True:
94
94
  api_url = f"{self.api_base_url}{self.api_get_url}?page={api_page}&perPage={self.api_per_page}&serviceKey={self.api_key}"
95
+ print(api_url)
95
96
  response = self._request_api(api_url)
96
97
  json_datas = self._convert_json(response)
97
98
  if json_datas['data']:
@@ -281,9 +282,9 @@ class Bjd():
281
282
  self._create_bjd()
282
283
  self.bjd_api_df.to_csv(
283
284
  self.file_name_bjd,
284
- encoding=self.output_encoding,
285
- sep=self.output_sep,
286
- index=self.output_index
285
+ encoding=self.encoding,
286
+ sep=self.sep,
287
+ index=self.index
287
288
  )
288
289
  self.logger.info("Success Saved Bjd Dataframe To Text File")
289
290
  if self.multiple_word_sgg_list is not None:
@@ -357,9 +358,9 @@ class CurrentBjd(Bjd):
357
358
  self._create_current_bjd()
358
359
  self.current_bjd_df.to_csv(
359
360
  self.file_name_bjd_current,
360
- encoding=self.output_encoding,
361
- sep=self.output_sep,
362
- index=self.output_index
361
+ encoding=self.encoding,
362
+ sep=self.sep,
363
+ index=self.index
363
364
  )
364
365
  self.logger.info("Success Saved Current Bjd Dataframe To Text File")
365
366
 
@@ -481,9 +482,9 @@ class ChangedBjd(Bjd):
481
482
  self._create_changed_bjd()
482
483
  self.changed_bjd_df.to_csv(
483
484
  self.file_name_bjd_changed,
484
- encoding=self.output_encoding,
485
- sep=self.output_sep,
486
- index=self.output_index
485
+ encoding=self.encoding,
486
+ sep=self.sep,
487
+ index=self.index
487
488
  )
488
489
  self.logger.info("Success Saved Changed Bjd Dataframe To Text File")
489
490