-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from nguaman/fix/minor-fixes-add-notebook
fix: minor fixes and first notebook
- Loading branch information
Showing
5 changed files
with
147 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Requirement already satisfied: licitpy in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (0.8.1)\n", | ||
"Requirement already satisfied: tabulate in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (0.9.0)\n", | ||
"Requirement already satisfied: lxml<6.0.0,>=5.3.0 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (5.3.0)\n", | ||
"Requirement already satisfied: pandas<3.0.0,>=2.2.3 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (2.2.3)\n", | ||
"Requirement already satisfied: pydantic<3.0.0,>=2.9.2 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (2.10.3)\n", | ||
"Requirement already satisfied: python-dateutil<3.0.0,>=2.9.0.post0 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (2.9.0.post0)\n", | ||
"Requirement already satisfied: python-magic<0.5.0,>=0.4.27 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (0.4.27)\n", | ||
"Requirement already satisfied: requests<3.0.0,>=2.32.3 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (2.32.3)\n", | ||
"Requirement already satisfied: requests-cache<2.0.0,>=1.2.1 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (1.2.1)\n", | ||
"Requirement already satisfied: tenacity<10.0.0,>=9.0.0 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (9.0.0)\n", | ||
"Requirement already satisfied: tqdm<5.0.0,>=4.67.0 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from licitpy) (4.67.1)\n", | ||
"Requirement already satisfied: numpy>=1.23.2 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from pandas<3.0.0,>=2.2.3->licitpy) (2.2.0)\n", | ||
"Requirement already satisfied: pytz>=2020.1 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from pandas<3.0.0,>=2.2.3->licitpy) (2024.2)\n", | ||
"Requirement already satisfied: tzdata>=2022.7 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from pandas<3.0.0,>=2.2.3->licitpy) (2024.2)\n", | ||
"Requirement already satisfied: annotated-types>=0.6.0 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.9.2->licitpy) (0.7.0)\n", | ||
"Requirement already satisfied: pydantic-core==2.27.1 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.9.2->licitpy) (2.27.1)\n", | ||
"Requirement already satisfied: typing-extensions>=4.12.2 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.9.2->licitpy) (4.12.2)\n", | ||
"Requirement already satisfied: six>=1.5 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from python-dateutil<3.0.0,>=2.9.0.post0->licitpy) (1.17.0)\n", | ||
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from requests<3.0.0,>=2.32.3->licitpy) (3.4.0)\n", | ||
"Requirement already satisfied: idna<4,>=2.5 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from requests<3.0.0,>=2.32.3->licitpy) (3.10)\n", | ||
"Requirement already satisfied: urllib3<3,>=1.21.1 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from requests<3.0.0,>=2.32.3->licitpy) (2.2.3)\n", | ||
"Requirement already satisfied: certifi>=2017.4.17 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from requests<3.0.0,>=2.32.3->licitpy) (2024.8.30)\n", | ||
"Requirement already satisfied: attrs>=21.2 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from requests-cache<2.0.0,>=1.2.1->licitpy) (24.2.0)\n", | ||
"Requirement already satisfied: cattrs>=22.2 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from requests-cache<2.0.0,>=1.2.1->licitpy) (24.1.2)\n", | ||
"Requirement already satisfied: platformdirs>=2.5 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from requests-cache<2.0.0,>=1.2.1->licitpy) (4.3.6)\n", | ||
"Requirement already satisfied: url-normalize>=1.4 in /home/nguaman/Escritorio/dev/projects/licitpy/.venv/lib/python3.11/site-packages (from requests-cache<2.0.0,>=1.2.1->licitpy) (1.4.3)\n", | ||
"Note: you may need to restart the kernel to use updated packages.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"%pip install licitpy tabulate" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"0.8.1\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"import licitpy\n", | ||
"print(licitpy.__version__)\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"licitpy = licitpy.Licitpy()\n", | ||
"tender = licitpy.tenders.from_code(\"2446-900-L124\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"+--------------+-----------------------------------------------------------------------------------------------------------+\n", | ||
"| Field | Value |\n", | ||
"+==============+===========================================================================================================+\n", | ||
"| url | https://www.mercadopublico.cl/Procurement/Modules/RFB/DetailsAcquisition.aspx?qs=0AP9GbyUyyoqNYGyeIx2+w== |\n", | ||
"+--------------+-----------------------------------------------------------------------------------------------------------+\n", | ||
"| code | 2446-900-L124 |\n", | ||
"+--------------+-----------------------------------------------------------------------------------------------------------+\n", | ||
"| title | ADQUISICIÓN DE MATERIALES PARA REPARACIÓN DE LA DEPENDENCIA DE LA CRUZ DEL III MILENIO |\n", | ||
"+--------------+-----------------------------------------------------------------------------------------------------------+\n", | ||
"| status | Status.CLOSED |\n", | ||
"+--------------+-----------------------------------------------------------------------------------------------------------+\n", | ||
"| opening_date | 2024-12-02 15:17:15-03:00 |\n", | ||
"+--------------+-----------------------------------------------------------------------------------------------------------+\n", | ||
"| closing_date | 2024-12-09 15:06:00-03:00 |\n", | ||
"+--------------+-----------------------------------------------------------------------------------------------------------+\n", | ||
"| region | Region.IV |\n", | ||
"+--------------+-----------------------------------------------------------------------------------------------------------+\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"from tabulate import tabulate\n", | ||
"\n", | ||
"data = {\n", | ||
" \"url\": tender.url,\n", | ||
" \"code\": tender.code,\n", | ||
" \"title\": tender.title,\n", | ||
" \"status\": tender.status,\n", | ||
" \"opening_date\": tender.opening_date,\n", | ||
" \"closing_date\": tender.closing_date,\n", | ||
" \"region\": tender.region,\n", | ||
"}\n", | ||
"\n", | ||
"table = tabulate(data.items(), headers=[\"Field\", \"Value\"], tablefmt=\"grid\")\n", | ||
"\n", | ||
"print(table)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".venv", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.11" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters