radiankore
Librería Python de Deikore SAS para consultar servicios de DIAN y eventos RADIAN con certificado digital PFX/P12. Python >=3.13, API síncrona y licencia MIT.
| Estado | |
|---|---|
| Documentación | |
| Calidad y pruebas | |
| Paquete |
Instalación
pip install radiankore
# Con uv:
uv add radiankore
Disponible tras la primera publicación en PyPI. Si necesitas compilar las dependencias de firma, consulta la guía de instalación.
Métodos disponibles
| Método | Operación DIAN | Resultado |
|---|---|---|
get_status(track_id) |
GetStatus |
Estado de validación y payloads decodificados |
get_invoice_events(cufe) |
GetStatusEvent |
Eventos asociados a una factura |
get_acquirer(identification_type=..., identification_number=...) |
GetAcquirer |
Nombre y correo del adquiriente |
get_document_info(uuid) |
GetDocumentInfo |
Información, estados, eventos y notas del documento |
get_reference_notes(track_id) |
GetReferenceNotes |
Notas referenciadas y motivos por línea |
get_xml_by_document_key(document_key) |
GetXmlByDocumentKey |
XML original del documento como bytes |
No genera facturas ni envía eventos. Los resultados utilizan dataclasses inmutables y campos opcionales cuando corresponda.
Consultar eventos
from radiankore import DianClient, Environment
client = DianClient(
certificate_path="/ruta/segura/certificado.pfx",
password="password-de-ejemplo",
environment=Environment.PRODUCTION,
)
result = client.get_invoice_events("CUFE-DE-LA-FACTURA")
for event in result.events:
print(event.id, event.code, event.description, event.date, event.time)
Producción es el ambiente predeterminado; usa Environment.HABILITATION para
habilitación. Cada consulta cierra sus conexiones automáticamente y puedes
reutilizar el cliente sin volver a cargar el certificado.
Otras consultas
from pathlib import Path
from radiankore.catalogs import IdentificationType
status = client.get_status("CUFE-O-TRACK-ID")
if status is not None:
print(status.is_valid, status.status_code, status.messages)
acquirer = client.get_acquirer(
identification_type=IdentificationType.NIT,
identification_number="000123456",
)
if acquirer is not None:
print(acquirer.name, acquirer.email)
document = client.get_document_info("UUID-DEL-DOCUMENTO")
if document is not None:
for item in document.documents:
if item is not None:
print(item.uuid, item.totals)
notes = client.get_reference_notes("CUFE-O-TRACK-ID")
if notes is not None:
for note in notes.notes:
print(note.code, note.description)
xml = client.get_xml_by_document_key("CLAVE-DEL-DOCUMENTO")
if xml is not None and xml.document_xml is not None:
Path("documento.xml").write_bytes(xml.document_xml)
La documentación completa incluye contratos, modelos, errores y ejemplos por operación. Para contribuir, consulta CONTRIBUTING.
Metadata
Release files for radiankore 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| radiankore-0.2.0.tar.gz | 50.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| radiankore-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.0 kB
Release files / radiankore-0.2.0.tar.gz
| Download URL | radiankore-0.2.0.tar.gz |
|---|---|
| Size | 50.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
181fa1b0fc35bbeea9b1b57a9b14b73afd037f6f84b4ca07c0872002a4c96668
|
|
BLAKE2b-256 checksum How to use checksums |
26bcccf0fc4860aae7e25055a6d7accd480fcb45613f62853341bea7c9c2972e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / radiankore-0.2.0-py3-none-any.whl
| Download URL | radiankore-0.2.0-py3-none-any.whl |
|---|---|
| Size | 35.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0420fea0048a2f5b809389811a181b24a4a4cff26b3830a83c39e2382da27c8d
|
|
BLAKE2b-256 checksum How to use checksums |
e1a5af4df9bfbaf9a23e7bfefb34340e55bed6b92f7737ac5890b18f7739a6d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for radiankore 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for radiankore-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.