Skip to main content

Eliges un tipo de documento y realizas la consulta obteniendo los resultados de sunat.

Project description

Factoring Total

PyPI version

Descripción

Libreria para obtener datos basicos desde la SUNAT

Instalación

pip install FactoringRuc

Uso básico

from factoring_ruc import ConsultaRuc


cr = ConsultaRuc()
usuario_enc = ""
password_enc = ""
key = ""
tipo = ""
ruc = ""
bloque = ""
respuesta = cr.search_by_document(usuario_enc,password_enc,key,tipo,ruc,bloque)
print(respuesta)

Obtendremos el siguiente resultado:

{'informacion_basica': {'TDoc': 'R', 'NDoc': '20377892918', 'RelTDoc': '', 'RelNDoc': '', 'RazSoc': 'LEASING TOTAL S.A', 'NomCom': '-', 'TipCon': 'SOCIEDAD ANONIMA', 'IniAct': '1997-10-14', 'ActEco': '65912 - ARRENDAMIENTO CON OPCION DE COMPRA', 'FchInsRRPP': '1998-01-15', 'NumParReg': '-             ', 'Fol': '-    ', 'Asi': '-    ', 'AgeRet': 'S', 'ApeMat': '', 'ApePat': '', 'Nom': '', 'DigVer': '', 'Sex': '', 'FecNac': '', 'EstCon': 'ACTIVO', 'EstDom': 'HABIDO', 'EstDomic': '00', 'CondDomic': '00', 'Direcc': [{'Direccion': 'AVENIDA CIRCUNVALACION CLUB GOLF  NRO 134 SANTIAGO DE SURCO - LIMA - LIMA (TORRE 2 PISO 16)', 'Fuente': 'SUNAT - DOMICILIO FISCAL'}, {'Direccion': 'AVENIDA J PARDO  NRO. 231 MIRAFLORES - LIMA - LIMA (PISO 11 OFICINA 1101)', 'Fuente': 'SUNAT - OF.ADMINIST.'}], 'RepLeg': [{'TDOC': 'D', 'NDOC': '09377548', 'Nombre': 'RUIZ SANDOVAL SILVIA LILIANA', 'FecIniCar': '2013-01-22', 'Cargo': 'APODERADO'}, {'TDOC': 'D', 'NDOC': '30862793    ', 'Nombre': 'NUÑEZ MOLLEAPASA DAVID ANIBAL', 'FecIniCar': '1998-08-16', 'Cargo': 'GERENTE GRAL'}, {'TDOC': 'D', 'NDOC': '42848529', 'Nombre': 'ROSAS AVALOS AARON DIEGO', 'FecIniCar': '2013-07-04', 'Cargo': 'APODERADO'}]}}

Configuración

Revisar PDF enviado

Métodos

search_by_document(`usuario_enc, password_enc, key, tipo, ruc)

Con esto, obtendremos informacion basica del ruc o tipo de documento a consultar. Devolverá por defecto un diccionario (https://docs.python.org/3.6/tutorial/datastructures.html#dictionaries).

Consideraciones

  • Debe utilizar python >=3.6

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FactoringRuc-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

FactoringRuc-1.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file FactoringRuc-1.0.1.tar.gz.

File metadata

  • Download URL: FactoringRuc-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

File hashes

Hashes for FactoringRuc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d210c12bca3da11f4ef1cfc0a3c57f746652f0a6c8b6f0ee57a76054eb75dcaa
MD5 9466684feb865d7475389b304140c308
BLAKE2b-256 7078c6131ba5d77019ef4b6164011478384f1e210d3b065a805b75b00ce05918

See more details on using hashes here.

File details

Details for the file FactoringRuc-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: FactoringRuc-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

File hashes

Hashes for FactoringRuc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b040ed3957c07e1a47396dafde0ab8ce5d860466a510a3b8acde9e747480b47
MD5 9e2f04acbdfda7a7994ab5f57d044b95
BLAKE2b-256 8c9c754c651319460f2ab9652e648cb86efd1ed27c1b5d6726a47ed346c68c6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page