ESCatastroLib 0.0.1rc3__py2.py3-none-any.whl → 0.0.1rc4__py2.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.
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Iván V.R <IvanVR@protonmail.com>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = '0.0.1rc3'
4
+ __version__ = '0.0.1rc4'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -200,11 +200,22 @@ def geocodificar_direccion(direccion: str, municipio: str = None):
200
200
 
201
201
  if response.status_code == 200:
202
202
  data = json.loads(response.content.decode('utf-8').replace('callback(', '').replace(')', ''))
203
- return {
204
- 'x': data.get('lng'),
205
- 'y': data.get('lat'),
206
- 'rc': data.get('refCatastral')
207
- }
203
+ print(data)
204
+ if type(data) == dict:
205
+ return {
206
+ 'x': data.get('lng'),
207
+ 'y': data.get('lat'),
208
+ 'rc': data.get('refCatastral')
209
+ }
210
+ elif type(data) == list and len(data) > 0:
211
+ pc = data[0]
212
+ return {
213
+ 'x': pc.get('lng'),
214
+ 'y': pc.get('lat'),
215
+ 'rc': pc.get('refCatastral')
216
+ }
217
+ else:
218
+ return None
208
219
  else:
209
220
  return None
210
221
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ESCatastroLib
3
- Version: 0.0.1rc3
3
+ Version: 0.0.1rc4
4
4
  Summary: Una librería de Python para consultar los datos del Catastro COMO OBJETOS. Incluye información geográfica.
5
5
  Project-URL: Documentation, https://github.com/IvanitiX/ESCatastroLib#readme
6
6
  Project-URL: Issues, https://github.com/IvanitiX/ESCatastroLib/issues
@@ -267,8 +267,8 @@ Un archivo con el `filename`.
267
267
  ¡Buena pregunta! Os dejo algunos ejemplos:
268
268
 
269
269
  ```python
270
- from escatastrolib import Municipio, Calle, ParcelaCatastral, MetaParcela
271
- from escatastrolib.utils import listar_provincias, listar_tipos_via, listar_calles, listar_municipios
270
+ from ESCatastroLib import Municipio, Calle, ParcelaCatastral, MetaParcela
271
+ from ESCatastroLib.utils import listar_provincias, listar_tipos_via, listar_calles, listar_municipios
272
272
 
273
273
  print(listar_provincias())
274
274
  # > ['A CORUÑA', 'ALACANT', 'ALBACETE', 'ALMERIA', 'ASTURIAS', 'AVILA', 'BADAJOZ', ...]
@@ -364,4 +364,4 @@ Sigue las instrucciones de CONTRIBUTING.md y el Código de Conducta.
364
364
 
365
365
  [1]: https://github.com/gisce/pycatastro
366
366
  [2]: https://github.com/astrojuanlu
367
- [3]: https://github.com/JaimeObregon
367
+ [3]: https://github.com/JaimeObregon
@@ -0,0 +1,15 @@
1
+ escatastrolib/__about__.py,sha256=AewrDcLR1tQuIZMxuJxO3bT_jYsC-D1tpsXR9A0cF94,131
2
+ escatastrolib/__init__.py,sha256=QCXZ5qTCAGhkZr63i0Y7zZpkLKd342edUzjt9U_Ujqs,220
3
+ escatastrolib/models/Calle.py,sha256=TfgJfRiCSl6Fgug2--Wo2x5cj6JQdhHQojtZDZOgVSo,2846
4
+ escatastrolib/models/InfoCatastral.py,sha256=H8Eo96OThC_OSnpQ7Jeuwo4We5f1XZ4C51lbvcDUSq4,23308
5
+ escatastrolib/models/Municipio.py,sha256=J3X9G7EMc63651EDAMOqo846Ed-5cVjJfZLZeohPw74,1566
6
+ escatastrolib/models/__init__.py,sha256=Y8nN1Qp3_-VX7njuXwFWSq-62clHj878miEQGnzNXlc,149
7
+ escatastrolib/utils/__init__.py,sha256=kQj0ORkR_JMgwWgGi73APqn3p-UQipiuMY1QaBBmkLs,106
8
+ escatastrolib/utils/converters.py,sha256=cxjesg23z0gxhaquuPaEQjhgb2Gnj5Ip2BqX_n3wY0s,2621
9
+ escatastrolib/utils/exceptions.py,sha256=YM3AuKHZ61SYgpmtYFz9n7JavdEOq2mLwyk2VzIol5A,759
10
+ escatastrolib/utils/statics.py,sha256=PpHPS-lopMYWg5pJeeCU5NtIJU6nUpeh9njFFKwfVfc,3958
11
+ escatastrolib/utils/utils.py,sha256=76ZuW_kFjAjazLztvGnsiuKrvzyPx_e0flhTqp2yaDU,8772
12
+ escatastrolib-0.0.1rc4.dist-info/METADATA,sha256=08CGcJ_dUg-XoBhuMczsRaNd6YjbMSheRzUqvcywZlU,18067
13
+ escatastrolib-0.0.1rc4.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
14
+ escatastrolib-0.0.1rc4.dist-info/licenses/LICENSE,sha256=kgDY5GRu9WGoKk_0F0iYmXuLmGiZ9hgtReHhCfJBWr8,11319
15
+ escatastrolib-0.0.1rc4.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- ESCatastroLib/__about__.py,sha256=vsaWW_x-_9_aeEMTHUfLee5bPKUCtQ2XFAWd6MBIpyQ,131
2
- ESCatastroLib/__init__.py,sha256=QCXZ5qTCAGhkZr63i0Y7zZpkLKd342edUzjt9U_Ujqs,220
3
- ESCatastroLib/models/Calle.py,sha256=TfgJfRiCSl6Fgug2--Wo2x5cj6JQdhHQojtZDZOgVSo,2846
4
- ESCatastroLib/models/InfoCatastral.py,sha256=H8Eo96OThC_OSnpQ7Jeuwo4We5f1XZ4C51lbvcDUSq4,23308
5
- ESCatastroLib/models/Municipio.py,sha256=J3X9G7EMc63651EDAMOqo846Ed-5cVjJfZLZeohPw74,1566
6
- ESCatastroLib/models/__init__.py,sha256=Y8nN1Qp3_-VX7njuXwFWSq-62clHj878miEQGnzNXlc,149
7
- ESCatastroLib/utils/__init__.py,sha256=kQj0ORkR_JMgwWgGi73APqn3p-UQipiuMY1QaBBmkLs,106
8
- ESCatastroLib/utils/converters.py,sha256=cxjesg23z0gxhaquuPaEQjhgb2Gnj5Ip2BqX_n3wY0s,2621
9
- ESCatastroLib/utils/exceptions.py,sha256=YM3AuKHZ61SYgpmtYFz9n7JavdEOq2mLwyk2VzIol5A,759
10
- ESCatastroLib/utils/statics.py,sha256=PpHPS-lopMYWg5pJeeCU5NtIJU6nUpeh9njFFKwfVfc,3958
11
- ESCatastroLib/utils/utils.py,sha256=WdtW7NqkFH0erkqRXbPAQRJQmJXezSjbD6mmJK8OZ-4,8436
12
- escatastrolib-0.0.1rc3.dist-info/METADATA,sha256=IyW6cvq6iaKl3Ej55r1cL3TnNLfNhHzxfLWhI2hkI4w,18066
13
- escatastrolib-0.0.1rc3.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
14
- escatastrolib-0.0.1rc3.dist-info/licenses/LICENSE,sha256=kgDY5GRu9WGoKk_0F0iYmXuLmGiZ9hgtReHhCfJBWr8,11319
15
- escatastrolib-0.0.1rc3.dist-info/RECORD,,