Skip to content

Commit

Permalink
remove pycurl package
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiagoTrabach committed Oct 14, 2023
1 parent 39f7048 commit 46f5d09
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 37 deletions.
2 changes: 1 addition & 1 deletion pipelines/rj_sms/dump_azureblob_estoque_tpc/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class constants(Enum):
DATASET_ID = "brutos_estoque_central_tpc"
TABLE_POSICAO_ID = "estoque_posicao"
CONTAINER_NAME = "datalaketpc"
BLOB_PATH_POSICAO = "gold/logistico/cliente=prefeitura_rio/planta=sms_rio/estoque_local/estoque_local.csv"
BLOB_PATH_POSICAO = "gold/logistico/cliente=prefeitura_rio/planta=sms_rio/estoque_local/estoque_local.csv" # noqa: E501
24 changes: 0 additions & 24 deletions pipelines/rj_sms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,30 +249,6 @@ def callback(block):
return output_path


@task
def download_url(url: str, file_name: str, file_folder: str) -> str:
"""
Downloads a file from a given URL and saves it to the specified folder with the given name.
Args:
url (str): The URL of the file to download.
file_name (str): The name to give the downloaded file.
file_folder (str): The folder to save the downloaded file in.
Returns:
str: The full path to the downloaded file.
"""
file_path = os.path.join(file_folder, file_name)
with open(file_path, "wb") as f:
c = pycurl.Curl()
c.setopt(c.URL, url)
c.setopt(c.WRITEDATA, f)
c.perform()
c.close()

return file_path


@task
def list_files_ftp(host, user, password, directory):
"""
Expand Down
12 changes: 1 addition & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ xarray = "^2022.6.0"
xgboost = "^1.7.4"
azure-storage-blob = "^12.17.0"
icecream = "^2.1.3"
pycurl = "^7.45.2"

[tool.poetry.dev-dependencies]
pylint = "^2.12.2"
Expand Down

0 comments on commit 46f5d09

Please sign in to comment.