Skip to main content

Download and format ASIC files

Project description

ASIC

Interfaz de línea de comandos para descargar los archivos de las publicaciones de liquidación del Mercado de Energía Mayorista MEM realizadas por el Administrador del Sistema de Intercambios Comerciales ASIC.


Requiere acceso al FTP del ASIC en xmftps.xm.com.co


Ejemplos

Antes de poder usar los comandos que usan el servir FTP de XM, debes proveer la información de autenticación (se recomienda usar variables de entorno).

$Env:ASIC_FTPS_HOST = "xmftps.xm.com.co"
$Env:ASIC_FTPS_USER = "Isamdnt\88888888"
$Env:ASIC_FTPS_PASSWORD = "m1MuySeCreTAClAV."
$Env:ASIC_FTPS_PORT = 210
  1. Cuales versiones de liquidación se han publicado en los últimos días:
> asic pubs --days-old 20
Listing latest published settlements by ASIC in the last 20 days
2022-05:TX3 -- published: 2022-07-19
2022-06:TXR -- published: 2022-07-05
  1. Listar los archivos publicados para los meses de mayo y junio de 2022 con version de liquidación .tx3:
> asic list --month 2022-06 --month 2022-05 --version .tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\adem0501.Tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\adem0502.Tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\adem0503.Tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\adem0504.Tx3
          ...
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\pep0530.tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\pep0531.tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\sntie05.tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\afac05.tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\trsm05.tx3
\INFORMACION_XM\PUBLICOK\SIC\COMERCIA\2022-05\ldcbmr05.tx3
  1. Descargar los archivos publicados para los meses de mayo y junio de 2022 con version de liquidación .tx3 a la carpeta local ./asic-files/:
> asic download --month 2022-06 --month 2022-05 --version .tx3 asic-files
Dowloading files... ━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   6% 0:01:05

CLI

Interfaz de línea de comandos (CLI).

Instalación

  1. Crear un ambiente virtual de python
python -m venv venv
  1. Activar el ambiente virtual
.\venv\Scripts\activate
  1. Instalar paquete
python -m pip install asic

Ejecución

La CLI misma ofrece ayuda de como usarla. La opción --help imprime la ayuda de cada comando en la pantalla.

> asic --help 

 Usage: asic [OPTIONS] COMMAND [ARGS]...

 Commands:
  download           Download files from asic's ftp server to local DESTINATION folder.
  list               List files from asic's ftp server.
  pubs               Check latest published settlements in asic's website. 
> asic pubs --help

 Usage: asic pubs [OPTIONS]

 Check latest published settlements in asic's website.

Contribuir

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

asic-0.2.2.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asic-0.2.2-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file asic-0.2.2.tar.gz.

File metadata

  • Download URL: asic-0.2.2.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for asic-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3443e3cd0e732ccb1a30fd922fd55e78b549fa1dfe938dfb449cd944a9d2c1c8
MD5 0d9d62e30b6e9954618b1e499ca9d58a
BLAKE2b-256 512b59d196ef1e15133c0c2531ed4eed61f7acd0ced2b25af369c8a66a9298c5

See more details on using hashes here.

File details

Details for the file asic-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: asic-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for asic-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f74d5ca8ed5ef642765c333c306386b9d89ad59b20fffcfb035e0c058b6f3d6
MD5 72289a6ab94cc7ffd6ff868e18670798
BLAKE2b-256 6937b7c4407e19df1d7b52c6ed8ed4839ae4b4c0b04b87b1e2495da5efe27b1a

See more details on using hashes here.

Supported by

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