From 7924afcd1136237d2838edbe4a08f24c00527152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Wed, 18 Oct 2023 06:56:50 -0700 Subject: [PATCH 01/32] Whatsapp SISREG --- pipelines/rj_sms/__init__.py | 1 + pipelines/rj_sms/whatsapp/flows.py | 49 + pipelines/rj_sms/whatsapp/poetry.lock | 1477 ++++++++++++++++++++++ pipelines/rj_sms/whatsapp/pyproject.toml | 15 + pipelines/rj_sms/whatsapp/run.py | 3 + pipelines/rj_sms/whatsapp/schedules.py | 17 + pipelines/rj_sms/whatsapp/tasks.py | 84 ++ pipelines/rj_sms/whatsapp/utils.py | 90 ++ 8 files changed, 1736 insertions(+) create mode 100644 pipelines/rj_sms/whatsapp/flows.py create mode 100644 pipelines/rj_sms/whatsapp/poetry.lock create mode 100644 pipelines/rj_sms/whatsapp/pyproject.toml create mode 100644 pipelines/rj_sms/whatsapp/run.py create mode 100644 pipelines/rj_sms/whatsapp/schedules.py create mode 100644 pipelines/rj_sms/whatsapp/tasks.py create mode 100644 pipelines/rj_sms/whatsapp/utils.py diff --git a/pipelines/rj_sms/__init__.py b/pipelines/rj_sms/__init__.py index e73a968a6..e31ac6106 100644 --- a/pipelines/rj_sms/__init__.py +++ b/pipelines/rj_sms/__init__.py @@ -5,3 +5,4 @@ from pipelines.rj_sms.dump_db_sivep.flows import * from pipelines.rj_sms.pubsub.flows import * +from pipelines.rj_sms.whatsapp.flows import * diff --git a/pipelines/rj_sms/whatsapp/flows.py b/pipelines/rj_sms/whatsapp/flows.py new file mode 100644 index 000000000..60b45cd08 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/flows.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +""" +WhatsApp flow definition +""" +import pandas as pd +from prefect import Flow +from prefect.storage import GCS +#from pipelines.constants import constants +from prefect.run_configs import KubernetesRun + +GCS_FLOWS_BUCKET = "datario-public" +# Docker image +DOCKER_TAG = "AUTO_REPLACE_DOCKER_TAG" +DOCKER_IMAGE_NAME = "AUTO_REPLACE_DOCKER_IMAGE" +DOCKER_IMAGE = f"{DOCKER_IMAGE_NAME}:{DOCKER_TAG}" +RJ_SMS_DEV_AGENT_LABEL = "rj-sms-dev" + +from tasks import ( + get_patients, + save_patients +) + +from utils import ( + log, + upload_to_datalake, +) + +with Flow("SISREG patients") as flow_whatsapp: + + # Tasks + #dataframe = get_patients() + #dataframe = pd.DataFrame() + upload_to_datalake_task = upload_to_datalake( + input_path="/Users/andremartins/Documents/GitHub/pipelines/pipelines/rj_sms/whatsapp/files/2023-10-21.csv", + dataset_id="whatsapp", + table_id="sisreg_scheduled_patients", + if_exists="replace", + csv_delimiter=";", + if_storage_data_exists="replace", + biglake_table=True, + ) + +flow_whatsapp.storage = GCS(GCS_FLOWS_BUCKET) +flow_whatsapp.run_config = KubernetesRun( + image=DOCKER_IMAGE, + labels=[ + RJ_SMS_DEV_AGENT_LABEL, + ], +) diff --git a/pipelines/rj_sms/whatsapp/poetry.lock b/pipelines/rj_sms/whatsapp/poetry.lock new file mode 100644 index 000000000..3664a04c6 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/poetry.lock @@ -0,0 +1,1477 @@ +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. + +[[package]] +name = "backoff" +version = "2.2.1" +description = "Function decoration for backoff and retry" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, + {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, +] + +[[package]] +name = "basedosdados" +version = "2.0.0b14" +description = "Organizar e facilitar o acesso a dados brasileiros através de tabelas públicas no BigQuery." +optional = false +python-versions = ">=3.8.1,<4" +files = [ + {file = "basedosdados-2.0.0b14-py3-none-any.whl", hash = "sha256:4cde3d771bdc0cd25d1fb25a38852bdbba269df62589b417c5e3d76d052e44ff"}, + {file = "basedosdados-2.0.0b14.tar.gz", hash = "sha256:77b05776961e930003eb6e367e38b258aab83449c7eaa9d1a441531200a1fe8b"}, +] + +[package.dependencies] +google-api-python-client = ">=2.86,<3.0" +google-cloud-bigquery = ">=3.10,<4.0" +google-cloud-bigquery-connection = ">=1.12,<2.0" +google-cloud-bigquery-storage = ">=2.19,<3.0" +google-cloud-storage = ">=2.9,<3.0" +gql = {version = ">=3.4,<4.0", optional = true, markers = "extra == \"all\" or extra == \"upload\""} +loguru = "0.7.0" +pandas = ">=2.0,<3.0" +pandas-gbq = ">=0.19,<0.20" +pydata-google-auth = ">=1.8,<2.0" +requests-toolbelt = {version = ">=1,<2", optional = true, markers = "extra == \"all\" or extra == \"upload\""} +tomlkit = ">=0.11,<0.12" +tqdm = ">=4,<5" + +[package.extras] +all = ["click (>=8.1,<9)", "gql (>=3.4,<4.0)", "pandavro (>=1.7,<2.0)", "requests-toolbelt (>=1,<2)"] +avro = ["pandavro (>=1.7,<2.0)"] +cli = ["click (>=8.1,<9)"] +upload = ["gql (>=3.4,<4.0)", "requests-toolbelt (>=1,<2)"] + +[[package]] +name = "cachetools" +version = "5.3.1" +description = "Extensible memoizing collections and decorators" +optional = false +python-versions = ">=3.7" +files = [ + {file = "cachetools-5.3.1-py3-none-any.whl", hash = "sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590"}, + {file = "cachetools-5.3.1.tar.gz", hash = "sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b"}, +] + +[[package]] +name = "certifi" +version = "2023.7.22" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, + {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, +] + +[[package]] +name = "charset-normalizer" +version = "3.3.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.3.0.tar.gz", hash = "sha256:63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:effe5406c9bd748a871dbcaf3ac69167c38d72db8c9baf3ff954c344f31c4cbe"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4162918ef3098851fcd8a628bf9b6a98d10c380725df9e04caf5ca6dd48c847a"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0570d21da019941634a531444364f2482e8db0b3425fcd5ac0c36565a64142c8"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5707a746c6083a3a74b46b3a631d78d129edab06195a92a8ece755aac25a3f3d"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:278c296c6f96fa686d74eb449ea1697f3c03dc28b75f873b65b5201806346a69"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a4b71f4d1765639372a3b32d2638197f5cd5221b19531f9245fcc9ee62d38f56"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5969baeaea61c97efa706b9b107dcba02784b1601c74ac84f2a532ea079403e"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3f93dab657839dfa61025056606600a11d0b696d79386f974e459a3fbc568ec"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:db756e48f9c5c607b5e33dd36b1d5872d0422e960145b08ab0ec7fd420e9d649"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:232ac332403e37e4a03d209a3f92ed9071f7d3dbda70e2a5e9cff1c4ba9f0678"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e5c1502d4ace69a179305abb3f0bb6141cbe4714bc9b31d427329a95acfc8bdd"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:2502dd2a736c879c0f0d3e2161e74d9907231e25d35794584b1ca5284e43f596"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23e8565ab7ff33218530bc817922fae827420f143479b753104ab801145b1d5b"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-win32.whl", hash = "sha256:1872d01ac8c618a8da634e232f24793883d6e456a66593135aeafe3784b0848d"}, + {file = "charset_normalizer-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:557b21a44ceac6c6b9773bc65aa1b4cc3e248a5ad2f5b914b91579a32e22204d"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d7eff0f27edc5afa9e405f7165f85a6d782d308f3b6b9d96016c010597958e63"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a685067d05e46641d5d1623d7c7fdf15a357546cbb2f71b0ebde91b175ffc3e"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0d3d5b7db9ed8a2b11a774db2bbea7ba1884430a205dbd54a32d61d7c2a190fa"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2935ffc78db9645cb2086c2f8f4cfd23d9b73cc0dc80334bc30aac6f03f68f8c"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fe359b2e3a7729010060fbca442ca225280c16e923b37db0e955ac2a2b72a05"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:380c4bde80bce25c6e4f77b19386f5ec9db230df9f2f2ac1e5ad7af2caa70459"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0d1e3732768fecb052d90d62b220af62ead5748ac51ef61e7b32c266cac9293"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b2919306936ac6efb3aed1fbf81039f7087ddadb3160882a57ee2ff74fd2382"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f8888e31e3a85943743f8fc15e71536bda1c81d5aa36d014a3c0c44481d7db6e"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:82eb849f085624f6a607538ee7b83a6d8126df6d2f7d3b319cb837b289123078"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7b8b8bf1189b3ba9b8de5c8db4d541b406611a71a955bbbd7385bbc45fcb786c"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5adf257bd58c1b8632046bbe43ee38c04e1038e9d37de9c57a94d6bd6ce5da34"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c350354efb159b8767a6244c166f66e67506e06c8924ed74669b2c70bc8735b1"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-win32.whl", hash = "sha256:02af06682e3590ab952599fbadac535ede5d60d78848e555aa58d0c0abbde786"}, + {file = "charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:86d1f65ac145e2c9ed71d8ffb1905e9bba3a91ae29ba55b4c46ae6fc31d7c0d4"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:3b447982ad46348c02cb90d230b75ac34e9886273df3a93eec0539308a6296d7"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:abf0d9f45ea5fb95051c8bfe43cb40cda383772f7e5023a83cc481ca2604d74e"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b09719a17a2301178fac4470d54b1680b18a5048b481cb8890e1ef820cb80455"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b3d9b48ee6e3967b7901c052b670c7dda6deb812c309439adaffdec55c6d7b78"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:edfe077ab09442d4ef3c52cb1f9dab89bff02f4524afc0acf2d46be17dc479f5"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3debd1150027933210c2fc321527c2299118aa929c2f5a0a80ab6953e3bd1908"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86f63face3a527284f7bb8a9d4f78988e3c06823f7bea2bd6f0e0e9298ca0403"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24817cb02cbef7cd499f7c9a2735286b4782bd47a5b3516a0e84c50eab44b98e"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c71f16da1ed8949774ef79f4a0260d28b83b3a50c6576f8f4f0288d109777989"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:9cf3126b85822c4e53aa28c7ec9869b924d6fcfb76e77a45c44b83d91afd74f9"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:b3b2316b25644b23b54a6f6401074cebcecd1244c0b8e80111c9a3f1c8e83d65"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:03680bb39035fbcffe828eae9c3f8afc0428c91d38e7d61aa992ef7a59fb120e"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4cc152c5dd831641e995764f9f0b6589519f6f5123258ccaca8c6d34572fefa8"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-win32.whl", hash = "sha256:b8f3307af845803fb0b060ab76cf6dd3a13adc15b6b451f54281d25911eb92df"}, + {file = "charset_normalizer-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:8eaf82f0eccd1505cf39a45a6bd0a8cf1c70dcfc30dba338207a969d91b965c0"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dc45229747b67ffc441b3de2f3ae5e62877a282ea828a5bdb67883c4ee4a8810"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f4a0033ce9a76e391542c182f0d48d084855b5fcba5010f707c8e8c34663d77"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ada214c6fa40f8d800e575de6b91a40d0548139e5dc457d2ebb61470abf50186"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b1121de0e9d6e6ca08289583d7491e7fcb18a439305b34a30b20d8215922d43c"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1063da2c85b95f2d1a430f1c33b55c9c17ffaf5e612e10aeaad641c55a9e2b9d"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70f1d09c0d7748b73290b29219e854b3207aea922f839437870d8cc2168e31cc"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:250c9eb0f4600361dd80d46112213dff2286231d92d3e52af1e5a6083d10cad9"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:750b446b2ffce1739e8578576092179160f6d26bd5e23eb1789c4d64d5af7dc7"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:fc52b79d83a3fe3a360902d3f5d79073a993597d48114c29485e9431092905d8"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:588245972aca710b5b68802c8cad9edaa98589b1b42ad2b53accd6910dad3545"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e39c7eb31e3f5b1f88caff88bcff1b7f8334975b46f6ac6e9fc725d829bc35d4"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-win32.whl", hash = "sha256:abecce40dfebbfa6abf8e324e1860092eeca6f7375c8c4e655a8afb61af58f2c"}, + {file = "charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a91a981f185721542a0b7c92e9054b7ab4fea0508a795846bc5b0abf8118d4"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:67b8cc9574bb518ec76dc8e705d4c39ae78bb96237cb533edac149352c1f39fe"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac71b2977fb90c35d41c9453116e283fac47bb9096ad917b8819ca8b943abecd"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3ae38d325b512f63f8da31f826e6cb6c367336f95e418137286ba362925c877e"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:542da1178c1c6af8873e143910e2269add130a299c9106eef2594e15dae5e482"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:30a85aed0b864ac88309b7d94be09f6046c834ef60762a8833b660139cfbad13"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aae32c93e0f64469f74ccc730a7cb21c7610af3a775157e50bbd38f816536b38"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b26ddf78d57f1d143bdf32e820fd8935d36abe8a25eb9ec0b5a71c82eb3895"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f5d10bae5d78e4551b7be7a9b29643a95aded9d0f602aa2ba584f0388e7a557"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:249c6470a2b60935bafd1d1d13cd613f8cd8388d53461c67397ee6a0f5dce741"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c5a74c359b2d47d26cdbbc7845e9662d6b08a1e915eb015d044729e92e7050b7"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b5bcf60a228acae568e9911f410f9d9e0d43197d030ae5799e20dca8df588287"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:187d18082694a29005ba2944c882344b6748d5be69e3a89bf3cc9d878e548d5a"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:81bf654678e575403736b85ba3a7867e31c2c30a69bc57fe88e3ace52fb17b89"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-win32.whl", hash = "sha256:85a32721ddde63c9df9ebb0d2045b9691d9750cb139c161c80e500d210f5e26e"}, + {file = "charset_normalizer-3.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:468d2a840567b13a590e67dd276c570f8de00ed767ecc611994c301d0f8c014f"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e0fc42822278451bc13a2e8626cf2218ba570f27856b536e00cfa53099724828"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:09c77f964f351a7369cc343911e0df63e762e42bac24cd7d18525961c81754f4"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12ebea541c44fdc88ccb794a13fe861cc5e35d64ed689513a5c03d05b53b7c82"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:805dfea4ca10411a5296bcc75638017215a93ffb584c9e344731eef0dcfb026a"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96c2b49eb6a72c0e4991d62406e365d87067ca14c1a729a870d22354e6f68115"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aaf7b34c5bc56b38c931a54f7952f1ff0ae77a2e82496583b247f7c969eb1479"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:619d1c96099be5823db34fe89e2582b336b5b074a7f47f819d6b3a57ff7bdb86"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ac5e7015a5920cfce654c06618ec40c33e12801711da6b4258af59a8eff00a"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:93aa7eef6ee71c629b51ef873991d6911b906d7312c6e8e99790c0f33c576f89"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7966951325782121e67c81299a031f4c115615e68046f79b85856b86ebffc4cd"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:02673e456dc5ab13659f85196c534dc596d4ef260e4d86e856c3b2773ce09843"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:c2af80fb58f0f24b3f3adcb9148e6203fa67dd3f61c4af146ecad033024dde43"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:153e7b6e724761741e0974fc4dcd406d35ba70b92bfe3fedcb497226c93b9da7"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-win32.whl", hash = "sha256:d47ecf253780c90ee181d4d871cd655a789da937454045b17b5798da9393901a"}, + {file = "charset_normalizer-3.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:d97d85fa63f315a8bdaba2af9a6a686e0eceab77b3089af45133252618e70884"}, + {file = "charset_normalizer-3.3.0-py3-none-any.whl", hash = "sha256:e46cd37076971c1040fc8c41273a8b3e2c624ce4f2be3f5dfcb7a430c1d3acc2"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "db-dtypes" +version = "1.1.1" +description = "Pandas Data Types for SQL systems (BigQuery, Spanner)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "db-dtypes-1.1.1.tar.gz", hash = "sha256:ab485c85fef2454f3182427def0b0a3ab179b2871542787d33ba519d62078883"}, + {file = "db_dtypes-1.1.1-py2.py3-none-any.whl", hash = "sha256:23be34ea2bc91065447ecea4d5f107e46d1de223d152e69fa73673a62d5bd27d"}, +] + +[package.dependencies] +numpy = ">=1.16.6" +packaging = ">=17.0" +pandas = ">=0.24.2" +pyarrow = ">=3.0.0" + +[[package]] +name = "google-api-core" +version = "2.12.0" +description = "Google API client core library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-api-core-2.12.0.tar.gz", hash = "sha256:c22e01b1e3c4dcd90998494879612c38d0a3411d1f7b679eb89e2abe3ce1f553"}, + {file = "google_api_core-2.12.0-py3-none-any.whl", hash = "sha256:ec6054f7d64ad13b41e43d96f735acbd763b0f3b695dabaa2d579673f6a6e160"}, +] + +[package.dependencies] +google-auth = ">=2.14.1,<3.0.dev0" +googleapis-common-protos = ">=1.56.2,<2.0.dev0" +grpcio = [ + {version = ">=1.49.1,<2.0dev", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""}, + {version = ">=1.33.2,<2.0dev", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, +] +grpcio-status = [ + {version = ">=1.49.1,<2.0.dev0", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""}, + {version = ">=1.33.2,<2.0.dev0", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, +] +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0.dev0" +requests = ">=2.18.0,<3.0.0.dev0" + +[package.extras] +grpc = ["grpcio (>=1.33.2,<2.0dev)", "grpcio (>=1.49.1,<2.0dev)", "grpcio-status (>=1.33.2,<2.0.dev0)", "grpcio-status (>=1.49.1,<2.0.dev0)"] +grpcgcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] +grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] + +[[package]] +name = "google-api-python-client" +version = "2.104.0" +description = "Google API Client Library for Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-api-python-client-2.104.0.tar.gz", hash = "sha256:bbc66520e7fe9417b93fd113f2a0a1afa789d686de9009b6e94e48fdea50a60f"}, + {file = "google_api_python_client-2.104.0-py2.py3-none-any.whl", hash = "sha256:867061526aa6dc6c1481d118e913a8a38a02a01eed589413968397ebd77df71d"}, +] + +[package.dependencies] +google-api-core = ">=1.31.5,<2.0.dev0 || >2.3.0,<3.0.0.dev0" +google-auth = ">=1.19.0,<3.0.0.dev0" +google-auth-httplib2 = ">=0.1.0" +httplib2 = ">=0.15.0,<1.dev0" +uritemplate = ">=3.0.1,<5" + +[[package]] +name = "google-auth" +version = "2.23.3" +description = "Google Authentication Library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-auth-2.23.3.tar.gz", hash = "sha256:6864247895eea5d13b9c57c9e03abb49cb94ce2dc7c58e91cba3248c7477c9e3"}, + {file = "google_auth-2.23.3-py2.py3-none-any.whl", hash = "sha256:a8f4608e65c244ead9e0538f181a96c6e11199ec114d41f1d7b1bffa96937bda"}, +] + +[package.dependencies] +cachetools = ">=2.0.0,<6.0" +pyasn1-modules = ">=0.2.1" +rsa = ">=3.1.4,<5" + +[package.extras] +aiohttp = ["aiohttp (>=3.6.2,<4.0.0.dev0)", "requests (>=2.20.0,<3.0.0.dev0)"] +enterprise-cert = ["cryptography (==36.0.2)", "pyopenssl (==22.0.0)"] +pyopenssl = ["cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] +reauth = ["pyu2f (>=0.1.5)"] +requests = ["requests (>=2.20.0,<3.0.0.dev0)"] + +[[package]] +name = "google-auth-httplib2" +version = "0.1.1" +description = "Google Authentication Library: httplib2 transport" +optional = false +python-versions = "*" +files = [ + {file = "google-auth-httplib2-0.1.1.tar.gz", hash = "sha256:c64bc555fdc6dd788ea62ecf7bccffcf497bf77244887a3f3d7a5a02f8e3fc29"}, + {file = "google_auth_httplib2-0.1.1-py2.py3-none-any.whl", hash = "sha256:42c50900b8e4dcdf8222364d1f0efe32b8421fb6ed72f2613f12f75cc933478c"}, +] + +[package.dependencies] +google-auth = "*" +httplib2 = ">=0.19.0" + +[[package]] +name = "google-auth-oauthlib" +version = "1.1.0" +description = "Google Authentication Library" +optional = false +python-versions = ">=3.6" +files = [ + {file = "google-auth-oauthlib-1.1.0.tar.gz", hash = "sha256:83ea8c3b0881e453790baff4448e8a6112ac8778d1de9da0b68010b843937afb"}, + {file = "google_auth_oauthlib-1.1.0-py2.py3-none-any.whl", hash = "sha256:089c6e587d36f4803ac7e0720c045c6a8b1fd1790088b8424975b90d0ee61c12"}, +] + +[package.dependencies] +google-auth = ">=2.15.0" +requests-oauthlib = ">=0.7.0" + +[package.extras] +tool = ["click (>=6.0.0)"] + +[[package]] +name = "google-cloud-bigquery" +version = "3.12.0" +description = "Google BigQuery API client library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-cloud-bigquery-3.12.0.tar.gz", hash = "sha256:1af93c5c28a18b13190bce479b793aaae56c0ecf7e1da73b4ba5798eca054a07"}, + {file = "google_cloud_bigquery-3.12.0-py2.py3-none-any.whl", hash = "sha256:e68851addfe0394ab7662bd58aa0e5a4527e7156568cc0410129ccb8a460a009"}, +] + +[package.dependencies] +google-api-core = {version = ">=1.31.5,<2.0.dev0 || >2.3.0,<3.0.0dev", extras = ["grpc"]} +google-cloud-core = ">=1.6.0,<3.0.0dev" +google-resumable-media = ">=0.6.0,<3.0dev" +grpcio = [ + {version = ">=1.49.1,<2.0dev", markers = "python_version >= \"3.11\""}, + {version = ">=1.47.0,<2.0dev", markers = "python_version < \"3.11\""}, +] +packaging = ">=20.0.0" +proto-plus = ">=1.15.0,<2.0.0dev" +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" +python-dateutil = ">=2.7.2,<3.0dev" +requests = ">=2.21.0,<3.0.0dev" + +[package.extras] +all = ["Shapely (>=1.8.4,<2.0dev)", "db-dtypes (>=0.3.0,<2.0.0dev)", "geopandas (>=0.9.0,<1.0dev)", "google-cloud-bigquery-storage (>=2.6.0,<3.0.0dev)", "grpcio (>=1.47.0,<2.0dev)", "grpcio (>=1.49.1,<2.0dev)", "ipykernel (>=6.0.0)", "ipython (>=7.23.1,!=8.1.0)", "ipywidgets (>=7.7.0)", "opentelemetry-api (>=1.1.0)", "opentelemetry-instrumentation (>=0.20b0)", "opentelemetry-sdk (>=1.1.0)", "pandas (>=1.1.0)", "pyarrow (>=3.0.0)", "tqdm (>=4.7.4,<5.0.0dev)"] +bqstorage = ["google-cloud-bigquery-storage (>=2.6.0,<3.0.0dev)", "grpcio (>=1.47.0,<2.0dev)", "grpcio (>=1.49.1,<2.0dev)", "pyarrow (>=3.0.0)"] +geopandas = ["Shapely (>=1.8.4,<2.0dev)", "geopandas (>=0.9.0,<1.0dev)"] +ipython = ["ipykernel (>=6.0.0)", "ipython (>=7.23.1,!=8.1.0)"] +ipywidgets = ["ipykernel (>=6.0.0)", "ipywidgets (>=7.7.0)"] +opentelemetry = ["opentelemetry-api (>=1.1.0)", "opentelemetry-instrumentation (>=0.20b0)", "opentelemetry-sdk (>=1.1.0)"] +pandas = ["db-dtypes (>=0.3.0,<2.0.0dev)", "pandas (>=1.1.0)", "pyarrow (>=3.0.0)"] +tqdm = ["tqdm (>=4.7.4,<5.0.0dev)"] + +[[package]] +name = "google-cloud-bigquery-connection" +version = "1.13.2" +description = "Google Cloud Bigquery Connection API client library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-cloud-bigquery-connection-1.13.2.tar.gz", hash = "sha256:7890931545bd44710762b0eac6883bc4564543d8bd810258d073d38b7fef7a68"}, + {file = "google_cloud_bigquery_connection-1.13.2-py2.py3-none-any.whl", hash = "sha256:381e0ad995e0ea91162ff3cafbf02d1541d45dab5c00535e2bdfb0a281ae53c7"}, +] + +[package.dependencies] +google-api-core = {version = ">=1.34.0,<2.0.dev0 || >=2.11.dev0,<3.0.0dev", extras = ["grpc"]} +grpc-google-iam-v1 = ">=0.12.4,<1.0.0dev" +proto-plus = [ + {version = ">=1.22.2,<2.0.0dev", markers = "python_version >= \"3.11\""}, + {version = ">=1.22.0,<2.0.0dev", markers = "python_version < \"3.11\""}, +] +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" + +[[package]] +name = "google-cloud-bigquery-storage" +version = "2.22.0" +description = "Google Cloud Bigquery Storage API client library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-cloud-bigquery-storage-2.22.0.tar.gz", hash = "sha256:f6d8c7b3ab9b574c66977fcee9d336e334ad1a3843a722be19123640e7808ea3"}, + {file = "google_cloud_bigquery_storage-2.22.0-py2.py3-none-any.whl", hash = "sha256:7f11b2ae590a5b3874fb6ddf705a66a070340db238f971cf7b53349eee9ca317"}, +] + +[package.dependencies] +google-api-core = {version = ">=1.34.0,<2.0.dev0 || >=2.11.dev0,<3.0.0dev", extras = ["grpc"]} +proto-plus = [ + {version = ">=1.22.2,<2.0.0dev", markers = "python_version >= \"3.11\""}, + {version = ">=1.22.0,<2.0.0dev", markers = "python_version < \"3.11\""}, +] +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" + +[package.extras] +fastavro = ["fastavro (>=0.21.2)"] +pandas = ["pandas (>=0.21.1)"] +pyarrow = ["pyarrow (>=0.15.0)"] + +[[package]] +name = "google-cloud-core" +version = "2.3.3" +description = "Google Cloud API client core library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-cloud-core-2.3.3.tar.gz", hash = "sha256:37b80273c8d7eee1ae816b3a20ae43585ea50506cb0e60f3cf5be5f87f1373cb"}, + {file = "google_cloud_core-2.3.3-py2.py3-none-any.whl", hash = "sha256:fbd11cad3e98a7e5b0343dc07cb1039a5ffd7a5bb96e1f1e27cee4bda4a90863"}, +] + +[package.dependencies] +google-api-core = ">=1.31.6,<2.0.dev0 || >2.3.0,<3.0.0dev" +google-auth = ">=1.25.0,<3.0dev" + +[package.extras] +grpc = ["grpcio (>=1.38.0,<2.0dev)"] + +[[package]] +name = "google-cloud-storage" +version = "2.12.0" +description = "Google Cloud Storage API client library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-cloud-storage-2.12.0.tar.gz", hash = "sha256:57c0bcda2f5e11f008a155d8636d8381d5abab46b58e0cae0e46dd5e595e6b46"}, + {file = "google_cloud_storage-2.12.0-py2.py3-none-any.whl", hash = "sha256:bc52563439d42981b6e21b071a76da2791672776eda3ba99d13a8061ebbd6e5e"}, +] + +[package.dependencies] +google-api-core = ">=1.31.5,<2.0.dev0 || >2.3.0,<3.0.0dev" +google-auth = ">=2.23.3,<3.0dev" +google-cloud-core = ">=2.3.0,<3.0dev" +google-crc32c = ">=1.0,<2.0dev" +google-resumable-media = ">=2.6.0" +requests = ">=2.18.0,<3.0.0dev" + +[package.extras] +protobuf = ["protobuf (<5.0.0dev)"] + +[[package]] +name = "google-crc32c" +version = "1.5.0" +description = "A python wrapper of the C library 'Google CRC32C'" +optional = false +python-versions = ">=3.7" +files = [ + {file = "google-crc32c-1.5.0.tar.gz", hash = "sha256:89284716bc6a5a415d4eaa11b1726d2d60a0cd12aadf5439828353662ede9dd7"}, + {file = "google_crc32c-1.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:596d1f98fc70232fcb6590c439f43b350cb762fb5d61ce7b0e9db4539654cc13"}, + {file = "google_crc32c-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:be82c3c8cfb15b30f36768797a640e800513793d6ae1724aaaafe5bf86f8f346"}, + {file = "google_crc32c-1.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:461665ff58895f508e2866824a47bdee72497b091c730071f2b7575d5762ab65"}, + {file = "google_crc32c-1.5.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2096eddb4e7c7bdae4bd69ad364e55e07b8316653234a56552d9c988bd2d61b"}, + {file = "google_crc32c-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:116a7c3c616dd14a3de8c64a965828b197e5f2d121fedd2f8c5585c547e87b02"}, + {file = "google_crc32c-1.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5829b792bf5822fd0a6f6eb34c5f81dd074f01d570ed7f36aa101d6fc7a0a6e4"}, + {file = "google_crc32c-1.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:64e52e2b3970bd891309c113b54cf0e4384762c934d5ae56e283f9a0afcd953e"}, + {file = "google_crc32c-1.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:02ebb8bf46c13e36998aeaad1de9b48f4caf545e91d14041270d9dca767b780c"}, + {file = "google_crc32c-1.5.0-cp310-cp310-win32.whl", hash = "sha256:2e920d506ec85eb4ba50cd4228c2bec05642894d4c73c59b3a2fe20346bd00ee"}, + {file = "google_crc32c-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:07eb3c611ce363c51a933bf6bd7f8e3878a51d124acfc89452a75120bc436289"}, + {file = "google_crc32c-1.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:cae0274952c079886567f3f4f685bcaf5708f0a23a5f5216fdab71f81a6c0273"}, + {file = "google_crc32c-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1034d91442ead5a95b5aaef90dbfaca8633b0247d1e41621d1e9f9db88c36298"}, + {file = "google_crc32c-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7c42c70cd1d362284289c6273adda4c6af8039a8ae12dc451dcd61cdabb8ab57"}, + {file = "google_crc32c-1.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8485b340a6a9e76c62a7dce3c98e5f102c9219f4cfbf896a00cf48caf078d438"}, + {file = "google_crc32c-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77e2fd3057c9d78e225fa0a2160f96b64a824de17840351b26825b0848022906"}, + {file = "google_crc32c-1.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f583edb943cf2e09c60441b910d6a20b4d9d626c75a36c8fcac01a6c96c01183"}, + {file = "google_crc32c-1.5.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:a1fd716e7a01f8e717490fbe2e431d2905ab8aa598b9b12f8d10abebb36b04dd"}, + {file = "google_crc32c-1.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:72218785ce41b9cfd2fc1d6a017dc1ff7acfc4c17d01053265c41a2c0cc39b8c"}, + {file = "google_crc32c-1.5.0-cp311-cp311-win32.whl", hash = "sha256:66741ef4ee08ea0b2cc3c86916ab66b6aef03768525627fd6a1b34968b4e3709"}, + {file = "google_crc32c-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:ba1eb1843304b1e5537e1fca632fa894d6f6deca8d6389636ee5b4797affb968"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:98cb4d057f285bd80d8778ebc4fde6b4d509ac3f331758fb1528b733215443ae"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fd8536e902db7e365f49e7d9029283403974ccf29b13fc7028b97e2295b33556"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19e0a019d2c4dcc5e598cd4a4bc7b008546b0358bd322537c74ad47a5386884f"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02c65b9817512edc6a4ae7c7e987fea799d2e0ee40c53ec573a692bee24de876"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6ac08d24c1f16bd2bf5eca8eaf8304812f44af5cfe5062006ec676e7e1d50afc"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3359fc442a743e870f4588fcf5dcbc1bf929df1fad8fb9905cd94e5edb02e84c"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e986b206dae4476f41bcec1faa057851f3889503a70e1bdb2378d406223994a"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:de06adc872bcd8c2a4e0dc51250e9e65ef2ca91be023b9d13ebd67c2ba552e1e"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-win32.whl", hash = "sha256:d3515f198eaa2f0ed49f8819d5732d70698c3fa37384146079b3799b97667a94"}, + {file = "google_crc32c-1.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:67b741654b851abafb7bc625b6d1cdd520a379074e64b6a128e3b688c3c04740"}, + {file = "google_crc32c-1.5.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c02ec1c5856179f171e032a31d6f8bf84e5a75c45c33b2e20a3de353b266ebd8"}, + {file = "google_crc32c-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:edfedb64740750e1a3b16152620220f51d58ff1b4abceb339ca92e934775c27a"}, + {file = "google_crc32c-1.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:84e6e8cd997930fc66d5bb4fde61e2b62ba19d62b7abd7a69920406f9ecca946"}, + {file = "google_crc32c-1.5.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:024894d9d3cfbc5943f8f230e23950cd4906b2fe004c72e29b209420a1e6b05a"}, + {file = "google_crc32c-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:998679bf62b7fb599d2878aa3ed06b9ce688b8974893e7223c60db155f26bd8d"}, + {file = "google_crc32c-1.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:83c681c526a3439b5cf94f7420471705bbf96262f49a6fe546a6db5f687a3d4a"}, + {file = "google_crc32c-1.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4c6fdd4fccbec90cc8a01fc00773fcd5fa28db683c116ee3cb35cd5da9ef6c37"}, + {file = "google_crc32c-1.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5ae44e10a8e3407dbe138984f21e536583f2bba1be9491239f942c2464ac0894"}, + {file = "google_crc32c-1.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:37933ec6e693e51a5b07505bd05de57eee12f3e8c32b07da7e73669398e6630a"}, + {file = "google_crc32c-1.5.0-cp38-cp38-win32.whl", hash = "sha256:fe70e325aa68fa4b5edf7d1a4b6f691eb04bbccac0ace68e34820d283b5f80d4"}, + {file = "google_crc32c-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:74dea7751d98034887dbd821b7aae3e1d36eda111d6ca36c206c44478035709c"}, + {file = "google_crc32c-1.5.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c6c777a480337ac14f38564ac88ae82d4cd238bf293f0a22295b66eb89ffced7"}, + {file = "google_crc32c-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:759ce4851a4bb15ecabae28f4d2e18983c244eddd767f560165563bf9aefbc8d"}, + {file = "google_crc32c-1.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f13cae8cc389a440def0c8c52057f37359014ccbc9dc1f0827936bcd367c6100"}, + {file = "google_crc32c-1.5.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e560628513ed34759456a416bf86b54b2476c59144a9138165c9a1575801d0d9"}, + {file = "google_crc32c-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1674e4307fa3024fc897ca774e9c7562c957af85df55efe2988ed9056dc4e57"}, + {file = "google_crc32c-1.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:278d2ed7c16cfc075c91378c4f47924c0625f5fc84b2d50d921b18b7975bd210"}, + {file = "google_crc32c-1.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d5280312b9af0976231f9e317c20e4a61cd2f9629b7bfea6a693d1878a264ebd"}, + {file = "google_crc32c-1.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:8b87e1a59c38f275c0e3676fc2ab6d59eccecfd460be267ac360cc31f7bcde96"}, + {file = "google_crc32c-1.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7c074fece789b5034b9b1404a1f8208fc2d4c6ce9decdd16e8220c5a793e6f61"}, + {file = "google_crc32c-1.5.0-cp39-cp39-win32.whl", hash = "sha256:7f57f14606cd1dd0f0de396e1e53824c371e9544a822648cd76c034d209b559c"}, + {file = "google_crc32c-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:a2355cba1f4ad8b6988a4ca3feed5bff33f6af2d7f134852cf279c2aebfde541"}, + {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f314013e7dcd5cf45ab1945d92e713eec788166262ae8deb2cfacd53def27325"}, + {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b747a674c20a67343cb61d43fdd9207ce5da6a99f629c6e2541aa0e89215bcd"}, + {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8f24ed114432de109aa9fd317278518a5af2d31ac2ea6b952b2f7782b43da091"}, + {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8667b48e7a7ef66afba2c81e1094ef526388d35b873966d8a9a447974ed9178"}, + {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:1c7abdac90433b09bad6c43a43af253e688c9cfc1c86d332aed13f9a7c7f65e2"}, + {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:6f998db4e71b645350b9ac28a2167e6632c239963ca9da411523bb439c5c514d"}, + {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c99616c853bb585301df6de07ca2cadad344fd1ada6d62bb30aec05219c45d2"}, + {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2ad40e31093a4af319dadf503b2467ccdc8f67c72e4bcba97f8c10cb078207b5"}, + {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd67cf24a553339d5062eff51013780a00d6f97a39ca062781d06b3a73b15462"}, + {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:398af5e3ba9cf768787eef45c803ff9614cc3e22a5b2f7d7ae116df8b11e3314"}, + {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b1f8133c9a275df5613a451e73f36c2aea4fe13c5c8997e22cf355ebd7bd0728"}, + {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9ba053c5f50430a3fcfd36f75aff9caeba0440b2d076afdb79a318d6ca245f88"}, + {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:272d3892a1e1a2dbc39cc5cde96834c236d5327e2122d3aaa19f6614531bb6eb"}, + {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:635f5d4dd18758a1fbd1049a8e8d2fee4ffed124462d837d1a02a0e009c3ab31"}, + {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c672d99a345849301784604bfeaeba4db0c7aae50b95be04dd651fd2a7310b93"}, +] + +[package.extras] +testing = ["pytest"] + +[[package]] +name = "google-resumable-media" +version = "2.6.0" +description = "Utilities for Google Media Downloads and Resumable Uploads" +optional = false +python-versions = ">= 3.7" +files = [ + {file = "google-resumable-media-2.6.0.tar.gz", hash = "sha256:972852f6c65f933e15a4a210c2b96930763b47197cdf4aa5f5bea435efb626e7"}, + {file = "google_resumable_media-2.6.0-py2.py3-none-any.whl", hash = "sha256:fc03d344381970f79eebb632a3c18bb1828593a2dc5572b5f90115ef7d11e81b"}, +] + +[package.dependencies] +google-crc32c = ">=1.0,<2.0dev" + +[package.extras] +aiohttp = ["aiohttp (>=3.6.2,<4.0.0dev)", "google-auth (>=1.22.0,<2.0dev)"] +requests = ["requests (>=2.18.0,<3.0.0dev)"] + +[[package]] +name = "googleapis-common-protos" +version = "1.61.0" +description = "Common protobufs used in Google APIs" +optional = false +python-versions = ">=3.7" +files = [ + {file = "googleapis-common-protos-1.61.0.tar.gz", hash = "sha256:8a64866a97f6304a7179873a465d6eee97b7a24ec6cfd78e0f575e96b821240b"}, + {file = "googleapis_common_protos-1.61.0-py2.py3-none-any.whl", hash = "sha256:22f1915393bb3245343f6efe87f6fe868532efc12aa26b391b15132e1279f1c0"}, +] + +[package.dependencies] +grpcio = {version = ">=1.44.0,<2.0.0.dev0", optional = true, markers = "extra == \"grpc\""} +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0.dev0" + +[package.extras] +grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"] + +[[package]] +name = "gql" +version = "3.4.1" +description = "GraphQL client for Python" +optional = false +python-versions = "*" +files = [ + {file = "gql-3.4.1-py2.py3-none-any.whl", hash = "sha256:315624ca0f4d571ef149d455033ebd35e45c1a13f18a059596aeddcea99135cf"}, + {file = "gql-3.4.1.tar.gz", hash = "sha256:11dc5d8715a827f2c2899593439a4f36449db4f0eafa5b1ea63948f8a2f8c545"}, +] + +[package.dependencies] +backoff = ">=1.11.1,<3.0" +graphql-core = ">=3.2,<3.3" +yarl = ">=1.6,<2.0" + +[package.extras] +aiohttp = ["aiohttp (>=3.7.1,<3.9.0)"] +all = ["aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26,<2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] +botocore = ["botocore (>=1.21,<2)"] +dev = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "black (==22.3.0)", "botocore (>=1.21,<2)", "check-manifest (>=0.42,<1)", "flake8 (==3.8.1)", "isort (==4.3.21)", "mock (==4.0.2)", "mypy (==0.910)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "sphinx (>=3.0.0,<4)", "sphinx-argparse (==0.2.5)", "sphinx-rtd-theme (>=0.4,<1)", "types-aiofiles", "types-mock", "types-requests", "urllib3 (>=1.26,<2)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] +requests = ["requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26,<2)"] +test = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26,<2)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] +test-no-transport = ["aiofiles", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "vcrpy (==4.0.2)"] +websockets = ["websockets (>=10,<11)", "websockets (>=9,<10)"] + +[[package]] +name = "graphql-core" +version = "3.2.3" +description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." +optional = false +python-versions = ">=3.6,<4" +files = [ + {file = "graphql-core-3.2.3.tar.gz", hash = "sha256:06d2aad0ac723e35b1cb47885d3e5c45e956a53bc1b209a9fc5369007fe46676"}, + {file = "graphql_core-3.2.3-py3-none-any.whl", hash = "sha256:5766780452bd5ec8ba133f8bf287dc92713e3868ddd83aee4faab9fc3e303dc3"}, +] + +[[package]] +name = "grpc-google-iam-v1" +version = "0.12.6" +description = "IAM API client library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "grpc-google-iam-v1-0.12.6.tar.gz", hash = "sha256:2bc4b8fdf22115a65d751c9317329322602c39b7c86a289c9b72d228d960ef5f"}, + {file = "grpc_google_iam_v1-0.12.6-py2.py3-none-any.whl", hash = "sha256:5c10f3d8dc2d88678ab1a9b0cb5482735c5efee71e6c0cd59f872eef22913f5c"}, +] + +[package.dependencies] +googleapis-common-protos = {version = ">=1.56.0,<2.0.0dev", extras = ["grpc"]} +grpcio = ">=1.44.0,<2.0.0dev" +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" + +[[package]] +name = "grpcio" +version = "1.59.0" +description = "HTTP/2-based RPC framework" +optional = false +python-versions = ">=3.7" +files = [ + {file = "grpcio-1.59.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:225e5fa61c35eeaebb4e7491cd2d768cd8eb6ed00f2664fa83a58f29418b39fd"}, + {file = "grpcio-1.59.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:b95ec8ecc4f703f5caaa8d96e93e40c7f589bad299a2617bdb8becbcce525539"}, + {file = "grpcio-1.59.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:1a839ba86764cc48226f50b924216000c79779c563a301586a107bda9cbe9dcf"}, + {file = "grpcio-1.59.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f6cfe44a5d7c7d5f1017a7da1c8160304091ca5dc64a0f85bca0d63008c3137a"}, + {file = "grpcio-1.59.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0fcf53df684fcc0154b1e61f6b4a8c4cf5f49d98a63511e3f30966feff39cd0"}, + {file = "grpcio-1.59.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa66cac32861500f280bb60fe7d5b3e22d68c51e18e65367e38f8669b78cea3b"}, + {file = "grpcio-1.59.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8cd2d38c2d52f607d75a74143113174c36d8a416d9472415eab834f837580cf7"}, + {file = "grpcio-1.59.0-cp310-cp310-win32.whl", hash = "sha256:228b91ce454876d7eed74041aff24a8f04c0306b7250a2da99d35dd25e2a1211"}, + {file = "grpcio-1.59.0-cp310-cp310-win_amd64.whl", hash = "sha256:ca87ee6183421b7cea3544190061f6c1c3dfc959e0b57a5286b108511fd34ff4"}, + {file = "grpcio-1.59.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:c173a87d622ea074ce79be33b952f0b424fa92182063c3bda8625c11d3585d09"}, + {file = "grpcio-1.59.0-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:ec78aebb9b6771d6a1de7b6ca2f779a2f6113b9108d486e904bde323d51f5589"}, + {file = "grpcio-1.59.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:0b84445fa94d59e6806c10266b977f92fa997db3585f125d6b751af02ff8b9fe"}, + {file = "grpcio-1.59.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c251d22de8f9f5cca9ee47e4bade7c5c853e6e40743f47f5cc02288ee7a87252"}, + {file = "grpcio-1.59.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:956f0b7cb465a65de1bd90d5a7475b4dc55089b25042fe0f6c870707e9aabb1d"}, + {file = "grpcio-1.59.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:38da5310ef84e16d638ad89550b5b9424df508fd5c7b968b90eb9629ca9be4b9"}, + {file = "grpcio-1.59.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:63982150a7d598281fa1d7ffead6096e543ff8be189d3235dd2b5604f2c553e5"}, + {file = "grpcio-1.59.0-cp311-cp311-win32.whl", hash = "sha256:50eff97397e29eeee5df106ea1afce3ee134d567aa2c8e04fabab05c79d791a7"}, + {file = "grpcio-1.59.0-cp311-cp311-win_amd64.whl", hash = "sha256:15f03bd714f987d48ae57fe092cf81960ae36da4e520e729392a59a75cda4f29"}, + {file = "grpcio-1.59.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:f1feb034321ae2f718172d86b8276c03599846dc7bb1792ae370af02718f91c5"}, + {file = "grpcio-1.59.0-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:d09bd2a4e9f5a44d36bb8684f284835c14d30c22d8ec92ce796655af12163588"}, + {file = "grpcio-1.59.0-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:2f120d27051e4c59db2f267b71b833796770d3ea36ca712befa8c5fff5da6ebd"}, + {file = "grpcio-1.59.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba0ca727a173ee093f49ead932c051af463258b4b493b956a2c099696f38aa66"}, + {file = "grpcio-1.59.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5711c51e204dc52065f4a3327dca46e69636a0b76d3e98c2c28c4ccef9b04c52"}, + {file = "grpcio-1.59.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:d74f7d2d7c242a6af9d4d069552ec3669965b74fed6b92946e0e13b4168374f9"}, + {file = "grpcio-1.59.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3859917de234a0a2a52132489c4425a73669de9c458b01c9a83687f1f31b5b10"}, + {file = "grpcio-1.59.0-cp312-cp312-win32.whl", hash = "sha256:de2599985b7c1b4ce7526e15c969d66b93687571aa008ca749d6235d056b7205"}, + {file = "grpcio-1.59.0-cp312-cp312-win_amd64.whl", hash = "sha256:598f3530231cf10ae03f4ab92d48c3be1fee0c52213a1d5958df1a90957e6a88"}, + {file = "grpcio-1.59.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:b34c7a4c31841a2ea27246a05eed8a80c319bfc0d3e644412ec9ce437105ff6c"}, + {file = "grpcio-1.59.0-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:c4dfdb49f4997dc664f30116af2d34751b91aa031f8c8ee251ce4dcfc11277b0"}, + {file = "grpcio-1.59.0-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:61bc72a00ecc2b79d9695220b4d02e8ba53b702b42411397e831c9b0589f08a3"}, + {file = "grpcio-1.59.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f367e4b524cb319e50acbdea57bb63c3b717c5d561974ace0b065a648bb3bad3"}, + {file = "grpcio-1.59.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:849c47ef42424c86af069a9c5e691a765e304079755d5c29eff511263fad9c2a"}, + {file = "grpcio-1.59.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c0488c2b0528e6072010182075615620071371701733c63ab5be49140ed8f7f0"}, + {file = "grpcio-1.59.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:611d9aa0017fa386809bddcb76653a5ab18c264faf4d9ff35cb904d44745f575"}, + {file = "grpcio-1.59.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e5378785dce2b91eb2e5b857ec7602305a3b5cf78311767146464bfa365fc897"}, + {file = "grpcio-1.59.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:fe976910de34d21057bcb53b2c5e667843588b48bf11339da2a75f5c4c5b4055"}, + {file = "grpcio-1.59.0-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:c041a91712bf23b2a910f61e16565a05869e505dc5a5c025d429ca6de5de842c"}, + {file = "grpcio-1.59.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:0ae444221b2c16d8211b55326f8ba173ba8f8c76349bfc1768198ba592b58f74"}, + {file = "grpcio-1.59.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ceb1e68135788c3fce2211de86a7597591f0b9a0d2bb80e8401fd1d915991bac"}, + {file = "grpcio-1.59.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c4b1cc3a9dc1924d2eb26eec8792fedd4b3fcd10111e26c1d551f2e4eda79ce"}, + {file = "grpcio-1.59.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:871371ce0c0055d3db2a86fdebd1e1d647cf21a8912acc30052660297a5a6901"}, + {file = "grpcio-1.59.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:93e9cb546e610829e462147ce724a9cb108e61647a3454500438a6deef610be1"}, + {file = "grpcio-1.59.0-cp38-cp38-win32.whl", hash = "sha256:f21917aa50b40842b51aff2de6ebf9e2f6af3fe0971c31960ad6a3a2b24988f4"}, + {file = "grpcio-1.59.0-cp38-cp38-win_amd64.whl", hash = "sha256:14890da86a0c0e9dc1ea8e90101d7a3e0e7b1e71f4487fab36e2bfd2ecadd13c"}, + {file = "grpcio-1.59.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:34341d9e81a4b669a5f5dca3b2a760b6798e95cdda2b173e65d29d0b16692857"}, + {file = "grpcio-1.59.0-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:986de4aa75646e963466b386a8c5055c8b23a26a36a6c99052385d6fe8aaf180"}, + {file = "grpcio-1.59.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:aca8a24fef80bef73f83eb8153f5f5a0134d9539b4c436a716256b311dda90a6"}, + {file = "grpcio-1.59.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:936b2e04663660c600d5173bc2cc84e15adbad9c8f71946eb833b0afc205b996"}, + {file = "grpcio-1.59.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc8bf2e7bc725e76c0c11e474634a08c8f24bcf7426c0c6d60c8f9c6e70e4d4a"}, + {file = "grpcio-1.59.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:81d86a096ccd24a57fa5772a544c9e566218bc4de49e8c909882dae9d73392df"}, + {file = "grpcio-1.59.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2ea95cd6abbe20138b8df965b4a8674ec312aaef3147c0f46a0bac661f09e8d0"}, + {file = "grpcio-1.59.0-cp39-cp39-win32.whl", hash = "sha256:3b8ff795d35a93d1df6531f31c1502673d1cebeeba93d0f9bd74617381507e3f"}, + {file = "grpcio-1.59.0-cp39-cp39-win_amd64.whl", hash = "sha256:38823bd088c69f59966f594d087d3a929d1ef310506bee9e3648317660d65b81"}, + {file = "grpcio-1.59.0.tar.gz", hash = "sha256:acf70a63cf09dd494000007b798aff88a436e1c03b394995ce450be437b8e54f"}, +] + +[package.extras] +protobuf = ["grpcio-tools (>=1.59.0)"] + +[[package]] +name = "grpcio-status" +version = "1.59.0" +description = "Status proto mapping for gRPC" +optional = false +python-versions = ">=3.6" +files = [ + {file = "grpcio-status-1.59.0.tar.gz", hash = "sha256:f93b9c33e0a26162ef8431bfcffcc3e1fb217ccd8d7b5b3061b6e9f813e698b5"}, + {file = "grpcio_status-1.59.0-py3-none-any.whl", hash = "sha256:cb5a222b14a80ee050bff9676623822e953bff0c50d2d29180de723652fdf10d"}, +] + +[package.dependencies] +googleapis-common-protos = ">=1.5.5" +grpcio = ">=1.59.0" +protobuf = ">=4.21.6" + +[[package]] +name = "httplib2" +version = "0.22.0" +description = "A comprehensive HTTP client library." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "httplib2-0.22.0-py3-none-any.whl", hash = "sha256:14ae0a53c1ba8f3d37e9e27cf37eabb0fb9980f435ba405d546948b009dd64dc"}, + {file = "httplib2-0.22.0.tar.gz", hash = "sha256:d7a10bc5ef5ab08322488bde8c726eeee5c8618723fdb399597ec58f3d82df81"}, +] + +[package.dependencies] +pyparsing = {version = ">=2.4.2,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.0.2 || >3.0.2,<3.0.3 || >3.0.3,<4", markers = "python_version > \"3.0\""} + +[[package]] +name = "idna" +version = "3.4" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] + +[[package]] +name = "loguru" +version = "0.7.0" +description = "Python logging made (stupidly) simple" +optional = false +python-versions = ">=3.5" +files = [ + {file = "loguru-0.7.0-py3-none-any.whl", hash = "sha256:b93aa30099fa6860d4727f1b81f8718e965bb96253fa190fab2077aaad6d15d3"}, + {file = "loguru-0.7.0.tar.gz", hash = "sha256:1612053ced6ae84d7959dd7d5e431a0532642237ec21f7fd83ac73fe539e03e1"}, +] + +[package.dependencies] +colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} +win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} + +[package.extras] +dev = ["Sphinx (==5.3.0)", "colorama (==0.4.5)", "colorama (==0.4.6)", "freezegun (==1.1.0)", "freezegun (==1.2.2)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v0.990)", "pre-commit (==3.2.1)", "pytest (==6.1.2)", "pytest (==7.2.1)", "pytest-cov (==2.12.1)", "pytest-cov (==4.0.0)", "pytest-mypy-plugins (==1.10.1)", "pytest-mypy-plugins (==1.9.3)", "sphinx-autobuild (==2021.3.14)", "sphinx-rtd-theme (==1.2.0)", "tox (==3.27.1)", "tox (==4.4.6)"] + +[[package]] +name = "multidict" +version = "6.0.4" +description = "multidict implementation" +optional = false +python-versions = ">=3.7" +files = [ + {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8"}, + {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171"}, + {file = "multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5"}, + {file = "multidict-6.0.4-cp310-cp310-win32.whl", hash = "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8"}, + {file = "multidict-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc"}, + {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03"}, + {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3"}, + {file = "multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461"}, + {file = "multidict-6.0.4-cp311-cp311-win32.whl", hash = "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636"}, + {file = "multidict-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0"}, + {file = "multidict-6.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d"}, + {file = "multidict-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775"}, + {file = "multidict-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e"}, + {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c"}, + {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161"}, + {file = "multidict-6.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1"}, + {file = "multidict-6.0.4-cp38-cp38-win32.whl", hash = "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779"}, + {file = "multidict-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480"}, + {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664"}, + {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35"}, + {file = "multidict-6.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95"}, + {file = "multidict-6.0.4-cp39-cp39-win32.whl", hash = "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313"}, + {file = "multidict-6.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2"}, + {file = "multidict-6.0.4.tar.gz", hash = "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49"}, +] + +[[package]] +name = "numpy" +version = "1.25.2" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "numpy-1.25.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:db3ccc4e37a6873045580d413fe79b68e47a681af8db2e046f1dacfa11f86eb3"}, + {file = "numpy-1.25.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:90319e4f002795ccfc9050110bbbaa16c944b1c37c0baeea43c5fb881693ae1f"}, + {file = "numpy-1.25.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dfe4a913e29b418d096e696ddd422d8a5d13ffba4ea91f9f60440a3b759b0187"}, + {file = "numpy-1.25.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f08f2e037bba04e707eebf4bc934f1972a315c883a9e0ebfa8a7756eabf9e357"}, + {file = "numpy-1.25.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bec1e7213c7cb00d67093247f8c4db156fd03075f49876957dca4711306d39c9"}, + {file = "numpy-1.25.2-cp310-cp310-win32.whl", hash = "sha256:7dc869c0c75988e1c693d0e2d5b26034644399dd929bc049db55395b1379e044"}, + {file = "numpy-1.25.2-cp310-cp310-win_amd64.whl", hash = "sha256:834b386f2b8210dca38c71a6e0f4fd6922f7d3fcff935dbe3a570945acb1b545"}, + {file = "numpy-1.25.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c5462d19336db4560041517dbb7759c21d181a67cb01b36ca109b2ae37d32418"}, + {file = "numpy-1.25.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c5652ea24d33585ea39eb6a6a15dac87a1206a692719ff45d53c5282e66d4a8f"}, + {file = "numpy-1.25.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d60fbae8e0019865fc4784745814cff1c421df5afee233db6d88ab4f14655a2"}, + {file = "numpy-1.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60e7f0f7f6d0eee8364b9a6304c2845b9c491ac706048c7e8cf47b83123b8dbf"}, + {file = "numpy-1.25.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bb33d5a1cf360304754913a350edda36d5b8c5331a8237268c48f91253c3a364"}, + {file = "numpy-1.25.2-cp311-cp311-win32.whl", hash = "sha256:5883c06bb92f2e6c8181df7b39971a5fb436288db58b5a1c3967702d4278691d"}, + {file = "numpy-1.25.2-cp311-cp311-win_amd64.whl", hash = "sha256:5c97325a0ba6f9d041feb9390924614b60b99209a71a69c876f71052521d42a4"}, + {file = "numpy-1.25.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b79e513d7aac42ae918db3ad1341a015488530d0bb2a6abcbdd10a3a829ccfd3"}, + {file = "numpy-1.25.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:eb942bfb6f84df5ce05dbf4b46673ffed0d3da59f13635ea9b926af3deb76926"}, + {file = "numpy-1.25.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e0746410e73384e70d286f93abf2520035250aad8c5714240b0492a7302fdca"}, + {file = "numpy-1.25.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7806500e4f5bdd04095e849265e55de20d8cc4b661b038957354327f6d9b295"}, + {file = "numpy-1.25.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8b77775f4b7df768967a7c8b3567e309f617dd5e99aeb886fa14dc1a0791141f"}, + {file = "numpy-1.25.2-cp39-cp39-win32.whl", hash = "sha256:2792d23d62ec51e50ce4d4b7d73de8f67a2fd3ea710dcbc8563a51a03fb07b01"}, + {file = "numpy-1.25.2-cp39-cp39-win_amd64.whl", hash = "sha256:76b4115d42a7dfc5d485d358728cdd8719be33cc5ec6ec08632a5d6fca2ed380"}, + {file = "numpy-1.25.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:1a1329e26f46230bf77b02cc19e900db9b52f398d6722ca853349a782d4cff55"}, + {file = "numpy-1.25.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c3abc71e8b6edba80a01a52e66d83c5d14433cbcd26a40c329ec7ed09f37901"}, + {file = "numpy-1.25.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:1b9735c27cea5d995496f46a8b1cd7b408b3f34b6d50459d9ac8fe3a20cc17bf"}, + {file = "numpy-1.25.2.tar.gz", hash = "sha256:fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760"}, +] + +[[package]] +name = "numpy" +version = "1.26.1" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = "<3.13,>=3.9" +files = [ + {file = "numpy-1.26.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82e871307a6331b5f09efda3c22e03c095d957f04bf6bc1804f30048d0e5e7af"}, + {file = "numpy-1.26.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdd9ec98f0063d93baeb01aad472a1a0840dee302842a2746a7a8e92968f9575"}, + {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d78f269e0c4fd365fc2992c00353e4530d274ba68f15e968d8bc3c69ce5f5244"}, + {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ab9163ca8aeb7fd32fe93866490654d2f7dda4e61bc6297bf72ce07fdc02f67"}, + {file = "numpy-1.26.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:78ca54b2f9daffa5f323f34cdf21e1d9779a54073f0018a3094ab907938331a2"}, + {file = "numpy-1.26.1-cp310-cp310-win32.whl", hash = "sha256:d1cfc92db6af1fd37a7bb58e55c8383b4aa1ba23d012bdbba26b4bcca45ac297"}, + {file = "numpy-1.26.1-cp310-cp310-win_amd64.whl", hash = "sha256:d2984cb6caaf05294b8466966627e80bf6c7afd273279077679cb010acb0e5ab"}, + {file = "numpy-1.26.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cd7837b2b734ca72959a1caf3309457a318c934abef7a43a14bb984e574bbb9a"}, + {file = "numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c59c046c31a43310ad0199d6299e59f57a289e22f0f36951ced1c9eac3665b9"}, + {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d58e8c51a7cf43090d124d5073bc29ab2755822181fcad978b12e144e5e5a4b3"}, + {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6081aed64714a18c72b168a9276095ef9155dd7888b9e74b5987808f0dd0a974"}, + {file = "numpy-1.26.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:97e5d6a9f0702c2863aaabf19f0d1b6c2628fbe476438ce0b5ce06e83085064c"}, + {file = "numpy-1.26.1-cp311-cp311-win32.whl", hash = "sha256:b9d45d1dbb9de84894cc50efece5b09939752a2d75aab3a8b0cef6f3a35ecd6b"}, + {file = "numpy-1.26.1-cp311-cp311-win_amd64.whl", hash = "sha256:3649d566e2fc067597125428db15d60eb42a4e0897fc48d28cb75dc2e0454e53"}, + {file = "numpy-1.26.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1d1bd82d539607951cac963388534da3b7ea0e18b149a53cf883d8f699178c0f"}, + {file = "numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:afd5ced4e5a96dac6725daeb5242a35494243f2239244fad10a90ce58b071d24"}, + {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a03fb25610ef560a6201ff06df4f8105292ba56e7cdd196ea350d123fc32e24e"}, + {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcfaf015b79d1f9f9c9fd0731a907407dc3e45769262d657d754c3a028586124"}, + {file = "numpy-1.26.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e509cbc488c735b43b5ffea175235cec24bbc57b227ef1acc691725beb230d1c"}, + {file = "numpy-1.26.1-cp312-cp312-win32.whl", hash = "sha256:af22f3d8e228d84d1c0c44c1fbdeb80f97a15a0abe4f080960393a00db733b66"}, + {file = "numpy-1.26.1-cp312-cp312-win_amd64.whl", hash = "sha256:9f42284ebf91bdf32fafac29d29d4c07e5e9d1af862ea73686581773ef9e73a7"}, + {file = "numpy-1.26.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bb894accfd16b867d8643fc2ba6c8617c78ba2828051e9a69511644ce86ce83e"}, + {file = "numpy-1.26.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e44ccb93f30c75dfc0c3aa3ce38f33486a75ec9abadabd4e59f114994a9c4617"}, + {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9696aa2e35cc41e398a6d42d147cf326f8f9d81befcb399bc1ed7ffea339b64e"}, + {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5b411040beead47a228bde3b2241100454a6abde9df139ed087bd73fc0a4908"}, + {file = "numpy-1.26.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1e11668d6f756ca5ef534b5be8653d16c5352cbb210a5c2a79ff288e937010d5"}, + {file = "numpy-1.26.1-cp39-cp39-win32.whl", hash = "sha256:d1d2c6b7dd618c41e202c59c1413ef9b2c8e8a15f5039e344af64195459e3104"}, + {file = "numpy-1.26.1-cp39-cp39-win_amd64.whl", hash = "sha256:59227c981d43425ca5e5c01094d59eb14e8772ce6975d4b2fc1e106a833d5ae2"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:06934e1a22c54636a059215d6da99e23286424f316fddd979f5071093b648668"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76ff661a867d9272cd2a99eed002470f46dbe0943a5ffd140f49be84f68ffc42"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:6965888d65d2848e8768824ca8288db0a81263c1efccec881cb35a0d805fcd2f"}, + {file = "numpy-1.26.1.tar.gz", hash = "sha256:c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe"}, +] + +[[package]] +name = "oauthlib" +version = "3.2.2" +description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" +optional = false +python-versions = ">=3.6" +files = [ + {file = "oauthlib-3.2.2-py3-none-any.whl", hash = "sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca"}, + {file = "oauthlib-3.2.2.tar.gz", hash = "sha256:9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918"}, +] + +[package.extras] +rsa = ["cryptography (>=3.0.0)"] +signals = ["blinker (>=1.4.0)"] +signedtoken = ["cryptography (>=3.0.0)", "pyjwt (>=2.0.0,<3)"] + +[[package]] +name = "packaging" +version = "23.2" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, +] + +[[package]] +name = "pandas" +version = "2.1.0" +description = "Powerful data structures for data analysis, time series, and statistics" +optional = false +python-versions = ">=3.9" +files = [ + {file = "pandas-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:40dd20439ff94f1b2ed55b393ecee9cb6f3b08104c2c40b0cb7186a2f0046242"}, + {file = "pandas-2.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d4f38e4fedeba580285eaac7ede4f686c6701a9e618d8a857b138a126d067f2f"}, + {file = "pandas-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e6a0fe052cf27ceb29be9429428b4918f3740e37ff185658f40d8702f0b3e09"}, + {file = "pandas-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d81e1813191070440d4c7a413cb673052b3b4a984ffd86b8dd468c45742d3cc"}, + {file = "pandas-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:eb20252720b1cc1b7d0b2879ffc7e0542dd568f24d7c4b2347cb035206936421"}, + {file = "pandas-2.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:38f74ef7ebc0ffb43b3d633e23d74882bce7e27bfa09607f3c5d3e03ffd9a4a5"}, + {file = "pandas-2.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cda72cc8c4761c8f1d97b169661f23a86b16fdb240bdc341173aee17e4d6cedd"}, + {file = "pandas-2.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d97daeac0db8c993420b10da4f5f5b39b01fc9ca689a17844e07c0a35ac96b4b"}, + {file = "pandas-2.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8c58b1113892e0c8078f006a167cc210a92bdae23322bb4614f2f0b7a4b510f"}, + {file = "pandas-2.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:629124923bcf798965b054a540f9ccdfd60f71361255c81fa1ecd94a904b9dd3"}, + {file = "pandas-2.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:70cf866af3ab346a10debba8ea78077cf3a8cd14bd5e4bed3d41555a3280041c"}, + {file = "pandas-2.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:d53c8c1001f6a192ff1de1efe03b31a423d0eee2e9e855e69d004308e046e694"}, + {file = "pandas-2.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:86f100b3876b8c6d1a2c66207288ead435dc71041ee4aea789e55ef0e06408cb"}, + {file = "pandas-2.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28f330845ad21c11db51e02d8d69acc9035edfd1116926ff7245c7215db57957"}, + {file = "pandas-2.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9a6ccf0963db88f9b12df6720e55f337447aea217f426a22d71f4213a3099a6"}, + {file = "pandas-2.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d99e678180bc59b0c9443314297bddce4ad35727a1a2656dbe585fd78710b3b9"}, + {file = "pandas-2.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b31da36d376d50a1a492efb18097b9101bdbd8b3fbb3f49006e02d4495d4c644"}, + {file = "pandas-2.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:0164b85937707ec7f70b34a6c3a578dbf0f50787f910f21ca3b26a7fd3363437"}, + {file = "pandas-2.1.0.tar.gz", hash = "sha256:62c24c7fc59e42b775ce0679cfa7b14a5f9bfb7643cfbe708c960699e05fb918"}, +] + +[package.dependencies] +numpy = {version = ">=1.23.2", markers = "python_version >= \"3.11\""} +python-dateutil = ">=2.8.2" +pytz = ">=2020.1" +tzdata = ">=2022.1" + +[package.extras] +all = ["PyQt5 (>=5.15.6)", "SQLAlchemy (>=1.4.36)", "beautifulsoup4 (>=4.11.1)", "bottleneck (>=1.3.4)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=0.8.1)", "fsspec (>=2022.05.0)", "gcsfs (>=2022.05.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.8.0)", "matplotlib (>=3.6.1)", "numba (>=0.55.2)", "numexpr (>=2.8.0)", "odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pandas-gbq (>=0.17.5)", "psycopg2 (>=2.9.3)", "pyarrow (>=7.0.0)", "pymysql (>=1.0.2)", "pyreadstat (>=1.1.5)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)", "pyxlsb (>=1.0.9)", "qtpy (>=2.2.0)", "s3fs (>=2022.05.0)", "scipy (>=1.8.1)", "tables (>=3.7.0)", "tabulate (>=0.8.10)", "xarray (>=2022.03.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)", "zstandard (>=0.17.0)"] +aws = ["s3fs (>=2022.05.0)"] +clipboard = ["PyQt5 (>=5.15.6)", "qtpy (>=2.2.0)"] +compression = ["zstandard (>=0.17.0)"] +computation = ["scipy (>=1.8.1)", "xarray (>=2022.03.0)"] +consortium-standard = ["dataframe-api-compat (>=0.1.7)"] +excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pyxlsb (>=1.0.9)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)"] +feather = ["pyarrow (>=7.0.0)"] +fss = ["fsspec (>=2022.05.0)"] +gcp = ["gcsfs (>=2022.05.0)", "pandas-gbq (>=0.17.5)"] +hdf5 = ["tables (>=3.7.0)"] +html = ["beautifulsoup4 (>=4.11.1)", "html5lib (>=1.1)", "lxml (>=4.8.0)"] +mysql = ["SQLAlchemy (>=1.4.36)", "pymysql (>=1.0.2)"] +output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.8.10)"] +parquet = ["pyarrow (>=7.0.0)"] +performance = ["bottleneck (>=1.3.4)", "numba (>=0.55.2)", "numexpr (>=2.8.0)"] +plot = ["matplotlib (>=3.6.1)"] +postgresql = ["SQLAlchemy (>=1.4.36)", "psycopg2 (>=2.9.3)"] +spss = ["pyreadstat (>=1.1.5)"] +sql-other = ["SQLAlchemy (>=1.4.36)"] +test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)"] +xml = ["lxml (>=4.8.0)"] + +[[package]] +name = "pandas" +version = "2.1.1" +description = "Powerful data structures for data analysis, time series, and statistics" +optional = false +python-versions = ">=3.9" +files = [ + {file = "pandas-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:58d997dbee0d4b64f3cb881a24f918b5f25dd64ddf31f467bb9b67ae4c63a1e4"}, + {file = "pandas-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02304e11582c5d090e5a52aec726f31fe3f42895d6bfc1f28738f9b64b6f0614"}, + {file = "pandas-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffa8f0966de2c22de408d0e322db2faed6f6e74265aa0856f3824813cf124363"}, + {file = "pandas-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1f84c144dee086fe4f04a472b5cd51e680f061adf75c1ae4fc3a9275560f8f4"}, + {file = "pandas-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:75ce97667d06d69396d72be074f0556698c7f662029322027c226fd7a26965cb"}, + {file = "pandas-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:4c3f32fd7c4dccd035f71734df39231ac1a6ff95e8bdab8d891167197b7018d2"}, + {file = "pandas-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9e2959720b70e106bb1d8b6eadd8ecd7c8e99ccdbe03ee03260877184bb2877d"}, + {file = "pandas-2.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:25e8474a8eb258e391e30c288eecec565bfed3e026f312b0cbd709a63906b6f8"}, + {file = "pandas-2.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b8bd1685556f3374520466998929bade3076aeae77c3e67ada5ed2b90b4de7f0"}, + {file = "pandas-2.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc3657869c7902810f32bd072f0740487f9e030c1a3ab03e0af093db35a9d14e"}, + {file = "pandas-2.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:05674536bd477af36aa2effd4ec8f71b92234ce0cc174de34fd21e2ee99adbc2"}, + {file = "pandas-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:b407381258a667df49d58a1b637be33e514b07f9285feb27769cedb3ab3d0b3a"}, + {file = "pandas-2.1.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c747793c4e9dcece7bb20156179529898abf505fe32cb40c4052107a3c620b49"}, + {file = "pandas-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3bcad1e6fb34b727b016775bea407311f7721db87e5b409e6542f4546a4951ea"}, + {file = "pandas-2.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5ec7740f9ccb90aec64edd71434711f58ee0ea7f5ed4ac48be11cfa9abf7317"}, + {file = "pandas-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:29deb61de5a8a93bdd033df328441a79fcf8dd3c12d5ed0b41a395eef9cd76f0"}, + {file = "pandas-2.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4f99bebf19b7e03cf80a4e770a3e65eee9dd4e2679039f542d7c1ace7b7b1daa"}, + {file = "pandas-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:84e7e910096416adec68075dc87b986ff202920fb8704e6d9c8c9897fe7332d6"}, + {file = "pandas-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:366da7b0e540d1b908886d4feb3d951f2f1e572e655c1160f5fde28ad4abb750"}, + {file = "pandas-2.1.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9e50e72b667415a816ac27dfcfe686dc5a0b02202e06196b943d54c4f9c7693e"}, + {file = "pandas-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc1ab6a25da197f03ebe6d8fa17273126120874386b4ac11c1d687df288542dd"}, + {file = "pandas-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0dbfea0dd3901ad4ce2306575c54348d98499c95be01b8d885a2737fe4d7a98"}, + {file = "pandas-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0489b0e6aa3d907e909aef92975edae89b1ee1654db5eafb9be633b0124abe97"}, + {file = "pandas-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:4cdb0fab0400c2cb46dafcf1a0fe084c8bb2480a1fa8d81e19d15e12e6d4ded2"}, + {file = "pandas-2.1.1.tar.gz", hash = "sha256:fecb198dc389429be557cde50a2d46da8434a17fe37d7d41ff102e3987fd947b"}, +] + +[package.dependencies] +numpy = [ + {version = ">=1.23.2", markers = "python_version == \"3.11\""}, + {version = ">=1.22.4", markers = "python_version < \"3.11\""}, +] +python-dateutil = ">=2.8.2" +pytz = ">=2020.1" +tzdata = ">=2022.1" + +[package.extras] +all = ["PyQt5 (>=5.15.6)", "SQLAlchemy (>=1.4.36)", "beautifulsoup4 (>=4.11.1)", "bottleneck (>=1.3.4)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=0.8.1)", "fsspec (>=2022.05.0)", "gcsfs (>=2022.05.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.8.0)", "matplotlib (>=3.6.1)", "numba (>=0.55.2)", "numexpr (>=2.8.0)", "odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pandas-gbq (>=0.17.5)", "psycopg2 (>=2.9.3)", "pyarrow (>=7.0.0)", "pymysql (>=1.0.2)", "pyreadstat (>=1.1.5)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)", "pyxlsb (>=1.0.9)", "qtpy (>=2.2.0)", "s3fs (>=2022.05.0)", "scipy (>=1.8.1)", "tables (>=3.7.0)", "tabulate (>=0.8.10)", "xarray (>=2022.03.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)", "zstandard (>=0.17.0)"] +aws = ["s3fs (>=2022.05.0)"] +clipboard = ["PyQt5 (>=5.15.6)", "qtpy (>=2.2.0)"] +compression = ["zstandard (>=0.17.0)"] +computation = ["scipy (>=1.8.1)", "xarray (>=2022.03.0)"] +consortium-standard = ["dataframe-api-compat (>=0.1.7)"] +excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pyxlsb (>=1.0.9)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)"] +feather = ["pyarrow (>=7.0.0)"] +fss = ["fsspec (>=2022.05.0)"] +gcp = ["gcsfs (>=2022.05.0)", "pandas-gbq (>=0.17.5)"] +hdf5 = ["tables (>=3.7.0)"] +html = ["beautifulsoup4 (>=4.11.1)", "html5lib (>=1.1)", "lxml (>=4.8.0)"] +mysql = ["SQLAlchemy (>=1.4.36)", "pymysql (>=1.0.2)"] +output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.8.10)"] +parquet = ["pyarrow (>=7.0.0)"] +performance = ["bottleneck (>=1.3.4)", "numba (>=0.55.2)", "numexpr (>=2.8.0)"] +plot = ["matplotlib (>=3.6.1)"] +postgresql = ["SQLAlchemy (>=1.4.36)", "psycopg2 (>=2.9.3)"] +spss = ["pyreadstat (>=1.1.5)"] +sql-other = ["SQLAlchemy (>=1.4.36)"] +test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)"] +xml = ["lxml (>=4.8.0)"] + +[[package]] +name = "pandas-gbq" +version = "0.19.2" +description = "Google BigQuery connector for pandas" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pandas-gbq-0.19.2.tar.gz", hash = "sha256:b0f7fa84a2be0fe767e33a008ca7e4ad9a9e3ac67255fd0a41fc19b503138447"}, + {file = "pandas_gbq-0.19.2-py2.py3-none-any.whl", hash = "sha256:0ef8da3e4088053a2bea069ed688992a44b52af67dadb97eee494b32a2147563"}, +] + +[package.dependencies] +db-dtypes = ">=1.0.4,<2.0.0" +google-api-core = ">=2.10.2,<3.0.0dev" +google-auth = ">=2.13.0" +google-auth-oauthlib = ">=0.7.0" +google-cloud-bigquery = ">=3.3.5,<4.0.0dev" +google-cloud-bigquery-storage = ">=2.16.2,<3.0.0dev" +numpy = ">=1.16.6" +pandas = ">=1.1.4" +pyarrow = ">=3.0.0" +pydata-google-auth = ">=1.5.0" +setuptools = "*" + +[package.extras] +tqdm = ["tqdm (>=4.23.0)"] + +[[package]] +name = "proto-plus" +version = "1.22.3" +description = "Beautiful, Pythonic protocol buffers." +optional = false +python-versions = ">=3.6" +files = [ + {file = "proto-plus-1.22.3.tar.gz", hash = "sha256:fdcd09713cbd42480740d2fe29c990f7fbd885a67efc328aa8be6ee3e9f76a6b"}, + {file = "proto_plus-1.22.3-py3-none-any.whl", hash = "sha256:a49cd903bc0b6ab41f76bf65510439d56ca76f868adf0274e738bfdd096894df"}, +] + +[package.dependencies] +protobuf = ">=3.19.0,<5.0.0dev" + +[package.extras] +testing = ["google-api-core[grpc] (>=1.31.5)"] + +[[package]] +name = "protobuf" +version = "4.24.4" +description = "" +optional = false +python-versions = ">=3.7" +files = [ + {file = "protobuf-4.24.4-cp310-abi3-win32.whl", hash = "sha256:ec9912d5cb6714a5710e28e592ee1093d68c5ebfeda61983b3f40331da0b1ebb"}, + {file = "protobuf-4.24.4-cp310-abi3-win_amd64.whl", hash = "sha256:1badab72aa8a3a2b812eacfede5020472e16c6b2212d737cefd685884c191085"}, + {file = "protobuf-4.24.4-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:8e61a27f362369c2f33248a0ff6896c20dcd47b5d48239cb9720134bef6082e4"}, + {file = "protobuf-4.24.4-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:bffa46ad9612e6779d0e51ae586fde768339b791a50610d85eb162daeb23661e"}, + {file = "protobuf-4.24.4-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:b493cb590960ff863743b9ff1452c413c2ee12b782f48beca77c8da3e2ffe9d9"}, + {file = "protobuf-4.24.4-cp37-cp37m-win32.whl", hash = "sha256:dbbed8a56e56cee8d9d522ce844a1379a72a70f453bde6243e3c86c30c2a3d46"}, + {file = "protobuf-4.24.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6b7d2e1c753715dcfe9d284a25a52d67818dd43c4932574307daf836f0071e37"}, + {file = "protobuf-4.24.4-cp38-cp38-win32.whl", hash = "sha256:02212557a76cd99574775a81fefeba8738d0f668d6abd0c6b1d3adcc75503dbe"}, + {file = "protobuf-4.24.4-cp38-cp38-win_amd64.whl", hash = "sha256:2fa3886dfaae6b4c5ed2730d3bf47c7a38a72b3a1f0acb4d4caf68e6874b947b"}, + {file = "protobuf-4.24.4-cp39-cp39-win32.whl", hash = "sha256:b77272f3e28bb416e2071186cb39efd4abbf696d682cbb5dc731308ad37fa6dd"}, + {file = "protobuf-4.24.4-cp39-cp39-win_amd64.whl", hash = "sha256:9fee5e8aa20ef1b84123bb9232b3f4a5114d9897ed89b4b8142d81924e05d79b"}, + {file = "protobuf-4.24.4-py3-none-any.whl", hash = "sha256:80797ce7424f8c8d2f2547e2d42bfbb6c08230ce5832d6c099a37335c9c90a92"}, + {file = "protobuf-4.24.4.tar.gz", hash = "sha256:5a70731910cd9104762161719c3d883c960151eea077134458503723b60e3667"}, +] + +[[package]] +name = "pyarrow" +version = "13.0.0" +description = "Python library for Apache Arrow" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pyarrow-13.0.0-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:1afcc2c33f31f6fb25c92d50a86b7a9f076d38acbcb6f9e74349636109550148"}, + {file = "pyarrow-13.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:70fa38cdc66b2fc1349a082987f2b499d51d072faaa6b600f71931150de2e0e3"}, + {file = "pyarrow-13.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd57b13a6466822498238877892a9b287b0a58c2e81e4bdb0b596dbb151cbb73"}, + {file = "pyarrow-13.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8ce69f7bf01de2e2764e14df45b8404fc6f1a5ed9871e8e08a12169f87b7a26"}, + {file = "pyarrow-13.0.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:588f0d2da6cf1b1680974d63be09a6530fd1bd825dc87f76e162404779a157dc"}, + {file = "pyarrow-13.0.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:6241afd72b628787b4abea39e238e3ff9f34165273fad306c7acf780dd850956"}, + {file = "pyarrow-13.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:fda7857e35993673fcda603c07d43889fca60a5b254052a462653f8656c64f44"}, + {file = "pyarrow-13.0.0-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:aac0ae0146a9bfa5e12d87dda89d9ef7c57a96210b899459fc2f785303dcbb67"}, + {file = "pyarrow-13.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d7759994217c86c161c6a8060509cfdf782b952163569606bb373828afdd82e8"}, + {file = "pyarrow-13.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:868a073fd0ff6468ae7d869b5fc1f54de5c4255b37f44fb890385eb68b68f95d"}, + {file = "pyarrow-13.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51be67e29f3cfcde263a113c28e96aa04362ed8229cb7c6e5f5c719003659d33"}, + {file = "pyarrow-13.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:d1b4e7176443d12610874bb84d0060bf080f000ea9ed7c84b2801df851320295"}, + {file = "pyarrow-13.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:69b6f9a089d116a82c3ed819eea8fe67dae6105f0d81eaf0fdd5e60d0c6e0944"}, + {file = "pyarrow-13.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:ab1268db81aeb241200e321e220e7cd769762f386f92f61b898352dd27e402ce"}, + {file = "pyarrow-13.0.0-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:ee7490f0f3f16a6c38f8c680949551053c8194e68de5046e6c288e396dccee80"}, + {file = "pyarrow-13.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3ad79455c197a36eefbd90ad4aa832bece7f830a64396c15c61a0985e337287"}, + {file = "pyarrow-13.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68fcd2dc1b7d9310b29a15949cdd0cb9bc34b6de767aff979ebf546020bf0ba0"}, + {file = "pyarrow-13.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc6fd330fd574c51d10638e63c0d00ab456498fc804c9d01f2a61b9264f2c5b2"}, + {file = "pyarrow-13.0.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:e66442e084979a97bb66939e18f7b8709e4ac5f887e636aba29486ffbf373763"}, + {file = "pyarrow-13.0.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:0f6eff839a9e40e9c5610d3ff8c5bdd2f10303408312caf4c8003285d0b49565"}, + {file = "pyarrow-13.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b30a27f1cddf5c6efcb67e598d7823a1e253d743d92ac32ec1eb4b6a1417867"}, + {file = "pyarrow-13.0.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:09552dad5cf3de2dc0aba1c7c4b470754c69bd821f5faafc3d774bedc3b04bb7"}, + {file = "pyarrow-13.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3896ae6c205d73ad192d2fc1489cd0edfab9f12867c85b4c277af4d37383c18c"}, + {file = "pyarrow-13.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6647444b21cb5e68b593b970b2a9a07748dd74ea457c7dadaa15fd469c48ada1"}, + {file = "pyarrow-13.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47663efc9c395e31d09c6aacfa860f4473815ad6804311c5433f7085415d62a7"}, + {file = "pyarrow-13.0.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:b9ba6b6d34bd2563345488cf444510588ea42ad5613df3b3509f48eb80250afd"}, + {file = "pyarrow-13.0.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:d00d374a5625beeb448a7fa23060df79adb596074beb3ddc1838adb647b6ef09"}, + {file = "pyarrow-13.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:c51afd87c35c8331b56f796eff954b9c7f8d4b7fef5903daf4e05fcf017d23a8"}, + {file = "pyarrow-13.0.0.tar.gz", hash = "sha256:83333726e83ed44b0ac94d8d7a21bbdee4a05029c3b1e8db58a863eec8fd8a33"}, +] + +[package.dependencies] +numpy = ">=1.16.6" + +[[package]] +name = "pyasn1" +version = "0.5.0" +description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +files = [ + {file = "pyasn1-0.5.0-py2.py3-none-any.whl", hash = "sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57"}, + {file = "pyasn1-0.5.0.tar.gz", hash = "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"}, +] + +[[package]] +name = "pyasn1-modules" +version = "0.3.0" +description = "A collection of ASN.1-based protocols modules" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +files = [ + {file = "pyasn1_modules-0.3.0-py2.py3-none-any.whl", hash = "sha256:d3ccd6ed470d9ffbc716be08bd90efbd44d0734bc9303818f7336070984a162d"}, + {file = "pyasn1_modules-0.3.0.tar.gz", hash = "sha256:5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c"}, +] + +[package.dependencies] +pyasn1 = ">=0.4.6,<0.6.0" + +[[package]] +name = "pydata-google-auth" +version = "1.8.2" +description = "PyData helpers for authenticating to Google APIs" +optional = false +python-versions = "*" +files = [ + {file = "pydata-google-auth-1.8.2.tar.gz", hash = "sha256:547b6c0fbea657dcecd50887c5db8640ebec062a59a2b88e8ff8e53a04818303"}, + {file = "pydata_google_auth-1.8.2-py2.py3-none-any.whl", hash = "sha256:a9dce59af4a170ea60c4b2ebbc83ee1f74d34255a4f97b2469ae9a4a0dc98e99"}, +] + +[package.dependencies] +google-auth = {version = ">=1.25.0,<3.0dev", markers = "python_version >= \"3.6\""} +google-auth-oauthlib = {version = ">=0.4.0", markers = "python_version >= \"3.6\""} +setuptools = "*" + +[[package]] +name = "pyparsing" +version = "3.1.1" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +optional = false +python-versions = ">=3.6.8" +files = [ + {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, + {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, +] + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] + +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "pytz" +version = "2023.3.post1" +description = "World timezone definitions, modern and historical" +optional = false +python-versions = "*" +files = [ + {file = "pytz-2023.3.post1-py2.py3-none-any.whl", hash = "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7"}, + {file = "pytz-2023.3.post1.tar.gz", hash = "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b"}, +] + +[[package]] +name = "requests" +version = "2.31.0" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-oauthlib" +version = "1.3.1" +description = "OAuthlib authentication support for Requests." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "requests-oauthlib-1.3.1.tar.gz", hash = "sha256:75beac4a47881eeb94d5ea5d6ad31ef88856affe2332b9aafb52c6452ccf0d7a"}, + {file = "requests_oauthlib-1.3.1-py2.py3-none-any.whl", hash = "sha256:2577c501a2fb8d05a304c09d090d6e47c306fef15809d102b327cf8364bddab5"}, +] + +[package.dependencies] +oauthlib = ">=3.0.0" +requests = ">=2.0.0" + +[package.extras] +rsa = ["oauthlib[signedtoken] (>=3.0.0)"] + +[[package]] +name = "requests-toolbelt" +version = "1.0.0" +description = "A utility belt for advanced users of python-requests" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, + {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, +] + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +name = "rsa" +version = "4.9" +description = "Pure-Python RSA implementation" +optional = false +python-versions = ">=3.6,<4" +files = [ + {file = "rsa-4.9-py3-none-any.whl", hash = "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7"}, + {file = "rsa-4.9.tar.gz", hash = "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21"}, +] + +[package.dependencies] +pyasn1 = ">=0.1.3" + +[[package]] +name = "setuptools" +version = "68.2.2" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "setuptools-68.2.2-py3-none-any.whl", hash = "sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a"}, + {file = "setuptools-68.2.2.tar.gz", hash = "sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "tomlkit" +version = "0.11.8" +description = "Style preserving TOML library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomlkit-0.11.8-py3-none-any.whl", hash = "sha256:8c726c4c202bdb148667835f68d68780b9a003a9ec34167b6c673b38eff2a171"}, + {file = "tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, +] + +[[package]] +name = "tqdm" +version = "4.66.1" +description = "Fast, Extensible Progress Meter" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tqdm-4.66.1-py3-none-any.whl", hash = "sha256:d302b3c5b53d47bce91fea46679d9c3c6508cf6332229aa1e7d8653723793386"}, + {file = "tqdm-4.66.1.tar.gz", hash = "sha256:d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"] +notebook = ["ipywidgets (>=6)"] +slack = ["slack-sdk"] +telegram = ["requests"] + +[[package]] +name = "tzdata" +version = "2023.3" +description = "Provider of IANA time zone data" +optional = false +python-versions = ">=2" +files = [ + {file = "tzdata-2023.3-py2.py3-none-any.whl", hash = "sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda"}, + {file = "tzdata-2023.3.tar.gz", hash = "sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a"}, +] + +[[package]] +name = "uritemplate" +version = "4.1.1" +description = "Implementation of RFC 6570 URI Templates" +optional = false +python-versions = ">=3.6" +files = [ + {file = "uritemplate-4.1.1-py2.py3-none-any.whl", hash = "sha256:830c08b8d99bdd312ea4ead05994a38e8936266f84b9a7878232db50b044e02e"}, + {file = "uritemplate-4.1.1.tar.gz", hash = "sha256:4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0"}, +] + +[[package]] +name = "urllib3" +version = "2.0.7" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.7" +files = [ + {file = "urllib3-2.0.7-py3-none-any.whl", hash = "sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"}, + {file = "urllib3-2.0.7.tar.gz", hash = "sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "win32-setctime" +version = "1.1.0" +description = "A small Python utility to set file creation time on Windows" +optional = false +python-versions = ">=3.5" +files = [ + {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, + {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, +] + +[package.extras] +dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] + +[[package]] +name = "yarl" +version = "1.9.2" +description = "Yet another URL library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8c2ad583743d16ddbdf6bb14b5cd76bf43b0d0006e918809d5d4ddf7bde8dd82"}, + {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82aa6264b36c50acfb2424ad5ca537a2060ab6de158a5bd2a72a032cc75b9eb8"}, + {file = "yarl-1.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c0c77533b5ed4bcc38e943178ccae29b9bcf48ffd1063f5821192f23a1bd27b9"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee4afac41415d52d53a9833ebae7e32b344be72835bbb589018c9e938045a560"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bf345c3a4f5ba7f766430f97f9cc1320786f19584acc7086491f45524a551ac"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a96c19c52ff442a808c105901d0bdfd2e28575b3d5f82e2f5fd67e20dc5f4ea"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:891c0e3ec5ec881541f6c5113d8df0315ce5440e244a716b95f2525b7b9f3608"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c3a53ba34a636a256d767c086ceb111358876e1fb6b50dfc4d3f4951d40133d5"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:566185e8ebc0898b11f8026447eacd02e46226716229cea8db37496c8cdd26e0"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:2b0738fb871812722a0ac2154be1f049c6223b9f6f22eec352996b69775b36d4"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:32f1d071b3f362c80f1a7d322bfd7b2d11e33d2adf395cc1dd4df36c9c243095"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:e9fdc7ac0d42bc3ea78818557fab03af6181e076a2944f43c38684b4b6bed8e3"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:56ff08ab5df8429901ebdc5d15941b59f6253393cb5da07b4170beefcf1b2528"}, + {file = "yarl-1.9.2-cp310-cp310-win32.whl", hash = "sha256:8ea48e0a2f931064469bdabca50c2f578b565fc446f302a79ba6cc0ee7f384d3"}, + {file = "yarl-1.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:50f33040f3836e912ed16d212f6cc1efb3231a8a60526a407aeb66c1c1956dde"}, + {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:646d663eb2232d7909e6601f1a9107e66f9791f290a1b3dc7057818fe44fc2b6"}, + {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aff634b15beff8902d1f918012fc2a42e0dbae6f469fce134c8a0dc51ca423bb"}, + {file = "yarl-1.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a83503934c6273806aed765035716216cc9ab4e0364f7f066227e1aaea90b8d0"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b25322201585c69abc7b0e89e72790469f7dad90d26754717f3310bfe30331c2"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22a94666751778629f1ec4280b08eb11815783c63f52092a5953faf73be24191"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ec53a0ea2a80c5cd1ab397925f94bff59222aa3cf9c6da938ce05c9ec20428d"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:159d81f22d7a43e6eabc36d7194cb53f2f15f498dbbfa8edc8a3239350f59fe7"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:832b7e711027c114d79dffb92576acd1bd2decc467dec60e1cac96912602d0e6"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:95d2ecefbcf4e744ea952d073c6922e72ee650ffc79028eb1e320e732898d7e8"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d4e2c6d555e77b37288eaf45b8f60f0737c9efa3452c6c44626a5455aeb250b9"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:783185c75c12a017cc345015ea359cc801c3b29a2966c2655cd12b233bf5a2be"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:b8cc1863402472f16c600e3e93d542b7e7542a540f95c30afd472e8e549fc3f7"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:822b30a0f22e588b32d3120f6d41e4ed021806418b4c9f0bc3048b8c8cb3f92a"}, + {file = "yarl-1.9.2-cp311-cp311-win32.whl", hash = "sha256:a60347f234c2212a9f0361955007fcf4033a75bf600a33c88a0a8e91af77c0e8"}, + {file = "yarl-1.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:be6b3fdec5c62f2a67cb3f8c6dbf56bbf3f61c0f046f84645cd1ca73532ea051"}, + {file = "yarl-1.9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:38a3928ae37558bc1b559f67410df446d1fbfa87318b124bf5032c31e3447b74"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac9bb4c5ce3975aeac288cfcb5061ce60e0d14d92209e780c93954076c7c4367"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3da8a678ca8b96c8606bbb8bfacd99a12ad5dd288bc6f7979baddd62f71c63ef"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13414591ff516e04fcdee8dc051c13fd3db13b673c7a4cb1350e6b2ad9639ad3"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf74d08542c3a9ea97bb8f343d4fcbd4d8f91bba5ec9d5d7f792dbe727f88938"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7221580dc1db478464cfeef9b03b95c5852cc22894e418562997df0d074ccc"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:494053246b119b041960ddcd20fd76224149cfea8ed8777b687358727911dd33"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:52a25809fcbecfc63ac9ba0c0fb586f90837f5425edfd1ec9f3372b119585e45"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:e65610c5792870d45d7b68c677681376fcf9cc1c289f23e8e8b39c1485384185"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:1b1bba902cba32cdec51fca038fd53f8beee88b77efc373968d1ed021024cc04"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:662e6016409828ee910f5d9602a2729a8a57d74b163c89a837de3fea050c7582"}, + {file = "yarl-1.9.2-cp37-cp37m-win32.whl", hash = "sha256:f364d3480bffd3aa566e886587eaca7c8c04d74f6e8933f3f2c996b7f09bee1b"}, + {file = "yarl-1.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6a5883464143ab3ae9ba68daae8e7c5c95b969462bbe42e2464d60e7e2698368"}, + {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5610f80cf43b6202e2c33ba3ec2ee0a2884f8f423c8f4f62906731d876ef4fac"}, + {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9a4e67ad7b646cd6f0938c7ebfd60e481b7410f574c560e455e938d2da8e0f4"}, + {file = "yarl-1.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:83fcc480d7549ccebe9415d96d9263e2d4226798c37ebd18c930fce43dfb9574"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fcd436ea16fee7d4207c045b1e340020e58a2597301cfbcfdbe5abd2356c2fb"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84e0b1599334b1e1478db01b756e55937d4614f8654311eb26012091be109d59"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3458a24e4ea3fd8930e934c129b676c27452e4ebda80fbe47b56d8c6c7a63a9e"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:838162460b3a08987546e881a2bfa573960bb559dfa739e7800ceeec92e64417"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4e2d08f07a3d7d3e12549052eb5ad3eab1c349c53ac51c209a0e5991bbada78"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:de119f56f3c5f0e2fb4dee508531a32b069a5f2c6e827b272d1e0ff5ac040333"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:149ddea5abf329752ea5051b61bd6c1d979e13fbf122d3a1f9f0c8be6cb6f63c"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:674ca19cbee4a82c9f54e0d1eee28116e63bc6fd1e96c43031d11cbab8b2afd5"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:9b3152f2f5677b997ae6c804b73da05a39daa6a9e85a512e0e6823d81cdad7cc"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5415d5a4b080dc9612b1b63cba008db84e908b95848369aa1da3686ae27b6d2b"}, + {file = "yarl-1.9.2-cp38-cp38-win32.whl", hash = "sha256:f7a3d8146575e08c29ed1cd287068e6d02f1c7bdff8970db96683b9591b86ee7"}, + {file = "yarl-1.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:63c48f6cef34e6319a74c727376e95626f84ea091f92c0250a98e53e62c77c72"}, + {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:75df5ef94c3fdc393c6b19d80e6ef1ecc9ae2f4263c09cacb178d871c02a5ba9"}, + {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c027a6e96ef77d401d8d5a5c8d6bc478e8042f1e448272e8d9752cb0aff8b5c8"}, + {file = "yarl-1.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3b078dbe227f79be488ffcfc7a9edb3409d018e0952cf13f15fd6512847f3f7"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59723a029760079b7d991a401386390c4be5bfec1e7dd83e25a6a0881859e716"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b03917871bf859a81ccb180c9a2e6c1e04d2f6a51d953e6a5cdd70c93d4e5a2a"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c1012fa63eb6c032f3ce5d2171c267992ae0c00b9e164efe4d73db818465fac3"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a74dcbfe780e62f4b5a062714576f16c2f3493a0394e555ab141bf0d746bb955"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8c56986609b057b4839968ba901944af91b8e92f1725d1a2d77cbac6972b9ed1"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c315df3293cd521033533d242d15eab26583360b58f7ee5d9565f15fee1bef4"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b7232f8dfbd225d57340e441d8caf8652a6acd06b389ea2d3222b8bc89cbfca6"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:53338749febd28935d55b41bf0bcc79d634881195a39f6b2f767870b72514caf"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:066c163aec9d3d073dc9ffe5dd3ad05069bcb03fcaab8d221290ba99f9f69ee3"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8288d7cd28f8119b07dd49b7230d6b4562f9b61ee9a4ab02221060d21136be80"}, + {file = "yarl-1.9.2-cp39-cp39-win32.whl", hash = "sha256:b124e2a6d223b65ba8768d5706d103280914d61f5cae3afbc50fc3dfcc016623"}, + {file = "yarl-1.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:61016e7d582bc46a5378ffdd02cd0314fb8ba52f40f9cf4d9a5e7dbef88dee18"}, + {file = "yarl-1.9.2.tar.gz", hash = "sha256:04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571"}, +] + +[package.dependencies] +idna = ">=2.0" +multidict = ">=4.0" + +[metadata] +lock-version = "2.0" +python-versions = "^3.9" +content-hash = "50a8ff1bce8000465628034808c5680e843b2fa1d1ccaa5ac73f374b230da929" diff --git a/pipelines/rj_sms/whatsapp/pyproject.toml b/pipelines/rj_sms/whatsapp/pyproject.toml new file mode 100644 index 000000000..13dee8d62 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/pyproject.toml @@ -0,0 +1,15 @@ +[tool.poetry] +name = "whatsapp" +version = "0.1.0" +description = "" +authors = ["André Martins "] +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.9" +basedosdados = {version = "2.0.0b14", extras = ["upload"]} + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/pipelines/rj_sms/whatsapp/run.py b/pipelines/rj_sms/whatsapp/run.py new file mode 100644 index 000000000..13925ef00 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/run.py @@ -0,0 +1,3 @@ +from flows import flow_whatsapp +from pipelines.utils.utils import run_local +run_local(flow_whatsapp) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/schedules.py b/pipelines/rj_sms/whatsapp/schedules.py new file mode 100644 index 000000000..d4acd248e --- /dev/null +++ b/pipelines/rj_sms/whatsapp/schedules.py @@ -0,0 +1,17 @@ +from datetime import timedelta +import pendulum +from prefect.schedules import Schedule +from prefect.schedules.clocks import IntervalClock +from pipelines.constants import constants + +every_day_at_seven_am = Schedule( + clocks=[ + IntervalClock( + interval=timedelta(days=1), + start_date=pendulum.datetime(2023, 1, 1, 7, 0, 0, tz="America/Sao_Paulo"), + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], + ) + ] +) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/tasks.py b/pipelines/rj_sms/whatsapp/tasks.py new file mode 100644 index 000000000..b726f5e00 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/tasks.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +import csv +import time +import json +import requests +import pandas as pd +from prefect import task +#from google.cloud import storage +from utils import log +from datetime import datetime, timedelta + +@task +def get_patients(): + # Get Autentication + url = "https://rest.smsrio.org/api/usuario/autenticar" + + payload = json.dumps({ + "cpf": "SisregAmb", + "senha": "77HtOzVJ6^#d", + "cnes": "5462886" + }) + + headers = { + 'Content-Type': 'application/json', + 'Cookie': 'PHPSESSID=b40302ab232addf99960f1d4ffa7073b' + } + + response = requests.request("POST", url, headers=headers, data=payload) + + if response.status_code == 200: + # Get token + dados_json = json.loads(response.text) + token = dados_json['dados'] + data_futura = datetime.today() + timedelta(days=3) + data_formatada = data_futura.strftime('%Y-%m-%d') + # Config Parameter + list_cnes = ["6688152"] + for cnes in list_cnes: + url = f"https://web2.smsrio.org/ambulatorio/api/pacientesAgendados/{cnes}/{data_formatada}/" + + payload = "" + headers = { + 'Authorization': 'Bearer ' + token + } + + # Desired number of repetitions + num_repeticoes = 5 + + for _ in range(num_repeticoes): + response = requests.get(url, headers=headers, data=payload) + if response.status_code == 200: + log("Solicitação bem-sucedida!") + df = pd.read_json(response.text) + if df.empty: + log('DataFrame is empty!') + else: + return df + break + else: + log(f"Falha na solicitação, código de status: {response.status_code}") + + # Aguarda 1 minuto antes da próxima solicitação + time.sleep(60) + + else: + log('Erro na autenticação') + + return pd.DataFrame() + +@task +def save_patients(dataframe): + log('Salva lista de pacientes no cloud storage') + data_futura = datetime.today() + timedelta(days=3) + data_formatada = data_futura.strftime('%Y-%m-%d') + #filename = f'sisreg_scheduled_patients/origin/{data_formatada}.csv' + filename = f'files/{data_formatada}.csv' + #bucket_name = 'rj-whatsapp' + #storage_client = storage.Client() + #bucket = storage_client.get_bucket(bucket_name) + #blob = bucket.blob(filename) + #csv_data = dataframe.to_csv(sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') + #dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') + #blob.upload_from_string(csv_data, content_type="text/csv") + return True \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/utils.py b/pipelines/rj_sms/whatsapp/utils.py new file mode 100644 index 000000000..1f3c54fe9 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/utils.py @@ -0,0 +1,90 @@ +import prefect +from prefect import task +import basedosdados as bd + +def log(message) -> None: + """Logs a message""" + prefect.context.logger.info(f"\n{message}") + +@task +def upload_to_datalake( + input_path: str, + dataset_id: str, + table_id: str, + if_exists: str = "replace", + csv_delimiter: str = ";", + if_storage_data_exists: str = "replace", + biglake_table: bool = True, + dump_mode: str = "append", +): + """ + Uploads data from a file to a BigQuery table in a specified dataset. + + Args: + input_path (str): The path to the file containing the data to be uploaded. + dataset_id (str): The ID of the dataset where the table is located. + table_id (str): The ID of the table where the data will be uploaded. + if_exists (str, optional): Specifies what to do if the table already exists. + Defaults to "replace". + csv_delimiter (str, optional): The delimiter used in the CSV file. Defaults to ";". + if_storage_data_exists (str, optional): Specifies what to do if the storage data + already exists. Defaults to "replace". + biglake_table (bool, optional): Specifies whether the table is a BigLake table. + Defaults to True. + """ + tb = bd.Table(dataset_id=dataset_id, table_id=table_id) + table_staging = f"{tb.table_full_name['staging']}" + st = bd.Storage(dataset_id=dataset_id, table_id=table_id) + storage_path = f"{st.bucket_name}.staging.{dataset_id}.{table_id}" + storage_path_link = ( + f"https://console.cloud.google.com/storage/browser/{st.bucket_name}" + f"/staging/{dataset_id}/{table_id}" + ) + + try: + table_exists = tb.table_exists(mode="staging") + + if not table_exists: + log(f"CREATING TABLE: {dataset_id}.{table_id}") + tb.create( + path=input_path, + csv_delimiter=csv_delimiter, + if_storage_data_exists=if_storage_data_exists, + biglake_table=biglake_table, + ) + else: + if dump_mode == "append": + log( + f"TABLE ALREADY EXISTS APPENDING DATA TO STORAGE: {dataset_id}.{table_id}" + ) + + tb.append(filepath=input_path, if_exists=if_exists) + elif dump_mode == "overwrite": + log( + "MODE OVERWRITE: Table ALREADY EXISTS, DELETING OLD DATA!\n" + f"{storage_path}\n" + f"{storage_path_link}" + ) # pylint: disable=C0301 + st.delete_table( + mode="staging", bucket_name=st.bucket_name, not_found_ok=True + ) + log( + "MODE OVERWRITE: Sucessfully DELETED OLD DATA from Storage:\n" + f"{storage_path}\n" + f"{storage_path_link}" + ) # pylint: disable=C0301 + tb.delete(mode="all") + log( + "MODE OVERWRITE: Sucessfully DELETED TABLE:\n" f"{table_staging}\n" + ) # pylint: disable=C0301 + + tb.create( + path=input_path, + csv_delimiter=csv_delimiter, + if_storage_data_exists=if_storage_data_exists, + biglake_table=biglake_table, + ) + log("Data uploaded to BigQuery") + + except Exception as e: + log(f"An error occurred: {e}", level="error") \ No newline at end of file From fd9e2c19e192b242bc3c875180bcac1d7bb8bb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Tue, 24 Oct 2023 07:29:59 -0700 Subject: [PATCH 02/32] Adicionado flow da Vitacare --- .../clinica_scheduled_patients/flows.py | 23 + .../clinica_scheduled_patients/run.py | 4 + .../clinica_scheduled_patients/tasks.py | 49 + .../{ => clinica_scheduled_patients}/utils.py | 7 +- pipelines/rj_sms/whatsapp/flows.py | 49 - pipelines/rj_sms/whatsapp/poetry.lock | 1477 ----------------- pipelines/rj_sms/whatsapp/pyproject.toml | 15 - pipelines/rj_sms/whatsapp/run.py | 3 - pipelines/rj_sms/whatsapp/schedules.py | 17 - .../sisreg_scheduled_patients/flows.py | 44 + .../whatsapp/sisreg_scheduled_patients/run.py | 4 + .../{ => sisreg_scheduled_patients}/tasks.py | 20 +- .../sisreg_scheduled_patients/utils.py | 87 + 13 files changed, 217 insertions(+), 1582 deletions(-) create mode 100644 pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py create mode 100644 pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py create mode 100644 pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py rename pipelines/rj_sms/whatsapp/{ => clinica_scheduled_patients}/utils.py (95%) delete mode 100644 pipelines/rj_sms/whatsapp/flows.py delete mode 100644 pipelines/rj_sms/whatsapp/poetry.lock delete mode 100644 pipelines/rj_sms/whatsapp/pyproject.toml delete mode 100644 pipelines/rj_sms/whatsapp/run.py delete mode 100644 pipelines/rj_sms/whatsapp/schedules.py create mode 100644 pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py create mode 100644 pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py rename pipelines/rj_sms/whatsapp/{ => sisreg_scheduled_patients}/tasks.py (73%) create mode 100644 pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py new file mode 100644 index 000000000..229f593e5 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +""" +WhatsApp flow definition +""" +import pandas as pd +from prefect import Flow +from prefect.storage import GCS +from pipelines.constants import constants +from prefect.run_configs import KubernetesRun + +from tasks import ( + get_patients, + save_patients +) + +from utils import ( + upload_to_datalake +) + +with Flow("Vitacare patients") as flow_clinica_scheduled_patients: + + # Tasks + get_patients() \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py new file mode 100644 index 000000000..7bbc87027 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py @@ -0,0 +1,4 @@ +from flows import flow_clinica_scheduled_patients +from pipelines.utils.utils import run_local + +run_local(flow_clinica_scheduled_patients) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py new file mode 100644 index 000000000..b8ae6f078 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +import os +import csv +import time +import json +import requests +import pandas as pd +from prefect import task +from pipelines.utils.utils import log +#from google.cloud import storage +from datetime import datetime, timedelta +import google.oauth2.id_token +import google.auth.transport.requests + +@task +def get_patients(): + url = 'https://us-central1-rj-sms-dev.cloudfunctions.net/vitacare' + + os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/Users/andremartins/.basedosdados/credentials/staging.json' + request = google.auth.transport.requests.Request() + audience = url + TOKEN = google.oauth2.id_token.fetch_id_token(request, audience) + + payload = json.dumps({ + "url": "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments", + "path": "whatsapp/clinica_patients_treated/origin/", + "env": "staging" + }) + headers = { + 'Content-Type': 'application/json', + 'Authorization': f'Bearer {TOKEN}' + } + response = requests.request("POST", url, headers=headers, data=payload) + log(response.text) + +@task +def save_patients(dataframe): + data_futura = datetime.today() + timedelta(days=3) + data_formatada = data_futura.strftime('%Y-%m-%d') + #filename = f'sisreg_scheduled_patients/origin/{data_formatada}.csv' + filename = f'files/{data_formatada}.csv' + #bucket_name = 'rj-whatsapp' + #storage_client = storage.Client() + #bucket = storage_client.get_bucket(bucket_name) + #blob = bucket.blob(filename) + #csv_data = dataframe.to_csv(sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') + dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') + #blob.upload_from_string(csv_data, content_type="text/csv") + return True diff --git a/pipelines/rj_sms/whatsapp/utils.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py similarity index 95% rename from pipelines/rj_sms/whatsapp/utils.py rename to pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py index 1f3c54fe9..4f76724b4 100644 --- a/pipelines/rj_sms/whatsapp/utils.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py @@ -1,10 +1,7 @@ import prefect from prefect import task import basedosdados as bd - -def log(message) -> None: - """Logs a message""" - prefect.context.logger.info(f"\n{message}") +from pipelines.utils.utils import log @task def upload_to_datalake( @@ -87,4 +84,4 @@ def upload_to_datalake( log("Data uploaded to BigQuery") except Exception as e: - log(f"An error occurred: {e}", level="error") \ No newline at end of file + log(f"An error occurred: {e}", level="error") diff --git a/pipelines/rj_sms/whatsapp/flows.py b/pipelines/rj_sms/whatsapp/flows.py deleted file mode 100644 index 60b45cd08..000000000 --- a/pipelines/rj_sms/whatsapp/flows.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -""" -WhatsApp flow definition -""" -import pandas as pd -from prefect import Flow -from prefect.storage import GCS -#from pipelines.constants import constants -from prefect.run_configs import KubernetesRun - -GCS_FLOWS_BUCKET = "datario-public" -# Docker image -DOCKER_TAG = "AUTO_REPLACE_DOCKER_TAG" -DOCKER_IMAGE_NAME = "AUTO_REPLACE_DOCKER_IMAGE" -DOCKER_IMAGE = f"{DOCKER_IMAGE_NAME}:{DOCKER_TAG}" -RJ_SMS_DEV_AGENT_LABEL = "rj-sms-dev" - -from tasks import ( - get_patients, - save_patients -) - -from utils import ( - log, - upload_to_datalake, -) - -with Flow("SISREG patients") as flow_whatsapp: - - # Tasks - #dataframe = get_patients() - #dataframe = pd.DataFrame() - upload_to_datalake_task = upload_to_datalake( - input_path="/Users/andremartins/Documents/GitHub/pipelines/pipelines/rj_sms/whatsapp/files/2023-10-21.csv", - dataset_id="whatsapp", - table_id="sisreg_scheduled_patients", - if_exists="replace", - csv_delimiter=";", - if_storage_data_exists="replace", - biglake_table=True, - ) - -flow_whatsapp.storage = GCS(GCS_FLOWS_BUCKET) -flow_whatsapp.run_config = KubernetesRun( - image=DOCKER_IMAGE, - labels=[ - RJ_SMS_DEV_AGENT_LABEL, - ], -) diff --git a/pipelines/rj_sms/whatsapp/poetry.lock b/pipelines/rj_sms/whatsapp/poetry.lock deleted file mode 100644 index 3664a04c6..000000000 --- a/pipelines/rj_sms/whatsapp/poetry.lock +++ /dev/null @@ -1,1477 +0,0 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. - -[[package]] -name = "backoff" -version = "2.2.1" -description = "Function decoration for backoff and retry" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, - {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, -] - -[[package]] -name = "basedosdados" -version = "2.0.0b14" -description = "Organizar e facilitar o acesso a dados brasileiros através de tabelas públicas no BigQuery." -optional = false -python-versions = ">=3.8.1,<4" -files = [ - {file = "basedosdados-2.0.0b14-py3-none-any.whl", hash = "sha256:4cde3d771bdc0cd25d1fb25a38852bdbba269df62589b417c5e3d76d052e44ff"}, - {file = "basedosdados-2.0.0b14.tar.gz", hash = "sha256:77b05776961e930003eb6e367e38b258aab83449c7eaa9d1a441531200a1fe8b"}, -] - -[package.dependencies] -google-api-python-client = ">=2.86,<3.0" -google-cloud-bigquery = ">=3.10,<4.0" -google-cloud-bigquery-connection = ">=1.12,<2.0" -google-cloud-bigquery-storage = ">=2.19,<3.0" -google-cloud-storage = ">=2.9,<3.0" -gql = {version = ">=3.4,<4.0", optional = true, markers = "extra == \"all\" or extra == \"upload\""} -loguru = "0.7.0" -pandas = ">=2.0,<3.0" -pandas-gbq = ">=0.19,<0.20" -pydata-google-auth = ">=1.8,<2.0" -requests-toolbelt = {version = ">=1,<2", optional = true, markers = "extra == \"all\" or extra == \"upload\""} -tomlkit = ">=0.11,<0.12" -tqdm = ">=4,<5" - -[package.extras] -all = ["click (>=8.1,<9)", "gql (>=3.4,<4.0)", "pandavro (>=1.7,<2.0)", "requests-toolbelt (>=1,<2)"] -avro = ["pandavro (>=1.7,<2.0)"] -cli = ["click (>=8.1,<9)"] -upload = ["gql (>=3.4,<4.0)", "requests-toolbelt (>=1,<2)"] - -[[package]] -name = "cachetools" -version = "5.3.1" -description = "Extensible memoizing collections and decorators" -optional = false -python-versions = ">=3.7" -files = [ - {file = "cachetools-5.3.1-py3-none-any.whl", hash = "sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590"}, - {file = "cachetools-5.3.1.tar.gz", hash = "sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b"}, -] - -[[package]] -name = "certifi" -version = "2023.7.22" -description = "Python package for providing Mozilla's CA Bundle." -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, - {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, -] - -[[package]] -name = "charset-normalizer" -version = "3.3.0" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset-normalizer-3.3.0.tar.gz", hash = "sha256:63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:effe5406c9bd748a871dbcaf3ac69167c38d72db8c9baf3ff954c344f31c4cbe"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4162918ef3098851fcd8a628bf9b6a98d10c380725df9e04caf5ca6dd48c847a"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0570d21da019941634a531444364f2482e8db0b3425fcd5ac0c36565a64142c8"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5707a746c6083a3a74b46b3a631d78d129edab06195a92a8ece755aac25a3f3d"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:278c296c6f96fa686d74eb449ea1697f3c03dc28b75f873b65b5201806346a69"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a4b71f4d1765639372a3b32d2638197f5cd5221b19531f9245fcc9ee62d38f56"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5969baeaea61c97efa706b9b107dcba02784b1601c74ac84f2a532ea079403e"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3f93dab657839dfa61025056606600a11d0b696d79386f974e459a3fbc568ec"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:db756e48f9c5c607b5e33dd36b1d5872d0422e960145b08ab0ec7fd420e9d649"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:232ac332403e37e4a03d209a3f92ed9071f7d3dbda70e2a5e9cff1c4ba9f0678"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e5c1502d4ace69a179305abb3f0bb6141cbe4714bc9b31d427329a95acfc8bdd"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:2502dd2a736c879c0f0d3e2161e74d9907231e25d35794584b1ca5284e43f596"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23e8565ab7ff33218530bc817922fae827420f143479b753104ab801145b1d5b"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-win32.whl", hash = "sha256:1872d01ac8c618a8da634e232f24793883d6e456a66593135aeafe3784b0848d"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:557b21a44ceac6c6b9773bc65aa1b4cc3e248a5ad2f5b914b91579a32e22204d"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d7eff0f27edc5afa9e405f7165f85a6d782d308f3b6b9d96016c010597958e63"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a685067d05e46641d5d1623d7c7fdf15a357546cbb2f71b0ebde91b175ffc3e"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0d3d5b7db9ed8a2b11a774db2bbea7ba1884430a205dbd54a32d61d7c2a190fa"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2935ffc78db9645cb2086c2f8f4cfd23d9b73cc0dc80334bc30aac6f03f68f8c"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fe359b2e3a7729010060fbca442ca225280c16e923b37db0e955ac2a2b72a05"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:380c4bde80bce25c6e4f77b19386f5ec9db230df9f2f2ac1e5ad7af2caa70459"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0d1e3732768fecb052d90d62b220af62ead5748ac51ef61e7b32c266cac9293"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b2919306936ac6efb3aed1fbf81039f7087ddadb3160882a57ee2ff74fd2382"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f8888e31e3a85943743f8fc15e71536bda1c81d5aa36d014a3c0c44481d7db6e"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:82eb849f085624f6a607538ee7b83a6d8126df6d2f7d3b319cb837b289123078"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7b8b8bf1189b3ba9b8de5c8db4d541b406611a71a955bbbd7385bbc45fcb786c"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5adf257bd58c1b8632046bbe43ee38c04e1038e9d37de9c57a94d6bd6ce5da34"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c350354efb159b8767a6244c166f66e67506e06c8924ed74669b2c70bc8735b1"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-win32.whl", hash = "sha256:02af06682e3590ab952599fbadac535ede5d60d78848e555aa58d0c0abbde786"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:86d1f65ac145e2c9ed71d8ffb1905e9bba3a91ae29ba55b4c46ae6fc31d7c0d4"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:3b447982ad46348c02cb90d230b75ac34e9886273df3a93eec0539308a6296d7"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:abf0d9f45ea5fb95051c8bfe43cb40cda383772f7e5023a83cc481ca2604d74e"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b09719a17a2301178fac4470d54b1680b18a5048b481cb8890e1ef820cb80455"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b3d9b48ee6e3967b7901c052b670c7dda6deb812c309439adaffdec55c6d7b78"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:edfe077ab09442d4ef3c52cb1f9dab89bff02f4524afc0acf2d46be17dc479f5"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3debd1150027933210c2fc321527c2299118aa929c2f5a0a80ab6953e3bd1908"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86f63face3a527284f7bb8a9d4f78988e3c06823f7bea2bd6f0e0e9298ca0403"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24817cb02cbef7cd499f7c9a2735286b4782bd47a5b3516a0e84c50eab44b98e"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c71f16da1ed8949774ef79f4a0260d28b83b3a50c6576f8f4f0288d109777989"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:9cf3126b85822c4e53aa28c7ec9869b924d6fcfb76e77a45c44b83d91afd74f9"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:b3b2316b25644b23b54a6f6401074cebcecd1244c0b8e80111c9a3f1c8e83d65"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:03680bb39035fbcffe828eae9c3f8afc0428c91d38e7d61aa992ef7a59fb120e"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4cc152c5dd831641e995764f9f0b6589519f6f5123258ccaca8c6d34572fefa8"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-win32.whl", hash = "sha256:b8f3307af845803fb0b060ab76cf6dd3a13adc15b6b451f54281d25911eb92df"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:8eaf82f0eccd1505cf39a45a6bd0a8cf1c70dcfc30dba338207a969d91b965c0"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dc45229747b67ffc441b3de2f3ae5e62877a282ea828a5bdb67883c4ee4a8810"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f4a0033ce9a76e391542c182f0d48d084855b5fcba5010f707c8e8c34663d77"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ada214c6fa40f8d800e575de6b91a40d0548139e5dc457d2ebb61470abf50186"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b1121de0e9d6e6ca08289583d7491e7fcb18a439305b34a30b20d8215922d43c"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1063da2c85b95f2d1a430f1c33b55c9c17ffaf5e612e10aeaad641c55a9e2b9d"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70f1d09c0d7748b73290b29219e854b3207aea922f839437870d8cc2168e31cc"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:250c9eb0f4600361dd80d46112213dff2286231d92d3e52af1e5a6083d10cad9"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:750b446b2ffce1739e8578576092179160f6d26bd5e23eb1789c4d64d5af7dc7"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:fc52b79d83a3fe3a360902d3f5d79073a993597d48114c29485e9431092905d8"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:588245972aca710b5b68802c8cad9edaa98589b1b42ad2b53accd6910dad3545"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e39c7eb31e3f5b1f88caff88bcff1b7f8334975b46f6ac6e9fc725d829bc35d4"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-win32.whl", hash = "sha256:abecce40dfebbfa6abf8e324e1860092eeca6f7375c8c4e655a8afb61af58f2c"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a91a981f185721542a0b7c92e9054b7ab4fea0508a795846bc5b0abf8118d4"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:67b8cc9574bb518ec76dc8e705d4c39ae78bb96237cb533edac149352c1f39fe"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac71b2977fb90c35d41c9453116e283fac47bb9096ad917b8819ca8b943abecd"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3ae38d325b512f63f8da31f826e6cb6c367336f95e418137286ba362925c877e"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:542da1178c1c6af8873e143910e2269add130a299c9106eef2594e15dae5e482"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:30a85aed0b864ac88309b7d94be09f6046c834ef60762a8833b660139cfbad13"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aae32c93e0f64469f74ccc730a7cb21c7610af3a775157e50bbd38f816536b38"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b26ddf78d57f1d143bdf32e820fd8935d36abe8a25eb9ec0b5a71c82eb3895"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f5d10bae5d78e4551b7be7a9b29643a95aded9d0f602aa2ba584f0388e7a557"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:249c6470a2b60935bafd1d1d13cd613f8cd8388d53461c67397ee6a0f5dce741"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c5a74c359b2d47d26cdbbc7845e9662d6b08a1e915eb015d044729e92e7050b7"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b5bcf60a228acae568e9911f410f9d9e0d43197d030ae5799e20dca8df588287"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:187d18082694a29005ba2944c882344b6748d5be69e3a89bf3cc9d878e548d5a"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:81bf654678e575403736b85ba3a7867e31c2c30a69bc57fe88e3ace52fb17b89"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-win32.whl", hash = "sha256:85a32721ddde63c9df9ebb0d2045b9691d9750cb139c161c80e500d210f5e26e"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:468d2a840567b13a590e67dd276c570f8de00ed767ecc611994c301d0f8c014f"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e0fc42822278451bc13a2e8626cf2218ba570f27856b536e00cfa53099724828"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:09c77f964f351a7369cc343911e0df63e762e42bac24cd7d18525961c81754f4"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12ebea541c44fdc88ccb794a13fe861cc5e35d64ed689513a5c03d05b53b7c82"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:805dfea4ca10411a5296bcc75638017215a93ffb584c9e344731eef0dcfb026a"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96c2b49eb6a72c0e4991d62406e365d87067ca14c1a729a870d22354e6f68115"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aaf7b34c5bc56b38c931a54f7952f1ff0ae77a2e82496583b247f7c969eb1479"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:619d1c96099be5823db34fe89e2582b336b5b074a7f47f819d6b3a57ff7bdb86"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ac5e7015a5920cfce654c06618ec40c33e12801711da6b4258af59a8eff00a"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:93aa7eef6ee71c629b51ef873991d6911b906d7312c6e8e99790c0f33c576f89"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7966951325782121e67c81299a031f4c115615e68046f79b85856b86ebffc4cd"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:02673e456dc5ab13659f85196c534dc596d4ef260e4d86e856c3b2773ce09843"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:c2af80fb58f0f24b3f3adcb9148e6203fa67dd3f61c4af146ecad033024dde43"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:153e7b6e724761741e0974fc4dcd406d35ba70b92bfe3fedcb497226c93b9da7"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-win32.whl", hash = "sha256:d47ecf253780c90ee181d4d871cd655a789da937454045b17b5798da9393901a"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:d97d85fa63f315a8bdaba2af9a6a686e0eceab77b3089af45133252618e70884"}, - {file = "charset_normalizer-3.3.0-py3-none-any.whl", hash = "sha256:e46cd37076971c1040fc8c41273a8b3e2c624ce4f2be3f5dfcb7a430c1d3acc2"}, -] - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "db-dtypes" -version = "1.1.1" -description = "Pandas Data Types for SQL systems (BigQuery, Spanner)" -optional = false -python-versions = ">=3.7" -files = [ - {file = "db-dtypes-1.1.1.tar.gz", hash = "sha256:ab485c85fef2454f3182427def0b0a3ab179b2871542787d33ba519d62078883"}, - {file = "db_dtypes-1.1.1-py2.py3-none-any.whl", hash = "sha256:23be34ea2bc91065447ecea4d5f107e46d1de223d152e69fa73673a62d5bd27d"}, -] - -[package.dependencies] -numpy = ">=1.16.6" -packaging = ">=17.0" -pandas = ">=0.24.2" -pyarrow = ">=3.0.0" - -[[package]] -name = "google-api-core" -version = "2.12.0" -description = "Google API client core library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-api-core-2.12.0.tar.gz", hash = "sha256:c22e01b1e3c4dcd90998494879612c38d0a3411d1f7b679eb89e2abe3ce1f553"}, - {file = "google_api_core-2.12.0-py3-none-any.whl", hash = "sha256:ec6054f7d64ad13b41e43d96f735acbd763b0f3b695dabaa2d579673f6a6e160"}, -] - -[package.dependencies] -google-auth = ">=2.14.1,<3.0.dev0" -googleapis-common-protos = ">=1.56.2,<2.0.dev0" -grpcio = [ - {version = ">=1.49.1,<2.0dev", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""}, - {version = ">=1.33.2,<2.0dev", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, -] -grpcio-status = [ - {version = ">=1.49.1,<2.0.dev0", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""}, - {version = ">=1.33.2,<2.0.dev0", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, -] -protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0.dev0" -requests = ">=2.18.0,<3.0.0.dev0" - -[package.extras] -grpc = ["grpcio (>=1.33.2,<2.0dev)", "grpcio (>=1.49.1,<2.0dev)", "grpcio-status (>=1.33.2,<2.0.dev0)", "grpcio-status (>=1.49.1,<2.0.dev0)"] -grpcgcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] -grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] - -[[package]] -name = "google-api-python-client" -version = "2.104.0" -description = "Google API Client Library for Python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-api-python-client-2.104.0.tar.gz", hash = "sha256:bbc66520e7fe9417b93fd113f2a0a1afa789d686de9009b6e94e48fdea50a60f"}, - {file = "google_api_python_client-2.104.0-py2.py3-none-any.whl", hash = "sha256:867061526aa6dc6c1481d118e913a8a38a02a01eed589413968397ebd77df71d"}, -] - -[package.dependencies] -google-api-core = ">=1.31.5,<2.0.dev0 || >2.3.0,<3.0.0.dev0" -google-auth = ">=1.19.0,<3.0.0.dev0" -google-auth-httplib2 = ">=0.1.0" -httplib2 = ">=0.15.0,<1.dev0" -uritemplate = ">=3.0.1,<5" - -[[package]] -name = "google-auth" -version = "2.23.3" -description = "Google Authentication Library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-auth-2.23.3.tar.gz", hash = "sha256:6864247895eea5d13b9c57c9e03abb49cb94ce2dc7c58e91cba3248c7477c9e3"}, - {file = "google_auth-2.23.3-py2.py3-none-any.whl", hash = "sha256:a8f4608e65c244ead9e0538f181a96c6e11199ec114d41f1d7b1bffa96937bda"}, -] - -[package.dependencies] -cachetools = ">=2.0.0,<6.0" -pyasn1-modules = ">=0.2.1" -rsa = ">=3.1.4,<5" - -[package.extras] -aiohttp = ["aiohttp (>=3.6.2,<4.0.0.dev0)", "requests (>=2.20.0,<3.0.0.dev0)"] -enterprise-cert = ["cryptography (==36.0.2)", "pyopenssl (==22.0.0)"] -pyopenssl = ["cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] -reauth = ["pyu2f (>=0.1.5)"] -requests = ["requests (>=2.20.0,<3.0.0.dev0)"] - -[[package]] -name = "google-auth-httplib2" -version = "0.1.1" -description = "Google Authentication Library: httplib2 transport" -optional = false -python-versions = "*" -files = [ - {file = "google-auth-httplib2-0.1.1.tar.gz", hash = "sha256:c64bc555fdc6dd788ea62ecf7bccffcf497bf77244887a3f3d7a5a02f8e3fc29"}, - {file = "google_auth_httplib2-0.1.1-py2.py3-none-any.whl", hash = "sha256:42c50900b8e4dcdf8222364d1f0efe32b8421fb6ed72f2613f12f75cc933478c"}, -] - -[package.dependencies] -google-auth = "*" -httplib2 = ">=0.19.0" - -[[package]] -name = "google-auth-oauthlib" -version = "1.1.0" -description = "Google Authentication Library" -optional = false -python-versions = ">=3.6" -files = [ - {file = "google-auth-oauthlib-1.1.0.tar.gz", hash = "sha256:83ea8c3b0881e453790baff4448e8a6112ac8778d1de9da0b68010b843937afb"}, - {file = "google_auth_oauthlib-1.1.0-py2.py3-none-any.whl", hash = "sha256:089c6e587d36f4803ac7e0720c045c6a8b1fd1790088b8424975b90d0ee61c12"}, -] - -[package.dependencies] -google-auth = ">=2.15.0" -requests-oauthlib = ">=0.7.0" - -[package.extras] -tool = ["click (>=6.0.0)"] - -[[package]] -name = "google-cloud-bigquery" -version = "3.12.0" -description = "Google BigQuery API client library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-cloud-bigquery-3.12.0.tar.gz", hash = "sha256:1af93c5c28a18b13190bce479b793aaae56c0ecf7e1da73b4ba5798eca054a07"}, - {file = "google_cloud_bigquery-3.12.0-py2.py3-none-any.whl", hash = "sha256:e68851addfe0394ab7662bd58aa0e5a4527e7156568cc0410129ccb8a460a009"}, -] - -[package.dependencies] -google-api-core = {version = ">=1.31.5,<2.0.dev0 || >2.3.0,<3.0.0dev", extras = ["grpc"]} -google-cloud-core = ">=1.6.0,<3.0.0dev" -google-resumable-media = ">=0.6.0,<3.0dev" -grpcio = [ - {version = ">=1.49.1,<2.0dev", markers = "python_version >= \"3.11\""}, - {version = ">=1.47.0,<2.0dev", markers = "python_version < \"3.11\""}, -] -packaging = ">=20.0.0" -proto-plus = ">=1.15.0,<2.0.0dev" -protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" -python-dateutil = ">=2.7.2,<3.0dev" -requests = ">=2.21.0,<3.0.0dev" - -[package.extras] -all = ["Shapely (>=1.8.4,<2.0dev)", "db-dtypes (>=0.3.0,<2.0.0dev)", "geopandas (>=0.9.0,<1.0dev)", "google-cloud-bigquery-storage (>=2.6.0,<3.0.0dev)", "grpcio (>=1.47.0,<2.0dev)", "grpcio (>=1.49.1,<2.0dev)", "ipykernel (>=6.0.0)", "ipython (>=7.23.1,!=8.1.0)", "ipywidgets (>=7.7.0)", "opentelemetry-api (>=1.1.0)", "opentelemetry-instrumentation (>=0.20b0)", "opentelemetry-sdk (>=1.1.0)", "pandas (>=1.1.0)", "pyarrow (>=3.0.0)", "tqdm (>=4.7.4,<5.0.0dev)"] -bqstorage = ["google-cloud-bigquery-storage (>=2.6.0,<3.0.0dev)", "grpcio (>=1.47.0,<2.0dev)", "grpcio (>=1.49.1,<2.0dev)", "pyarrow (>=3.0.0)"] -geopandas = ["Shapely (>=1.8.4,<2.0dev)", "geopandas (>=0.9.0,<1.0dev)"] -ipython = ["ipykernel (>=6.0.0)", "ipython (>=7.23.1,!=8.1.0)"] -ipywidgets = ["ipykernel (>=6.0.0)", "ipywidgets (>=7.7.0)"] -opentelemetry = ["opentelemetry-api (>=1.1.0)", "opentelemetry-instrumentation (>=0.20b0)", "opentelemetry-sdk (>=1.1.0)"] -pandas = ["db-dtypes (>=0.3.0,<2.0.0dev)", "pandas (>=1.1.0)", "pyarrow (>=3.0.0)"] -tqdm = ["tqdm (>=4.7.4,<5.0.0dev)"] - -[[package]] -name = "google-cloud-bigquery-connection" -version = "1.13.2" -description = "Google Cloud Bigquery Connection API client library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-cloud-bigquery-connection-1.13.2.tar.gz", hash = "sha256:7890931545bd44710762b0eac6883bc4564543d8bd810258d073d38b7fef7a68"}, - {file = "google_cloud_bigquery_connection-1.13.2-py2.py3-none-any.whl", hash = "sha256:381e0ad995e0ea91162ff3cafbf02d1541d45dab5c00535e2bdfb0a281ae53c7"}, -] - -[package.dependencies] -google-api-core = {version = ">=1.34.0,<2.0.dev0 || >=2.11.dev0,<3.0.0dev", extras = ["grpc"]} -grpc-google-iam-v1 = ">=0.12.4,<1.0.0dev" -proto-plus = [ - {version = ">=1.22.2,<2.0.0dev", markers = "python_version >= \"3.11\""}, - {version = ">=1.22.0,<2.0.0dev", markers = "python_version < \"3.11\""}, -] -protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" - -[[package]] -name = "google-cloud-bigquery-storage" -version = "2.22.0" -description = "Google Cloud Bigquery Storage API client library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-cloud-bigquery-storage-2.22.0.tar.gz", hash = "sha256:f6d8c7b3ab9b574c66977fcee9d336e334ad1a3843a722be19123640e7808ea3"}, - {file = "google_cloud_bigquery_storage-2.22.0-py2.py3-none-any.whl", hash = "sha256:7f11b2ae590a5b3874fb6ddf705a66a070340db238f971cf7b53349eee9ca317"}, -] - -[package.dependencies] -google-api-core = {version = ">=1.34.0,<2.0.dev0 || >=2.11.dev0,<3.0.0dev", extras = ["grpc"]} -proto-plus = [ - {version = ">=1.22.2,<2.0.0dev", markers = "python_version >= \"3.11\""}, - {version = ">=1.22.0,<2.0.0dev", markers = "python_version < \"3.11\""}, -] -protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" - -[package.extras] -fastavro = ["fastavro (>=0.21.2)"] -pandas = ["pandas (>=0.21.1)"] -pyarrow = ["pyarrow (>=0.15.0)"] - -[[package]] -name = "google-cloud-core" -version = "2.3.3" -description = "Google Cloud API client core library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-cloud-core-2.3.3.tar.gz", hash = "sha256:37b80273c8d7eee1ae816b3a20ae43585ea50506cb0e60f3cf5be5f87f1373cb"}, - {file = "google_cloud_core-2.3.3-py2.py3-none-any.whl", hash = "sha256:fbd11cad3e98a7e5b0343dc07cb1039a5ffd7a5bb96e1f1e27cee4bda4a90863"}, -] - -[package.dependencies] -google-api-core = ">=1.31.6,<2.0.dev0 || >2.3.0,<3.0.0dev" -google-auth = ">=1.25.0,<3.0dev" - -[package.extras] -grpc = ["grpcio (>=1.38.0,<2.0dev)"] - -[[package]] -name = "google-cloud-storage" -version = "2.12.0" -description = "Google Cloud Storage API client library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-cloud-storage-2.12.0.tar.gz", hash = "sha256:57c0bcda2f5e11f008a155d8636d8381d5abab46b58e0cae0e46dd5e595e6b46"}, - {file = "google_cloud_storage-2.12.0-py2.py3-none-any.whl", hash = "sha256:bc52563439d42981b6e21b071a76da2791672776eda3ba99d13a8061ebbd6e5e"}, -] - -[package.dependencies] -google-api-core = ">=1.31.5,<2.0.dev0 || >2.3.0,<3.0.0dev" -google-auth = ">=2.23.3,<3.0dev" -google-cloud-core = ">=2.3.0,<3.0dev" -google-crc32c = ">=1.0,<2.0dev" -google-resumable-media = ">=2.6.0" -requests = ">=2.18.0,<3.0.0dev" - -[package.extras] -protobuf = ["protobuf (<5.0.0dev)"] - -[[package]] -name = "google-crc32c" -version = "1.5.0" -description = "A python wrapper of the C library 'Google CRC32C'" -optional = false -python-versions = ">=3.7" -files = [ - {file = "google-crc32c-1.5.0.tar.gz", hash = "sha256:89284716bc6a5a415d4eaa11b1726d2d60a0cd12aadf5439828353662ede9dd7"}, - {file = "google_crc32c-1.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:596d1f98fc70232fcb6590c439f43b350cb762fb5d61ce7b0e9db4539654cc13"}, - {file = "google_crc32c-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:be82c3c8cfb15b30f36768797a640e800513793d6ae1724aaaafe5bf86f8f346"}, - {file = "google_crc32c-1.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:461665ff58895f508e2866824a47bdee72497b091c730071f2b7575d5762ab65"}, - {file = "google_crc32c-1.5.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2096eddb4e7c7bdae4bd69ad364e55e07b8316653234a56552d9c988bd2d61b"}, - {file = "google_crc32c-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:116a7c3c616dd14a3de8c64a965828b197e5f2d121fedd2f8c5585c547e87b02"}, - {file = "google_crc32c-1.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5829b792bf5822fd0a6f6eb34c5f81dd074f01d570ed7f36aa101d6fc7a0a6e4"}, - {file = "google_crc32c-1.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:64e52e2b3970bd891309c113b54cf0e4384762c934d5ae56e283f9a0afcd953e"}, - {file = "google_crc32c-1.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:02ebb8bf46c13e36998aeaad1de9b48f4caf545e91d14041270d9dca767b780c"}, - {file = "google_crc32c-1.5.0-cp310-cp310-win32.whl", hash = "sha256:2e920d506ec85eb4ba50cd4228c2bec05642894d4c73c59b3a2fe20346bd00ee"}, - {file = "google_crc32c-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:07eb3c611ce363c51a933bf6bd7f8e3878a51d124acfc89452a75120bc436289"}, - {file = "google_crc32c-1.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:cae0274952c079886567f3f4f685bcaf5708f0a23a5f5216fdab71f81a6c0273"}, - {file = "google_crc32c-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1034d91442ead5a95b5aaef90dbfaca8633b0247d1e41621d1e9f9db88c36298"}, - {file = "google_crc32c-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7c42c70cd1d362284289c6273adda4c6af8039a8ae12dc451dcd61cdabb8ab57"}, - {file = "google_crc32c-1.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8485b340a6a9e76c62a7dce3c98e5f102c9219f4cfbf896a00cf48caf078d438"}, - {file = "google_crc32c-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77e2fd3057c9d78e225fa0a2160f96b64a824de17840351b26825b0848022906"}, - {file = "google_crc32c-1.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f583edb943cf2e09c60441b910d6a20b4d9d626c75a36c8fcac01a6c96c01183"}, - {file = "google_crc32c-1.5.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:a1fd716e7a01f8e717490fbe2e431d2905ab8aa598b9b12f8d10abebb36b04dd"}, - {file = "google_crc32c-1.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:72218785ce41b9cfd2fc1d6a017dc1ff7acfc4c17d01053265c41a2c0cc39b8c"}, - {file = "google_crc32c-1.5.0-cp311-cp311-win32.whl", hash = "sha256:66741ef4ee08ea0b2cc3c86916ab66b6aef03768525627fd6a1b34968b4e3709"}, - {file = "google_crc32c-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:ba1eb1843304b1e5537e1fca632fa894d6f6deca8d6389636ee5b4797affb968"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:98cb4d057f285bd80d8778ebc4fde6b4d509ac3f331758fb1528b733215443ae"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fd8536e902db7e365f49e7d9029283403974ccf29b13fc7028b97e2295b33556"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19e0a019d2c4dcc5e598cd4a4bc7b008546b0358bd322537c74ad47a5386884f"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02c65b9817512edc6a4ae7c7e987fea799d2e0ee40c53ec573a692bee24de876"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6ac08d24c1f16bd2bf5eca8eaf8304812f44af5cfe5062006ec676e7e1d50afc"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3359fc442a743e870f4588fcf5dcbc1bf929df1fad8fb9905cd94e5edb02e84c"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e986b206dae4476f41bcec1faa057851f3889503a70e1bdb2378d406223994a"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:de06adc872bcd8c2a4e0dc51250e9e65ef2ca91be023b9d13ebd67c2ba552e1e"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-win32.whl", hash = "sha256:d3515f198eaa2f0ed49f8819d5732d70698c3fa37384146079b3799b97667a94"}, - {file = "google_crc32c-1.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:67b741654b851abafb7bc625b6d1cdd520a379074e64b6a128e3b688c3c04740"}, - {file = "google_crc32c-1.5.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c02ec1c5856179f171e032a31d6f8bf84e5a75c45c33b2e20a3de353b266ebd8"}, - {file = "google_crc32c-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:edfedb64740750e1a3b16152620220f51d58ff1b4abceb339ca92e934775c27a"}, - {file = "google_crc32c-1.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:84e6e8cd997930fc66d5bb4fde61e2b62ba19d62b7abd7a69920406f9ecca946"}, - {file = "google_crc32c-1.5.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:024894d9d3cfbc5943f8f230e23950cd4906b2fe004c72e29b209420a1e6b05a"}, - {file = "google_crc32c-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:998679bf62b7fb599d2878aa3ed06b9ce688b8974893e7223c60db155f26bd8d"}, - {file = "google_crc32c-1.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:83c681c526a3439b5cf94f7420471705bbf96262f49a6fe546a6db5f687a3d4a"}, - {file = "google_crc32c-1.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4c6fdd4fccbec90cc8a01fc00773fcd5fa28db683c116ee3cb35cd5da9ef6c37"}, - {file = "google_crc32c-1.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5ae44e10a8e3407dbe138984f21e536583f2bba1be9491239f942c2464ac0894"}, - {file = "google_crc32c-1.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:37933ec6e693e51a5b07505bd05de57eee12f3e8c32b07da7e73669398e6630a"}, - {file = "google_crc32c-1.5.0-cp38-cp38-win32.whl", hash = "sha256:fe70e325aa68fa4b5edf7d1a4b6f691eb04bbccac0ace68e34820d283b5f80d4"}, - {file = "google_crc32c-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:74dea7751d98034887dbd821b7aae3e1d36eda111d6ca36c206c44478035709c"}, - {file = "google_crc32c-1.5.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c6c777a480337ac14f38564ac88ae82d4cd238bf293f0a22295b66eb89ffced7"}, - {file = "google_crc32c-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:759ce4851a4bb15ecabae28f4d2e18983c244eddd767f560165563bf9aefbc8d"}, - {file = "google_crc32c-1.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f13cae8cc389a440def0c8c52057f37359014ccbc9dc1f0827936bcd367c6100"}, - {file = "google_crc32c-1.5.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e560628513ed34759456a416bf86b54b2476c59144a9138165c9a1575801d0d9"}, - {file = "google_crc32c-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1674e4307fa3024fc897ca774e9c7562c957af85df55efe2988ed9056dc4e57"}, - {file = "google_crc32c-1.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:278d2ed7c16cfc075c91378c4f47924c0625f5fc84b2d50d921b18b7975bd210"}, - {file = "google_crc32c-1.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d5280312b9af0976231f9e317c20e4a61cd2f9629b7bfea6a693d1878a264ebd"}, - {file = "google_crc32c-1.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:8b87e1a59c38f275c0e3676fc2ab6d59eccecfd460be267ac360cc31f7bcde96"}, - {file = "google_crc32c-1.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7c074fece789b5034b9b1404a1f8208fc2d4c6ce9decdd16e8220c5a793e6f61"}, - {file = "google_crc32c-1.5.0-cp39-cp39-win32.whl", hash = "sha256:7f57f14606cd1dd0f0de396e1e53824c371e9544a822648cd76c034d209b559c"}, - {file = "google_crc32c-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:a2355cba1f4ad8b6988a4ca3feed5bff33f6af2d7f134852cf279c2aebfde541"}, - {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f314013e7dcd5cf45ab1945d92e713eec788166262ae8deb2cfacd53def27325"}, - {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b747a674c20a67343cb61d43fdd9207ce5da6a99f629c6e2541aa0e89215bcd"}, - {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8f24ed114432de109aa9fd317278518a5af2d31ac2ea6b952b2f7782b43da091"}, - {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8667b48e7a7ef66afba2c81e1094ef526388d35b873966d8a9a447974ed9178"}, - {file = "google_crc32c-1.5.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:1c7abdac90433b09bad6c43a43af253e688c9cfc1c86d332aed13f9a7c7f65e2"}, - {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:6f998db4e71b645350b9ac28a2167e6632c239963ca9da411523bb439c5c514d"}, - {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c99616c853bb585301df6de07ca2cadad344fd1ada6d62bb30aec05219c45d2"}, - {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2ad40e31093a4af319dadf503b2467ccdc8f67c72e4bcba97f8c10cb078207b5"}, - {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd67cf24a553339d5062eff51013780a00d6f97a39ca062781d06b3a73b15462"}, - {file = "google_crc32c-1.5.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:398af5e3ba9cf768787eef45c803ff9614cc3e22a5b2f7d7ae116df8b11e3314"}, - {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b1f8133c9a275df5613a451e73f36c2aea4fe13c5c8997e22cf355ebd7bd0728"}, - {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9ba053c5f50430a3fcfd36f75aff9caeba0440b2d076afdb79a318d6ca245f88"}, - {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:272d3892a1e1a2dbc39cc5cde96834c236d5327e2122d3aaa19f6614531bb6eb"}, - {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:635f5d4dd18758a1fbd1049a8e8d2fee4ffed124462d837d1a02a0e009c3ab31"}, - {file = "google_crc32c-1.5.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c672d99a345849301784604bfeaeba4db0c7aae50b95be04dd651fd2a7310b93"}, -] - -[package.extras] -testing = ["pytest"] - -[[package]] -name = "google-resumable-media" -version = "2.6.0" -description = "Utilities for Google Media Downloads and Resumable Uploads" -optional = false -python-versions = ">= 3.7" -files = [ - {file = "google-resumable-media-2.6.0.tar.gz", hash = "sha256:972852f6c65f933e15a4a210c2b96930763b47197cdf4aa5f5bea435efb626e7"}, - {file = "google_resumable_media-2.6.0-py2.py3-none-any.whl", hash = "sha256:fc03d344381970f79eebb632a3c18bb1828593a2dc5572b5f90115ef7d11e81b"}, -] - -[package.dependencies] -google-crc32c = ">=1.0,<2.0dev" - -[package.extras] -aiohttp = ["aiohttp (>=3.6.2,<4.0.0dev)", "google-auth (>=1.22.0,<2.0dev)"] -requests = ["requests (>=2.18.0,<3.0.0dev)"] - -[[package]] -name = "googleapis-common-protos" -version = "1.61.0" -description = "Common protobufs used in Google APIs" -optional = false -python-versions = ">=3.7" -files = [ - {file = "googleapis-common-protos-1.61.0.tar.gz", hash = "sha256:8a64866a97f6304a7179873a465d6eee97b7a24ec6cfd78e0f575e96b821240b"}, - {file = "googleapis_common_protos-1.61.0-py2.py3-none-any.whl", hash = "sha256:22f1915393bb3245343f6efe87f6fe868532efc12aa26b391b15132e1279f1c0"}, -] - -[package.dependencies] -grpcio = {version = ">=1.44.0,<2.0.0.dev0", optional = true, markers = "extra == \"grpc\""} -protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0.dev0" - -[package.extras] -grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"] - -[[package]] -name = "gql" -version = "3.4.1" -description = "GraphQL client for Python" -optional = false -python-versions = "*" -files = [ - {file = "gql-3.4.1-py2.py3-none-any.whl", hash = "sha256:315624ca0f4d571ef149d455033ebd35e45c1a13f18a059596aeddcea99135cf"}, - {file = "gql-3.4.1.tar.gz", hash = "sha256:11dc5d8715a827f2c2899593439a4f36449db4f0eafa5b1ea63948f8a2f8c545"}, -] - -[package.dependencies] -backoff = ">=1.11.1,<3.0" -graphql-core = ">=3.2,<3.3" -yarl = ">=1.6,<2.0" - -[package.extras] -aiohttp = ["aiohttp (>=3.7.1,<3.9.0)"] -all = ["aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26,<2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] -botocore = ["botocore (>=1.21,<2)"] -dev = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "black (==22.3.0)", "botocore (>=1.21,<2)", "check-manifest (>=0.42,<1)", "flake8 (==3.8.1)", "isort (==4.3.21)", "mock (==4.0.2)", "mypy (==0.910)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "sphinx (>=3.0.0,<4)", "sphinx-argparse (==0.2.5)", "sphinx-rtd-theme (>=0.4,<1)", "types-aiofiles", "types-mock", "types-requests", "urllib3 (>=1.26,<2)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] -requests = ["requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26,<2)"] -test = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26,<2)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] -test-no-transport = ["aiofiles", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "vcrpy (==4.0.2)"] -websockets = ["websockets (>=10,<11)", "websockets (>=9,<10)"] - -[[package]] -name = "graphql-core" -version = "3.2.3" -description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." -optional = false -python-versions = ">=3.6,<4" -files = [ - {file = "graphql-core-3.2.3.tar.gz", hash = "sha256:06d2aad0ac723e35b1cb47885d3e5c45e956a53bc1b209a9fc5369007fe46676"}, - {file = "graphql_core-3.2.3-py3-none-any.whl", hash = "sha256:5766780452bd5ec8ba133f8bf287dc92713e3868ddd83aee4faab9fc3e303dc3"}, -] - -[[package]] -name = "grpc-google-iam-v1" -version = "0.12.6" -description = "IAM API client library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "grpc-google-iam-v1-0.12.6.tar.gz", hash = "sha256:2bc4b8fdf22115a65d751c9317329322602c39b7c86a289c9b72d228d960ef5f"}, - {file = "grpc_google_iam_v1-0.12.6-py2.py3-none-any.whl", hash = "sha256:5c10f3d8dc2d88678ab1a9b0cb5482735c5efee71e6c0cd59f872eef22913f5c"}, -] - -[package.dependencies] -googleapis-common-protos = {version = ">=1.56.0,<2.0.0dev", extras = ["grpc"]} -grpcio = ">=1.44.0,<2.0.0dev" -protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" - -[[package]] -name = "grpcio" -version = "1.59.0" -description = "HTTP/2-based RPC framework" -optional = false -python-versions = ">=3.7" -files = [ - {file = "grpcio-1.59.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:225e5fa61c35eeaebb4e7491cd2d768cd8eb6ed00f2664fa83a58f29418b39fd"}, - {file = "grpcio-1.59.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:b95ec8ecc4f703f5caaa8d96e93e40c7f589bad299a2617bdb8becbcce525539"}, - {file = "grpcio-1.59.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:1a839ba86764cc48226f50b924216000c79779c563a301586a107bda9cbe9dcf"}, - {file = "grpcio-1.59.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f6cfe44a5d7c7d5f1017a7da1c8160304091ca5dc64a0f85bca0d63008c3137a"}, - {file = "grpcio-1.59.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0fcf53df684fcc0154b1e61f6b4a8c4cf5f49d98a63511e3f30966feff39cd0"}, - {file = "grpcio-1.59.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa66cac32861500f280bb60fe7d5b3e22d68c51e18e65367e38f8669b78cea3b"}, - {file = "grpcio-1.59.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8cd2d38c2d52f607d75a74143113174c36d8a416d9472415eab834f837580cf7"}, - {file = "grpcio-1.59.0-cp310-cp310-win32.whl", hash = "sha256:228b91ce454876d7eed74041aff24a8f04c0306b7250a2da99d35dd25e2a1211"}, - {file = "grpcio-1.59.0-cp310-cp310-win_amd64.whl", hash = "sha256:ca87ee6183421b7cea3544190061f6c1c3dfc959e0b57a5286b108511fd34ff4"}, - {file = "grpcio-1.59.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:c173a87d622ea074ce79be33b952f0b424fa92182063c3bda8625c11d3585d09"}, - {file = "grpcio-1.59.0-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:ec78aebb9b6771d6a1de7b6ca2f779a2f6113b9108d486e904bde323d51f5589"}, - {file = "grpcio-1.59.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:0b84445fa94d59e6806c10266b977f92fa997db3585f125d6b751af02ff8b9fe"}, - {file = "grpcio-1.59.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c251d22de8f9f5cca9ee47e4bade7c5c853e6e40743f47f5cc02288ee7a87252"}, - {file = "grpcio-1.59.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:956f0b7cb465a65de1bd90d5a7475b4dc55089b25042fe0f6c870707e9aabb1d"}, - {file = "grpcio-1.59.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:38da5310ef84e16d638ad89550b5b9424df508fd5c7b968b90eb9629ca9be4b9"}, - {file = "grpcio-1.59.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:63982150a7d598281fa1d7ffead6096e543ff8be189d3235dd2b5604f2c553e5"}, - {file = "grpcio-1.59.0-cp311-cp311-win32.whl", hash = "sha256:50eff97397e29eeee5df106ea1afce3ee134d567aa2c8e04fabab05c79d791a7"}, - {file = "grpcio-1.59.0-cp311-cp311-win_amd64.whl", hash = "sha256:15f03bd714f987d48ae57fe092cf81960ae36da4e520e729392a59a75cda4f29"}, - {file = "grpcio-1.59.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:f1feb034321ae2f718172d86b8276c03599846dc7bb1792ae370af02718f91c5"}, - {file = "grpcio-1.59.0-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:d09bd2a4e9f5a44d36bb8684f284835c14d30c22d8ec92ce796655af12163588"}, - {file = "grpcio-1.59.0-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:2f120d27051e4c59db2f267b71b833796770d3ea36ca712befa8c5fff5da6ebd"}, - {file = "grpcio-1.59.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba0ca727a173ee093f49ead932c051af463258b4b493b956a2c099696f38aa66"}, - {file = "grpcio-1.59.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5711c51e204dc52065f4a3327dca46e69636a0b76d3e98c2c28c4ccef9b04c52"}, - {file = "grpcio-1.59.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:d74f7d2d7c242a6af9d4d069552ec3669965b74fed6b92946e0e13b4168374f9"}, - {file = "grpcio-1.59.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3859917de234a0a2a52132489c4425a73669de9c458b01c9a83687f1f31b5b10"}, - {file = "grpcio-1.59.0-cp312-cp312-win32.whl", hash = "sha256:de2599985b7c1b4ce7526e15c969d66b93687571aa008ca749d6235d056b7205"}, - {file = "grpcio-1.59.0-cp312-cp312-win_amd64.whl", hash = "sha256:598f3530231cf10ae03f4ab92d48c3be1fee0c52213a1d5958df1a90957e6a88"}, - {file = "grpcio-1.59.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:b34c7a4c31841a2ea27246a05eed8a80c319bfc0d3e644412ec9ce437105ff6c"}, - {file = "grpcio-1.59.0-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:c4dfdb49f4997dc664f30116af2d34751b91aa031f8c8ee251ce4dcfc11277b0"}, - {file = "grpcio-1.59.0-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:61bc72a00ecc2b79d9695220b4d02e8ba53b702b42411397e831c9b0589f08a3"}, - {file = "grpcio-1.59.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f367e4b524cb319e50acbdea57bb63c3b717c5d561974ace0b065a648bb3bad3"}, - {file = "grpcio-1.59.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:849c47ef42424c86af069a9c5e691a765e304079755d5c29eff511263fad9c2a"}, - {file = "grpcio-1.59.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c0488c2b0528e6072010182075615620071371701733c63ab5be49140ed8f7f0"}, - {file = "grpcio-1.59.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:611d9aa0017fa386809bddcb76653a5ab18c264faf4d9ff35cb904d44745f575"}, - {file = "grpcio-1.59.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e5378785dce2b91eb2e5b857ec7602305a3b5cf78311767146464bfa365fc897"}, - {file = "grpcio-1.59.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:fe976910de34d21057bcb53b2c5e667843588b48bf11339da2a75f5c4c5b4055"}, - {file = "grpcio-1.59.0-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:c041a91712bf23b2a910f61e16565a05869e505dc5a5c025d429ca6de5de842c"}, - {file = "grpcio-1.59.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:0ae444221b2c16d8211b55326f8ba173ba8f8c76349bfc1768198ba592b58f74"}, - {file = "grpcio-1.59.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ceb1e68135788c3fce2211de86a7597591f0b9a0d2bb80e8401fd1d915991bac"}, - {file = "grpcio-1.59.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c4b1cc3a9dc1924d2eb26eec8792fedd4b3fcd10111e26c1d551f2e4eda79ce"}, - {file = "grpcio-1.59.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:871371ce0c0055d3db2a86fdebd1e1d647cf21a8912acc30052660297a5a6901"}, - {file = "grpcio-1.59.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:93e9cb546e610829e462147ce724a9cb108e61647a3454500438a6deef610be1"}, - {file = "grpcio-1.59.0-cp38-cp38-win32.whl", hash = "sha256:f21917aa50b40842b51aff2de6ebf9e2f6af3fe0971c31960ad6a3a2b24988f4"}, - {file = "grpcio-1.59.0-cp38-cp38-win_amd64.whl", hash = "sha256:14890da86a0c0e9dc1ea8e90101d7a3e0e7b1e71f4487fab36e2bfd2ecadd13c"}, - {file = "grpcio-1.59.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:34341d9e81a4b669a5f5dca3b2a760b6798e95cdda2b173e65d29d0b16692857"}, - {file = "grpcio-1.59.0-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:986de4aa75646e963466b386a8c5055c8b23a26a36a6c99052385d6fe8aaf180"}, - {file = "grpcio-1.59.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:aca8a24fef80bef73f83eb8153f5f5a0134d9539b4c436a716256b311dda90a6"}, - {file = "grpcio-1.59.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:936b2e04663660c600d5173bc2cc84e15adbad9c8f71946eb833b0afc205b996"}, - {file = "grpcio-1.59.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc8bf2e7bc725e76c0c11e474634a08c8f24bcf7426c0c6d60c8f9c6e70e4d4a"}, - {file = "grpcio-1.59.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:81d86a096ccd24a57fa5772a544c9e566218bc4de49e8c909882dae9d73392df"}, - {file = "grpcio-1.59.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2ea95cd6abbe20138b8df965b4a8674ec312aaef3147c0f46a0bac661f09e8d0"}, - {file = "grpcio-1.59.0-cp39-cp39-win32.whl", hash = "sha256:3b8ff795d35a93d1df6531f31c1502673d1cebeeba93d0f9bd74617381507e3f"}, - {file = "grpcio-1.59.0-cp39-cp39-win_amd64.whl", hash = "sha256:38823bd088c69f59966f594d087d3a929d1ef310506bee9e3648317660d65b81"}, - {file = "grpcio-1.59.0.tar.gz", hash = "sha256:acf70a63cf09dd494000007b798aff88a436e1c03b394995ce450be437b8e54f"}, -] - -[package.extras] -protobuf = ["grpcio-tools (>=1.59.0)"] - -[[package]] -name = "grpcio-status" -version = "1.59.0" -description = "Status proto mapping for gRPC" -optional = false -python-versions = ">=3.6" -files = [ - {file = "grpcio-status-1.59.0.tar.gz", hash = "sha256:f93b9c33e0a26162ef8431bfcffcc3e1fb217ccd8d7b5b3061b6e9f813e698b5"}, - {file = "grpcio_status-1.59.0-py3-none-any.whl", hash = "sha256:cb5a222b14a80ee050bff9676623822e953bff0c50d2d29180de723652fdf10d"}, -] - -[package.dependencies] -googleapis-common-protos = ">=1.5.5" -grpcio = ">=1.59.0" -protobuf = ">=4.21.6" - -[[package]] -name = "httplib2" -version = "0.22.0" -description = "A comprehensive HTTP client library." -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "httplib2-0.22.0-py3-none-any.whl", hash = "sha256:14ae0a53c1ba8f3d37e9e27cf37eabb0fb9980f435ba405d546948b009dd64dc"}, - {file = "httplib2-0.22.0.tar.gz", hash = "sha256:d7a10bc5ef5ab08322488bde8c726eeee5c8618723fdb399597ec58f3d82df81"}, -] - -[package.dependencies] -pyparsing = {version = ">=2.4.2,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.0.2 || >3.0.2,<3.0.3 || >3.0.3,<4", markers = "python_version > \"3.0\""} - -[[package]] -name = "idna" -version = "3.4" -description = "Internationalized Domain Names in Applications (IDNA)" -optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] - -[[package]] -name = "loguru" -version = "0.7.0" -description = "Python logging made (stupidly) simple" -optional = false -python-versions = ">=3.5" -files = [ - {file = "loguru-0.7.0-py3-none-any.whl", hash = "sha256:b93aa30099fa6860d4727f1b81f8718e965bb96253fa190fab2077aaad6d15d3"}, - {file = "loguru-0.7.0.tar.gz", hash = "sha256:1612053ced6ae84d7959dd7d5e431a0532642237ec21f7fd83ac73fe539e03e1"}, -] - -[package.dependencies] -colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} -win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} - -[package.extras] -dev = ["Sphinx (==5.3.0)", "colorama (==0.4.5)", "colorama (==0.4.6)", "freezegun (==1.1.0)", "freezegun (==1.2.2)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v0.990)", "pre-commit (==3.2.1)", "pytest (==6.1.2)", "pytest (==7.2.1)", "pytest-cov (==2.12.1)", "pytest-cov (==4.0.0)", "pytest-mypy-plugins (==1.10.1)", "pytest-mypy-plugins (==1.9.3)", "sphinx-autobuild (==2021.3.14)", "sphinx-rtd-theme (==1.2.0)", "tox (==3.27.1)", "tox (==4.4.6)"] - -[[package]] -name = "multidict" -version = "6.0.4" -description = "multidict implementation" -optional = false -python-versions = ">=3.7" -files = [ - {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8"}, - {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171"}, - {file = "multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5"}, - {file = "multidict-6.0.4-cp310-cp310-win32.whl", hash = "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8"}, - {file = "multidict-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461"}, - {file = "multidict-6.0.4-cp311-cp311-win32.whl", hash = "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636"}, - {file = "multidict-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0"}, - {file = "multidict-6.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d"}, - {file = "multidict-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775"}, - {file = "multidict-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1"}, - {file = "multidict-6.0.4-cp38-cp38-win32.whl", hash = "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779"}, - {file = "multidict-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95"}, - {file = "multidict-6.0.4-cp39-cp39-win32.whl", hash = "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313"}, - {file = "multidict-6.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2"}, - {file = "multidict-6.0.4.tar.gz", hash = "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49"}, -] - -[[package]] -name = "numpy" -version = "1.25.2" -description = "Fundamental package for array computing in Python" -optional = false -python-versions = ">=3.9" -files = [ - {file = "numpy-1.25.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:db3ccc4e37a6873045580d413fe79b68e47a681af8db2e046f1dacfa11f86eb3"}, - {file = "numpy-1.25.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:90319e4f002795ccfc9050110bbbaa16c944b1c37c0baeea43c5fb881693ae1f"}, - {file = "numpy-1.25.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dfe4a913e29b418d096e696ddd422d8a5d13ffba4ea91f9f60440a3b759b0187"}, - {file = "numpy-1.25.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f08f2e037bba04e707eebf4bc934f1972a315c883a9e0ebfa8a7756eabf9e357"}, - {file = "numpy-1.25.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bec1e7213c7cb00d67093247f8c4db156fd03075f49876957dca4711306d39c9"}, - {file = "numpy-1.25.2-cp310-cp310-win32.whl", hash = "sha256:7dc869c0c75988e1c693d0e2d5b26034644399dd929bc049db55395b1379e044"}, - {file = "numpy-1.25.2-cp310-cp310-win_amd64.whl", hash = "sha256:834b386f2b8210dca38c71a6e0f4fd6922f7d3fcff935dbe3a570945acb1b545"}, - {file = "numpy-1.25.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c5462d19336db4560041517dbb7759c21d181a67cb01b36ca109b2ae37d32418"}, - {file = "numpy-1.25.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c5652ea24d33585ea39eb6a6a15dac87a1206a692719ff45d53c5282e66d4a8f"}, - {file = "numpy-1.25.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d60fbae8e0019865fc4784745814cff1c421df5afee233db6d88ab4f14655a2"}, - {file = "numpy-1.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60e7f0f7f6d0eee8364b9a6304c2845b9c491ac706048c7e8cf47b83123b8dbf"}, - {file = "numpy-1.25.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bb33d5a1cf360304754913a350edda36d5b8c5331a8237268c48f91253c3a364"}, - {file = "numpy-1.25.2-cp311-cp311-win32.whl", hash = "sha256:5883c06bb92f2e6c8181df7b39971a5fb436288db58b5a1c3967702d4278691d"}, - {file = "numpy-1.25.2-cp311-cp311-win_amd64.whl", hash = "sha256:5c97325a0ba6f9d041feb9390924614b60b99209a71a69c876f71052521d42a4"}, - {file = "numpy-1.25.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b79e513d7aac42ae918db3ad1341a015488530d0bb2a6abcbdd10a3a829ccfd3"}, - {file = "numpy-1.25.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:eb942bfb6f84df5ce05dbf4b46673ffed0d3da59f13635ea9b926af3deb76926"}, - {file = "numpy-1.25.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e0746410e73384e70d286f93abf2520035250aad8c5714240b0492a7302fdca"}, - {file = "numpy-1.25.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7806500e4f5bdd04095e849265e55de20d8cc4b661b038957354327f6d9b295"}, - {file = "numpy-1.25.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8b77775f4b7df768967a7c8b3567e309f617dd5e99aeb886fa14dc1a0791141f"}, - {file = "numpy-1.25.2-cp39-cp39-win32.whl", hash = "sha256:2792d23d62ec51e50ce4d4b7d73de8f67a2fd3ea710dcbc8563a51a03fb07b01"}, - {file = "numpy-1.25.2-cp39-cp39-win_amd64.whl", hash = "sha256:76b4115d42a7dfc5d485d358728cdd8719be33cc5ec6ec08632a5d6fca2ed380"}, - {file = "numpy-1.25.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:1a1329e26f46230bf77b02cc19e900db9b52f398d6722ca853349a782d4cff55"}, - {file = "numpy-1.25.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c3abc71e8b6edba80a01a52e66d83c5d14433cbcd26a40c329ec7ed09f37901"}, - {file = "numpy-1.25.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:1b9735c27cea5d995496f46a8b1cd7b408b3f34b6d50459d9ac8fe3a20cc17bf"}, - {file = "numpy-1.25.2.tar.gz", hash = "sha256:fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760"}, -] - -[[package]] -name = "numpy" -version = "1.26.1" -description = "Fundamental package for array computing in Python" -optional = false -python-versions = "<3.13,>=3.9" -files = [ - {file = "numpy-1.26.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82e871307a6331b5f09efda3c22e03c095d957f04bf6bc1804f30048d0e5e7af"}, - {file = "numpy-1.26.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdd9ec98f0063d93baeb01aad472a1a0840dee302842a2746a7a8e92968f9575"}, - {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d78f269e0c4fd365fc2992c00353e4530d274ba68f15e968d8bc3c69ce5f5244"}, - {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ab9163ca8aeb7fd32fe93866490654d2f7dda4e61bc6297bf72ce07fdc02f67"}, - {file = "numpy-1.26.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:78ca54b2f9daffa5f323f34cdf21e1d9779a54073f0018a3094ab907938331a2"}, - {file = "numpy-1.26.1-cp310-cp310-win32.whl", hash = "sha256:d1cfc92db6af1fd37a7bb58e55c8383b4aa1ba23d012bdbba26b4bcca45ac297"}, - {file = "numpy-1.26.1-cp310-cp310-win_amd64.whl", hash = "sha256:d2984cb6caaf05294b8466966627e80bf6c7afd273279077679cb010acb0e5ab"}, - {file = "numpy-1.26.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cd7837b2b734ca72959a1caf3309457a318c934abef7a43a14bb984e574bbb9a"}, - {file = "numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c59c046c31a43310ad0199d6299e59f57a289e22f0f36951ced1c9eac3665b9"}, - {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d58e8c51a7cf43090d124d5073bc29ab2755822181fcad978b12e144e5e5a4b3"}, - {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6081aed64714a18c72b168a9276095ef9155dd7888b9e74b5987808f0dd0a974"}, - {file = "numpy-1.26.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:97e5d6a9f0702c2863aaabf19f0d1b6c2628fbe476438ce0b5ce06e83085064c"}, - {file = "numpy-1.26.1-cp311-cp311-win32.whl", hash = "sha256:b9d45d1dbb9de84894cc50efece5b09939752a2d75aab3a8b0cef6f3a35ecd6b"}, - {file = "numpy-1.26.1-cp311-cp311-win_amd64.whl", hash = "sha256:3649d566e2fc067597125428db15d60eb42a4e0897fc48d28cb75dc2e0454e53"}, - {file = "numpy-1.26.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1d1bd82d539607951cac963388534da3b7ea0e18b149a53cf883d8f699178c0f"}, - {file = "numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:afd5ced4e5a96dac6725daeb5242a35494243f2239244fad10a90ce58b071d24"}, - {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a03fb25610ef560a6201ff06df4f8105292ba56e7cdd196ea350d123fc32e24e"}, - {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcfaf015b79d1f9f9c9fd0731a907407dc3e45769262d657d754c3a028586124"}, - {file = "numpy-1.26.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e509cbc488c735b43b5ffea175235cec24bbc57b227ef1acc691725beb230d1c"}, - {file = "numpy-1.26.1-cp312-cp312-win32.whl", hash = "sha256:af22f3d8e228d84d1c0c44c1fbdeb80f97a15a0abe4f080960393a00db733b66"}, - {file = "numpy-1.26.1-cp312-cp312-win_amd64.whl", hash = "sha256:9f42284ebf91bdf32fafac29d29d4c07e5e9d1af862ea73686581773ef9e73a7"}, - {file = "numpy-1.26.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bb894accfd16b867d8643fc2ba6c8617c78ba2828051e9a69511644ce86ce83e"}, - {file = "numpy-1.26.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e44ccb93f30c75dfc0c3aa3ce38f33486a75ec9abadabd4e59f114994a9c4617"}, - {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9696aa2e35cc41e398a6d42d147cf326f8f9d81befcb399bc1ed7ffea339b64e"}, - {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5b411040beead47a228bde3b2241100454a6abde9df139ed087bd73fc0a4908"}, - {file = "numpy-1.26.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1e11668d6f756ca5ef534b5be8653d16c5352cbb210a5c2a79ff288e937010d5"}, - {file = "numpy-1.26.1-cp39-cp39-win32.whl", hash = "sha256:d1d2c6b7dd618c41e202c59c1413ef9b2c8e8a15f5039e344af64195459e3104"}, - {file = "numpy-1.26.1-cp39-cp39-win_amd64.whl", hash = "sha256:59227c981d43425ca5e5c01094d59eb14e8772ce6975d4b2fc1e106a833d5ae2"}, - {file = "numpy-1.26.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:06934e1a22c54636a059215d6da99e23286424f316fddd979f5071093b648668"}, - {file = "numpy-1.26.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76ff661a867d9272cd2a99eed002470f46dbe0943a5ffd140f49be84f68ffc42"}, - {file = "numpy-1.26.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:6965888d65d2848e8768824ca8288db0a81263c1efccec881cb35a0d805fcd2f"}, - {file = "numpy-1.26.1.tar.gz", hash = "sha256:c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe"}, -] - -[[package]] -name = "oauthlib" -version = "3.2.2" -description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" -optional = false -python-versions = ">=3.6" -files = [ - {file = "oauthlib-3.2.2-py3-none-any.whl", hash = "sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca"}, - {file = "oauthlib-3.2.2.tar.gz", hash = "sha256:9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918"}, -] - -[package.extras] -rsa = ["cryptography (>=3.0.0)"] -signals = ["blinker (>=1.4.0)"] -signedtoken = ["cryptography (>=3.0.0)", "pyjwt (>=2.0.0,<3)"] - -[[package]] -name = "packaging" -version = "23.2" -description = "Core utilities for Python packages" -optional = false -python-versions = ">=3.7" -files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, -] - -[[package]] -name = "pandas" -version = "2.1.0" -description = "Powerful data structures for data analysis, time series, and statistics" -optional = false -python-versions = ">=3.9" -files = [ - {file = "pandas-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:40dd20439ff94f1b2ed55b393ecee9cb6f3b08104c2c40b0cb7186a2f0046242"}, - {file = "pandas-2.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d4f38e4fedeba580285eaac7ede4f686c6701a9e618d8a857b138a126d067f2f"}, - {file = "pandas-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e6a0fe052cf27ceb29be9429428b4918f3740e37ff185658f40d8702f0b3e09"}, - {file = "pandas-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d81e1813191070440d4c7a413cb673052b3b4a984ffd86b8dd468c45742d3cc"}, - {file = "pandas-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:eb20252720b1cc1b7d0b2879ffc7e0542dd568f24d7c4b2347cb035206936421"}, - {file = "pandas-2.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:38f74ef7ebc0ffb43b3d633e23d74882bce7e27bfa09607f3c5d3e03ffd9a4a5"}, - {file = "pandas-2.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cda72cc8c4761c8f1d97b169661f23a86b16fdb240bdc341173aee17e4d6cedd"}, - {file = "pandas-2.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d97daeac0db8c993420b10da4f5f5b39b01fc9ca689a17844e07c0a35ac96b4b"}, - {file = "pandas-2.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8c58b1113892e0c8078f006a167cc210a92bdae23322bb4614f2f0b7a4b510f"}, - {file = "pandas-2.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:629124923bcf798965b054a540f9ccdfd60f71361255c81fa1ecd94a904b9dd3"}, - {file = "pandas-2.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:70cf866af3ab346a10debba8ea78077cf3a8cd14bd5e4bed3d41555a3280041c"}, - {file = "pandas-2.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:d53c8c1001f6a192ff1de1efe03b31a423d0eee2e9e855e69d004308e046e694"}, - {file = "pandas-2.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:86f100b3876b8c6d1a2c66207288ead435dc71041ee4aea789e55ef0e06408cb"}, - {file = "pandas-2.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28f330845ad21c11db51e02d8d69acc9035edfd1116926ff7245c7215db57957"}, - {file = "pandas-2.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9a6ccf0963db88f9b12df6720e55f337447aea217f426a22d71f4213a3099a6"}, - {file = "pandas-2.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d99e678180bc59b0c9443314297bddce4ad35727a1a2656dbe585fd78710b3b9"}, - {file = "pandas-2.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b31da36d376d50a1a492efb18097b9101bdbd8b3fbb3f49006e02d4495d4c644"}, - {file = "pandas-2.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:0164b85937707ec7f70b34a6c3a578dbf0f50787f910f21ca3b26a7fd3363437"}, - {file = "pandas-2.1.0.tar.gz", hash = "sha256:62c24c7fc59e42b775ce0679cfa7b14a5f9bfb7643cfbe708c960699e05fb918"}, -] - -[package.dependencies] -numpy = {version = ">=1.23.2", markers = "python_version >= \"3.11\""} -python-dateutil = ">=2.8.2" -pytz = ">=2020.1" -tzdata = ">=2022.1" - -[package.extras] -all = ["PyQt5 (>=5.15.6)", "SQLAlchemy (>=1.4.36)", "beautifulsoup4 (>=4.11.1)", "bottleneck (>=1.3.4)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=0.8.1)", "fsspec (>=2022.05.0)", "gcsfs (>=2022.05.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.8.0)", "matplotlib (>=3.6.1)", "numba (>=0.55.2)", "numexpr (>=2.8.0)", "odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pandas-gbq (>=0.17.5)", "psycopg2 (>=2.9.3)", "pyarrow (>=7.0.0)", "pymysql (>=1.0.2)", "pyreadstat (>=1.1.5)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)", "pyxlsb (>=1.0.9)", "qtpy (>=2.2.0)", "s3fs (>=2022.05.0)", "scipy (>=1.8.1)", "tables (>=3.7.0)", "tabulate (>=0.8.10)", "xarray (>=2022.03.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)", "zstandard (>=0.17.0)"] -aws = ["s3fs (>=2022.05.0)"] -clipboard = ["PyQt5 (>=5.15.6)", "qtpy (>=2.2.0)"] -compression = ["zstandard (>=0.17.0)"] -computation = ["scipy (>=1.8.1)", "xarray (>=2022.03.0)"] -consortium-standard = ["dataframe-api-compat (>=0.1.7)"] -excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pyxlsb (>=1.0.9)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)"] -feather = ["pyarrow (>=7.0.0)"] -fss = ["fsspec (>=2022.05.0)"] -gcp = ["gcsfs (>=2022.05.0)", "pandas-gbq (>=0.17.5)"] -hdf5 = ["tables (>=3.7.0)"] -html = ["beautifulsoup4 (>=4.11.1)", "html5lib (>=1.1)", "lxml (>=4.8.0)"] -mysql = ["SQLAlchemy (>=1.4.36)", "pymysql (>=1.0.2)"] -output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.8.10)"] -parquet = ["pyarrow (>=7.0.0)"] -performance = ["bottleneck (>=1.3.4)", "numba (>=0.55.2)", "numexpr (>=2.8.0)"] -plot = ["matplotlib (>=3.6.1)"] -postgresql = ["SQLAlchemy (>=1.4.36)", "psycopg2 (>=2.9.3)"] -spss = ["pyreadstat (>=1.1.5)"] -sql-other = ["SQLAlchemy (>=1.4.36)"] -test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)"] -xml = ["lxml (>=4.8.0)"] - -[[package]] -name = "pandas" -version = "2.1.1" -description = "Powerful data structures for data analysis, time series, and statistics" -optional = false -python-versions = ">=3.9" -files = [ - {file = "pandas-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:58d997dbee0d4b64f3cb881a24f918b5f25dd64ddf31f467bb9b67ae4c63a1e4"}, - {file = "pandas-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02304e11582c5d090e5a52aec726f31fe3f42895d6bfc1f28738f9b64b6f0614"}, - {file = "pandas-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffa8f0966de2c22de408d0e322db2faed6f6e74265aa0856f3824813cf124363"}, - {file = "pandas-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1f84c144dee086fe4f04a472b5cd51e680f061adf75c1ae4fc3a9275560f8f4"}, - {file = "pandas-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:75ce97667d06d69396d72be074f0556698c7f662029322027c226fd7a26965cb"}, - {file = "pandas-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:4c3f32fd7c4dccd035f71734df39231ac1a6ff95e8bdab8d891167197b7018d2"}, - {file = "pandas-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9e2959720b70e106bb1d8b6eadd8ecd7c8e99ccdbe03ee03260877184bb2877d"}, - {file = "pandas-2.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:25e8474a8eb258e391e30c288eecec565bfed3e026f312b0cbd709a63906b6f8"}, - {file = "pandas-2.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b8bd1685556f3374520466998929bade3076aeae77c3e67ada5ed2b90b4de7f0"}, - {file = "pandas-2.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc3657869c7902810f32bd072f0740487f9e030c1a3ab03e0af093db35a9d14e"}, - {file = "pandas-2.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:05674536bd477af36aa2effd4ec8f71b92234ce0cc174de34fd21e2ee99adbc2"}, - {file = "pandas-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:b407381258a667df49d58a1b637be33e514b07f9285feb27769cedb3ab3d0b3a"}, - {file = "pandas-2.1.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c747793c4e9dcece7bb20156179529898abf505fe32cb40c4052107a3c620b49"}, - {file = "pandas-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3bcad1e6fb34b727b016775bea407311f7721db87e5b409e6542f4546a4951ea"}, - {file = "pandas-2.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5ec7740f9ccb90aec64edd71434711f58ee0ea7f5ed4ac48be11cfa9abf7317"}, - {file = "pandas-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:29deb61de5a8a93bdd033df328441a79fcf8dd3c12d5ed0b41a395eef9cd76f0"}, - {file = "pandas-2.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4f99bebf19b7e03cf80a4e770a3e65eee9dd4e2679039f542d7c1ace7b7b1daa"}, - {file = "pandas-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:84e7e910096416adec68075dc87b986ff202920fb8704e6d9c8c9897fe7332d6"}, - {file = "pandas-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:366da7b0e540d1b908886d4feb3d951f2f1e572e655c1160f5fde28ad4abb750"}, - {file = "pandas-2.1.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9e50e72b667415a816ac27dfcfe686dc5a0b02202e06196b943d54c4f9c7693e"}, - {file = "pandas-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc1ab6a25da197f03ebe6d8fa17273126120874386b4ac11c1d687df288542dd"}, - {file = "pandas-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0dbfea0dd3901ad4ce2306575c54348d98499c95be01b8d885a2737fe4d7a98"}, - {file = "pandas-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0489b0e6aa3d907e909aef92975edae89b1ee1654db5eafb9be633b0124abe97"}, - {file = "pandas-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:4cdb0fab0400c2cb46dafcf1a0fe084c8bb2480a1fa8d81e19d15e12e6d4ded2"}, - {file = "pandas-2.1.1.tar.gz", hash = "sha256:fecb198dc389429be557cde50a2d46da8434a17fe37d7d41ff102e3987fd947b"}, -] - -[package.dependencies] -numpy = [ - {version = ">=1.23.2", markers = "python_version == \"3.11\""}, - {version = ">=1.22.4", markers = "python_version < \"3.11\""}, -] -python-dateutil = ">=2.8.2" -pytz = ">=2020.1" -tzdata = ">=2022.1" - -[package.extras] -all = ["PyQt5 (>=5.15.6)", "SQLAlchemy (>=1.4.36)", "beautifulsoup4 (>=4.11.1)", "bottleneck (>=1.3.4)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=0.8.1)", "fsspec (>=2022.05.0)", "gcsfs (>=2022.05.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.8.0)", "matplotlib (>=3.6.1)", "numba (>=0.55.2)", "numexpr (>=2.8.0)", "odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pandas-gbq (>=0.17.5)", "psycopg2 (>=2.9.3)", "pyarrow (>=7.0.0)", "pymysql (>=1.0.2)", "pyreadstat (>=1.1.5)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)", "pyxlsb (>=1.0.9)", "qtpy (>=2.2.0)", "s3fs (>=2022.05.0)", "scipy (>=1.8.1)", "tables (>=3.7.0)", "tabulate (>=0.8.10)", "xarray (>=2022.03.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)", "zstandard (>=0.17.0)"] -aws = ["s3fs (>=2022.05.0)"] -clipboard = ["PyQt5 (>=5.15.6)", "qtpy (>=2.2.0)"] -compression = ["zstandard (>=0.17.0)"] -computation = ["scipy (>=1.8.1)", "xarray (>=2022.03.0)"] -consortium-standard = ["dataframe-api-compat (>=0.1.7)"] -excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pyxlsb (>=1.0.9)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)"] -feather = ["pyarrow (>=7.0.0)"] -fss = ["fsspec (>=2022.05.0)"] -gcp = ["gcsfs (>=2022.05.0)", "pandas-gbq (>=0.17.5)"] -hdf5 = ["tables (>=3.7.0)"] -html = ["beautifulsoup4 (>=4.11.1)", "html5lib (>=1.1)", "lxml (>=4.8.0)"] -mysql = ["SQLAlchemy (>=1.4.36)", "pymysql (>=1.0.2)"] -output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.8.10)"] -parquet = ["pyarrow (>=7.0.0)"] -performance = ["bottleneck (>=1.3.4)", "numba (>=0.55.2)", "numexpr (>=2.8.0)"] -plot = ["matplotlib (>=3.6.1)"] -postgresql = ["SQLAlchemy (>=1.4.36)", "psycopg2 (>=2.9.3)"] -spss = ["pyreadstat (>=1.1.5)"] -sql-other = ["SQLAlchemy (>=1.4.36)"] -test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)"] -xml = ["lxml (>=4.8.0)"] - -[[package]] -name = "pandas-gbq" -version = "0.19.2" -description = "Google BigQuery connector for pandas" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pandas-gbq-0.19.2.tar.gz", hash = "sha256:b0f7fa84a2be0fe767e33a008ca7e4ad9a9e3ac67255fd0a41fc19b503138447"}, - {file = "pandas_gbq-0.19.2-py2.py3-none-any.whl", hash = "sha256:0ef8da3e4088053a2bea069ed688992a44b52af67dadb97eee494b32a2147563"}, -] - -[package.dependencies] -db-dtypes = ">=1.0.4,<2.0.0" -google-api-core = ">=2.10.2,<3.0.0dev" -google-auth = ">=2.13.0" -google-auth-oauthlib = ">=0.7.0" -google-cloud-bigquery = ">=3.3.5,<4.0.0dev" -google-cloud-bigquery-storage = ">=2.16.2,<3.0.0dev" -numpy = ">=1.16.6" -pandas = ">=1.1.4" -pyarrow = ">=3.0.0" -pydata-google-auth = ">=1.5.0" -setuptools = "*" - -[package.extras] -tqdm = ["tqdm (>=4.23.0)"] - -[[package]] -name = "proto-plus" -version = "1.22.3" -description = "Beautiful, Pythonic protocol buffers." -optional = false -python-versions = ">=3.6" -files = [ - {file = "proto-plus-1.22.3.tar.gz", hash = "sha256:fdcd09713cbd42480740d2fe29c990f7fbd885a67efc328aa8be6ee3e9f76a6b"}, - {file = "proto_plus-1.22.3-py3-none-any.whl", hash = "sha256:a49cd903bc0b6ab41f76bf65510439d56ca76f868adf0274e738bfdd096894df"}, -] - -[package.dependencies] -protobuf = ">=3.19.0,<5.0.0dev" - -[package.extras] -testing = ["google-api-core[grpc] (>=1.31.5)"] - -[[package]] -name = "protobuf" -version = "4.24.4" -description = "" -optional = false -python-versions = ">=3.7" -files = [ - {file = "protobuf-4.24.4-cp310-abi3-win32.whl", hash = "sha256:ec9912d5cb6714a5710e28e592ee1093d68c5ebfeda61983b3f40331da0b1ebb"}, - {file = "protobuf-4.24.4-cp310-abi3-win_amd64.whl", hash = "sha256:1badab72aa8a3a2b812eacfede5020472e16c6b2212d737cefd685884c191085"}, - {file = "protobuf-4.24.4-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:8e61a27f362369c2f33248a0ff6896c20dcd47b5d48239cb9720134bef6082e4"}, - {file = "protobuf-4.24.4-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:bffa46ad9612e6779d0e51ae586fde768339b791a50610d85eb162daeb23661e"}, - {file = "protobuf-4.24.4-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:b493cb590960ff863743b9ff1452c413c2ee12b782f48beca77c8da3e2ffe9d9"}, - {file = "protobuf-4.24.4-cp37-cp37m-win32.whl", hash = "sha256:dbbed8a56e56cee8d9d522ce844a1379a72a70f453bde6243e3c86c30c2a3d46"}, - {file = "protobuf-4.24.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6b7d2e1c753715dcfe9d284a25a52d67818dd43c4932574307daf836f0071e37"}, - {file = "protobuf-4.24.4-cp38-cp38-win32.whl", hash = "sha256:02212557a76cd99574775a81fefeba8738d0f668d6abd0c6b1d3adcc75503dbe"}, - {file = "protobuf-4.24.4-cp38-cp38-win_amd64.whl", hash = "sha256:2fa3886dfaae6b4c5ed2730d3bf47c7a38a72b3a1f0acb4d4caf68e6874b947b"}, - {file = "protobuf-4.24.4-cp39-cp39-win32.whl", hash = "sha256:b77272f3e28bb416e2071186cb39efd4abbf696d682cbb5dc731308ad37fa6dd"}, - {file = "protobuf-4.24.4-cp39-cp39-win_amd64.whl", hash = "sha256:9fee5e8aa20ef1b84123bb9232b3f4a5114d9897ed89b4b8142d81924e05d79b"}, - {file = "protobuf-4.24.4-py3-none-any.whl", hash = "sha256:80797ce7424f8c8d2f2547e2d42bfbb6c08230ce5832d6c099a37335c9c90a92"}, - {file = "protobuf-4.24.4.tar.gz", hash = "sha256:5a70731910cd9104762161719c3d883c960151eea077134458503723b60e3667"}, -] - -[[package]] -name = "pyarrow" -version = "13.0.0" -description = "Python library for Apache Arrow" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pyarrow-13.0.0-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:1afcc2c33f31f6fb25c92d50a86b7a9f076d38acbcb6f9e74349636109550148"}, - {file = "pyarrow-13.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:70fa38cdc66b2fc1349a082987f2b499d51d072faaa6b600f71931150de2e0e3"}, - {file = "pyarrow-13.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd57b13a6466822498238877892a9b287b0a58c2e81e4bdb0b596dbb151cbb73"}, - {file = "pyarrow-13.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8ce69f7bf01de2e2764e14df45b8404fc6f1a5ed9871e8e08a12169f87b7a26"}, - {file = "pyarrow-13.0.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:588f0d2da6cf1b1680974d63be09a6530fd1bd825dc87f76e162404779a157dc"}, - {file = "pyarrow-13.0.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:6241afd72b628787b4abea39e238e3ff9f34165273fad306c7acf780dd850956"}, - {file = "pyarrow-13.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:fda7857e35993673fcda603c07d43889fca60a5b254052a462653f8656c64f44"}, - {file = "pyarrow-13.0.0-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:aac0ae0146a9bfa5e12d87dda89d9ef7c57a96210b899459fc2f785303dcbb67"}, - {file = "pyarrow-13.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d7759994217c86c161c6a8060509cfdf782b952163569606bb373828afdd82e8"}, - {file = "pyarrow-13.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:868a073fd0ff6468ae7d869b5fc1f54de5c4255b37f44fb890385eb68b68f95d"}, - {file = "pyarrow-13.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51be67e29f3cfcde263a113c28e96aa04362ed8229cb7c6e5f5c719003659d33"}, - {file = "pyarrow-13.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:d1b4e7176443d12610874bb84d0060bf080f000ea9ed7c84b2801df851320295"}, - {file = "pyarrow-13.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:69b6f9a089d116a82c3ed819eea8fe67dae6105f0d81eaf0fdd5e60d0c6e0944"}, - {file = "pyarrow-13.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:ab1268db81aeb241200e321e220e7cd769762f386f92f61b898352dd27e402ce"}, - {file = "pyarrow-13.0.0-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:ee7490f0f3f16a6c38f8c680949551053c8194e68de5046e6c288e396dccee80"}, - {file = "pyarrow-13.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3ad79455c197a36eefbd90ad4aa832bece7f830a64396c15c61a0985e337287"}, - {file = "pyarrow-13.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68fcd2dc1b7d9310b29a15949cdd0cb9bc34b6de767aff979ebf546020bf0ba0"}, - {file = "pyarrow-13.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc6fd330fd574c51d10638e63c0d00ab456498fc804c9d01f2a61b9264f2c5b2"}, - {file = "pyarrow-13.0.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:e66442e084979a97bb66939e18f7b8709e4ac5f887e636aba29486ffbf373763"}, - {file = "pyarrow-13.0.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:0f6eff839a9e40e9c5610d3ff8c5bdd2f10303408312caf4c8003285d0b49565"}, - {file = "pyarrow-13.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b30a27f1cddf5c6efcb67e598d7823a1e253d743d92ac32ec1eb4b6a1417867"}, - {file = "pyarrow-13.0.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:09552dad5cf3de2dc0aba1c7c4b470754c69bd821f5faafc3d774bedc3b04bb7"}, - {file = "pyarrow-13.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3896ae6c205d73ad192d2fc1489cd0edfab9f12867c85b4c277af4d37383c18c"}, - {file = "pyarrow-13.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6647444b21cb5e68b593b970b2a9a07748dd74ea457c7dadaa15fd469c48ada1"}, - {file = "pyarrow-13.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47663efc9c395e31d09c6aacfa860f4473815ad6804311c5433f7085415d62a7"}, - {file = "pyarrow-13.0.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:b9ba6b6d34bd2563345488cf444510588ea42ad5613df3b3509f48eb80250afd"}, - {file = "pyarrow-13.0.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:d00d374a5625beeb448a7fa23060df79adb596074beb3ddc1838adb647b6ef09"}, - {file = "pyarrow-13.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:c51afd87c35c8331b56f796eff954b9c7f8d4b7fef5903daf4e05fcf017d23a8"}, - {file = "pyarrow-13.0.0.tar.gz", hash = "sha256:83333726e83ed44b0ac94d8d7a21bbdee4a05029c3b1e8db58a863eec8fd8a33"}, -] - -[package.dependencies] -numpy = ">=1.16.6" - -[[package]] -name = "pyasn1" -version = "0.5.0" -description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" -files = [ - {file = "pyasn1-0.5.0-py2.py3-none-any.whl", hash = "sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57"}, - {file = "pyasn1-0.5.0.tar.gz", hash = "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"}, -] - -[[package]] -name = "pyasn1-modules" -version = "0.3.0" -description = "A collection of ASN.1-based protocols modules" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" -files = [ - {file = "pyasn1_modules-0.3.0-py2.py3-none-any.whl", hash = "sha256:d3ccd6ed470d9ffbc716be08bd90efbd44d0734bc9303818f7336070984a162d"}, - {file = "pyasn1_modules-0.3.0.tar.gz", hash = "sha256:5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c"}, -] - -[package.dependencies] -pyasn1 = ">=0.4.6,<0.6.0" - -[[package]] -name = "pydata-google-auth" -version = "1.8.2" -description = "PyData helpers for authenticating to Google APIs" -optional = false -python-versions = "*" -files = [ - {file = "pydata-google-auth-1.8.2.tar.gz", hash = "sha256:547b6c0fbea657dcecd50887c5db8640ebec062a59a2b88e8ff8e53a04818303"}, - {file = "pydata_google_auth-1.8.2-py2.py3-none-any.whl", hash = "sha256:a9dce59af4a170ea60c4b2ebbc83ee1f74d34255a4f97b2469ae9a4a0dc98e99"}, -] - -[package.dependencies] -google-auth = {version = ">=1.25.0,<3.0dev", markers = "python_version >= \"3.6\""} -google-auth-oauthlib = {version = ">=0.4.0", markers = "python_version >= \"3.6\""} -setuptools = "*" - -[[package]] -name = "pyparsing" -version = "3.1.1" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" -optional = false -python-versions = ">=3.6.8" -files = [ - {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, - {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, -] - -[package.extras] -diagrams = ["jinja2", "railroad-diagrams"] - -[[package]] -name = "python-dateutil" -version = "2.8.2" -description = "Extensions to the standard Python datetime module" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "pytz" -version = "2023.3.post1" -description = "World timezone definitions, modern and historical" -optional = false -python-versions = "*" -files = [ - {file = "pytz-2023.3.post1-py2.py3-none-any.whl", hash = "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7"}, - {file = "pytz-2023.3.post1.tar.gz", hash = "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b"}, -] - -[[package]] -name = "requests" -version = "2.31.0" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.7" -files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "requests-oauthlib" -version = "1.3.1" -description = "OAuthlib authentication support for Requests." -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "requests-oauthlib-1.3.1.tar.gz", hash = "sha256:75beac4a47881eeb94d5ea5d6ad31ef88856affe2332b9aafb52c6452ccf0d7a"}, - {file = "requests_oauthlib-1.3.1-py2.py3-none-any.whl", hash = "sha256:2577c501a2fb8d05a304c09d090d6e47c306fef15809d102b327cf8364bddab5"}, -] - -[package.dependencies] -oauthlib = ">=3.0.0" -requests = ">=2.0.0" - -[package.extras] -rsa = ["oauthlib[signedtoken] (>=3.0.0)"] - -[[package]] -name = "requests-toolbelt" -version = "1.0.0" -description = "A utility belt for advanced users of python-requests" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, - {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, -] - -[package.dependencies] -requests = ">=2.0.1,<3.0.0" - -[[package]] -name = "rsa" -version = "4.9" -description = "Pure-Python RSA implementation" -optional = false -python-versions = ">=3.6,<4" -files = [ - {file = "rsa-4.9-py3-none-any.whl", hash = "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7"}, - {file = "rsa-4.9.tar.gz", hash = "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21"}, -] - -[package.dependencies] -pyasn1 = ">=0.1.3" - -[[package]] -name = "setuptools" -version = "68.2.2" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-68.2.2-py3-none-any.whl", hash = "sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a"}, - {file = "setuptools-68.2.2.tar.gz", hash = "sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - -[[package]] -name = "tomlkit" -version = "0.11.8" -description = "Style preserving TOML library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomlkit-0.11.8-py3-none-any.whl", hash = "sha256:8c726c4c202bdb148667835f68d68780b9a003a9ec34167b6c673b38eff2a171"}, - {file = "tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, -] - -[[package]] -name = "tqdm" -version = "4.66.1" -description = "Fast, Extensible Progress Meter" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tqdm-4.66.1-py3-none-any.whl", hash = "sha256:d302b3c5b53d47bce91fea46679d9c3c6508cf6332229aa1e7d8653723793386"}, - {file = "tqdm-4.66.1.tar.gz", hash = "sha256:d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[package.extras] -dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"] -notebook = ["ipywidgets (>=6)"] -slack = ["slack-sdk"] -telegram = ["requests"] - -[[package]] -name = "tzdata" -version = "2023.3" -description = "Provider of IANA time zone data" -optional = false -python-versions = ">=2" -files = [ - {file = "tzdata-2023.3-py2.py3-none-any.whl", hash = "sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda"}, - {file = "tzdata-2023.3.tar.gz", hash = "sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a"}, -] - -[[package]] -name = "uritemplate" -version = "4.1.1" -description = "Implementation of RFC 6570 URI Templates" -optional = false -python-versions = ">=3.6" -files = [ - {file = "uritemplate-4.1.1-py2.py3-none-any.whl", hash = "sha256:830c08b8d99bdd312ea4ead05994a38e8936266f84b9a7878232db50b044e02e"}, - {file = "uritemplate-4.1.1.tar.gz", hash = "sha256:4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0"}, -] - -[[package]] -name = "urllib3" -version = "2.0.7" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.7" -files = [ - {file = "urllib3-2.0.7-py3-none-any.whl", hash = "sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"}, - {file = "urllib3-2.0.7.tar.gz", hash = "sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] - -[[package]] -name = "win32-setctime" -version = "1.1.0" -description = "A small Python utility to set file creation time on Windows" -optional = false -python-versions = ">=3.5" -files = [ - {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, - {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, -] - -[package.extras] -dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] - -[[package]] -name = "yarl" -version = "1.9.2" -description = "Yet another URL library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8c2ad583743d16ddbdf6bb14b5cd76bf43b0d0006e918809d5d4ddf7bde8dd82"}, - {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82aa6264b36c50acfb2424ad5ca537a2060ab6de158a5bd2a72a032cc75b9eb8"}, - {file = "yarl-1.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c0c77533b5ed4bcc38e943178ccae29b9bcf48ffd1063f5821192f23a1bd27b9"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee4afac41415d52d53a9833ebae7e32b344be72835bbb589018c9e938045a560"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bf345c3a4f5ba7f766430f97f9cc1320786f19584acc7086491f45524a551ac"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a96c19c52ff442a808c105901d0bdfd2e28575b3d5f82e2f5fd67e20dc5f4ea"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:891c0e3ec5ec881541f6c5113d8df0315ce5440e244a716b95f2525b7b9f3608"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c3a53ba34a636a256d767c086ceb111358876e1fb6b50dfc4d3f4951d40133d5"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:566185e8ebc0898b11f8026447eacd02e46226716229cea8db37496c8cdd26e0"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:2b0738fb871812722a0ac2154be1f049c6223b9f6f22eec352996b69775b36d4"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:32f1d071b3f362c80f1a7d322bfd7b2d11e33d2adf395cc1dd4df36c9c243095"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:e9fdc7ac0d42bc3ea78818557fab03af6181e076a2944f43c38684b4b6bed8e3"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:56ff08ab5df8429901ebdc5d15941b59f6253393cb5da07b4170beefcf1b2528"}, - {file = "yarl-1.9.2-cp310-cp310-win32.whl", hash = "sha256:8ea48e0a2f931064469bdabca50c2f578b565fc446f302a79ba6cc0ee7f384d3"}, - {file = "yarl-1.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:50f33040f3836e912ed16d212f6cc1efb3231a8a60526a407aeb66c1c1956dde"}, - {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:646d663eb2232d7909e6601f1a9107e66f9791f290a1b3dc7057818fe44fc2b6"}, - {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aff634b15beff8902d1f918012fc2a42e0dbae6f469fce134c8a0dc51ca423bb"}, - {file = "yarl-1.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a83503934c6273806aed765035716216cc9ab4e0364f7f066227e1aaea90b8d0"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b25322201585c69abc7b0e89e72790469f7dad90d26754717f3310bfe30331c2"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22a94666751778629f1ec4280b08eb11815783c63f52092a5953faf73be24191"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ec53a0ea2a80c5cd1ab397925f94bff59222aa3cf9c6da938ce05c9ec20428d"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:159d81f22d7a43e6eabc36d7194cb53f2f15f498dbbfa8edc8a3239350f59fe7"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:832b7e711027c114d79dffb92576acd1bd2decc467dec60e1cac96912602d0e6"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:95d2ecefbcf4e744ea952d073c6922e72ee650ffc79028eb1e320e732898d7e8"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d4e2c6d555e77b37288eaf45b8f60f0737c9efa3452c6c44626a5455aeb250b9"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:783185c75c12a017cc345015ea359cc801c3b29a2966c2655cd12b233bf5a2be"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:b8cc1863402472f16c600e3e93d542b7e7542a540f95c30afd472e8e549fc3f7"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:822b30a0f22e588b32d3120f6d41e4ed021806418b4c9f0bc3048b8c8cb3f92a"}, - {file = "yarl-1.9.2-cp311-cp311-win32.whl", hash = "sha256:a60347f234c2212a9f0361955007fcf4033a75bf600a33c88a0a8e91af77c0e8"}, - {file = "yarl-1.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:be6b3fdec5c62f2a67cb3f8c6dbf56bbf3f61c0f046f84645cd1ca73532ea051"}, - {file = "yarl-1.9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:38a3928ae37558bc1b559f67410df446d1fbfa87318b124bf5032c31e3447b74"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac9bb4c5ce3975aeac288cfcb5061ce60e0d14d92209e780c93954076c7c4367"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3da8a678ca8b96c8606bbb8bfacd99a12ad5dd288bc6f7979baddd62f71c63ef"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13414591ff516e04fcdee8dc051c13fd3db13b673c7a4cb1350e6b2ad9639ad3"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf74d08542c3a9ea97bb8f343d4fcbd4d8f91bba5ec9d5d7f792dbe727f88938"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7221580dc1db478464cfeef9b03b95c5852cc22894e418562997df0d074ccc"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:494053246b119b041960ddcd20fd76224149cfea8ed8777b687358727911dd33"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:52a25809fcbecfc63ac9ba0c0fb586f90837f5425edfd1ec9f3372b119585e45"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:e65610c5792870d45d7b68c677681376fcf9cc1c289f23e8e8b39c1485384185"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:1b1bba902cba32cdec51fca038fd53f8beee88b77efc373968d1ed021024cc04"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:662e6016409828ee910f5d9602a2729a8a57d74b163c89a837de3fea050c7582"}, - {file = "yarl-1.9.2-cp37-cp37m-win32.whl", hash = "sha256:f364d3480bffd3aa566e886587eaca7c8c04d74f6e8933f3f2c996b7f09bee1b"}, - {file = "yarl-1.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6a5883464143ab3ae9ba68daae8e7c5c95b969462bbe42e2464d60e7e2698368"}, - {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5610f80cf43b6202e2c33ba3ec2ee0a2884f8f423c8f4f62906731d876ef4fac"}, - {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9a4e67ad7b646cd6f0938c7ebfd60e481b7410f574c560e455e938d2da8e0f4"}, - {file = "yarl-1.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:83fcc480d7549ccebe9415d96d9263e2d4226798c37ebd18c930fce43dfb9574"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fcd436ea16fee7d4207c045b1e340020e58a2597301cfbcfdbe5abd2356c2fb"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84e0b1599334b1e1478db01b756e55937d4614f8654311eb26012091be109d59"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3458a24e4ea3fd8930e934c129b676c27452e4ebda80fbe47b56d8c6c7a63a9e"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:838162460b3a08987546e881a2bfa573960bb559dfa739e7800ceeec92e64417"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4e2d08f07a3d7d3e12549052eb5ad3eab1c349c53ac51c209a0e5991bbada78"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:de119f56f3c5f0e2fb4dee508531a32b069a5f2c6e827b272d1e0ff5ac040333"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:149ddea5abf329752ea5051b61bd6c1d979e13fbf122d3a1f9f0c8be6cb6f63c"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:674ca19cbee4a82c9f54e0d1eee28116e63bc6fd1e96c43031d11cbab8b2afd5"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:9b3152f2f5677b997ae6c804b73da05a39daa6a9e85a512e0e6823d81cdad7cc"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5415d5a4b080dc9612b1b63cba008db84e908b95848369aa1da3686ae27b6d2b"}, - {file = "yarl-1.9.2-cp38-cp38-win32.whl", hash = "sha256:f7a3d8146575e08c29ed1cd287068e6d02f1c7bdff8970db96683b9591b86ee7"}, - {file = "yarl-1.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:63c48f6cef34e6319a74c727376e95626f84ea091f92c0250a98e53e62c77c72"}, - {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:75df5ef94c3fdc393c6b19d80e6ef1ecc9ae2f4263c09cacb178d871c02a5ba9"}, - {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c027a6e96ef77d401d8d5a5c8d6bc478e8042f1e448272e8d9752cb0aff8b5c8"}, - {file = "yarl-1.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3b078dbe227f79be488ffcfc7a9edb3409d018e0952cf13f15fd6512847f3f7"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59723a029760079b7d991a401386390c4be5bfec1e7dd83e25a6a0881859e716"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b03917871bf859a81ccb180c9a2e6c1e04d2f6a51d953e6a5cdd70c93d4e5a2a"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c1012fa63eb6c032f3ce5d2171c267992ae0c00b9e164efe4d73db818465fac3"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a74dcbfe780e62f4b5a062714576f16c2f3493a0394e555ab141bf0d746bb955"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8c56986609b057b4839968ba901944af91b8e92f1725d1a2d77cbac6972b9ed1"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c315df3293cd521033533d242d15eab26583360b58f7ee5d9565f15fee1bef4"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b7232f8dfbd225d57340e441d8caf8652a6acd06b389ea2d3222b8bc89cbfca6"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:53338749febd28935d55b41bf0bcc79d634881195a39f6b2f767870b72514caf"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:066c163aec9d3d073dc9ffe5dd3ad05069bcb03fcaab8d221290ba99f9f69ee3"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8288d7cd28f8119b07dd49b7230d6b4562f9b61ee9a4ab02221060d21136be80"}, - {file = "yarl-1.9.2-cp39-cp39-win32.whl", hash = "sha256:b124e2a6d223b65ba8768d5706d103280914d61f5cae3afbc50fc3dfcc016623"}, - {file = "yarl-1.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:61016e7d582bc46a5378ffdd02cd0314fb8ba52f40f9cf4d9a5e7dbef88dee18"}, - {file = "yarl-1.9.2.tar.gz", hash = "sha256:04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571"}, -] - -[package.dependencies] -idna = ">=2.0" -multidict = ">=4.0" - -[metadata] -lock-version = "2.0" -python-versions = "^3.9" -content-hash = "50a8ff1bce8000465628034808c5680e843b2fa1d1ccaa5ac73f374b230da929" diff --git a/pipelines/rj_sms/whatsapp/pyproject.toml b/pipelines/rj_sms/whatsapp/pyproject.toml deleted file mode 100644 index 13dee8d62..000000000 --- a/pipelines/rj_sms/whatsapp/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "whatsapp" -version = "0.1.0" -description = "" -authors = ["André Martins "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.9" -basedosdados = {version = "2.0.0b14", extras = ["upload"]} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/pipelines/rj_sms/whatsapp/run.py b/pipelines/rj_sms/whatsapp/run.py deleted file mode 100644 index 13925ef00..000000000 --- a/pipelines/rj_sms/whatsapp/run.py +++ /dev/null @@ -1,3 +0,0 @@ -from flows import flow_whatsapp -from pipelines.utils.utils import run_local -run_local(flow_whatsapp) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/schedules.py b/pipelines/rj_sms/whatsapp/schedules.py deleted file mode 100644 index d4acd248e..000000000 --- a/pipelines/rj_sms/whatsapp/schedules.py +++ /dev/null @@ -1,17 +0,0 @@ -from datetime import timedelta -import pendulum -from prefect.schedules import Schedule -from prefect.schedules.clocks import IntervalClock -from pipelines.constants import constants - -every_day_at_seven_am = Schedule( - clocks=[ - IntervalClock( - interval=timedelta(days=1), - start_date=pendulum.datetime(2023, 1, 1, 7, 0, 0, tz="America/Sao_Paulo"), - labels=[ - constants.RJ_SMS_DEV_AGENT_LABEL.value, - ], - ) - ] -) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py new file mode 100644 index 000000000..9193be8aa --- /dev/null +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +""" +WhatsApp flow definition +""" +from prefect import Flow +from prefect.storage import GCS +from pipelines.constants import constants +from prefect.run_configs import KubernetesRun +from datetime import datetime, timedelta + +from tasks import ( + get_patients, + save_patients +) + +from utils import ( + upload_to_datalake +) + +with Flow("SISREG patients") as flow_sisreg_scheduled_patients: + + data_futura = datetime.today() + timedelta(days=3) + data_formatada = data_futura.strftime('%Y-%m-%d') + # Tasks + dataframe = get_patients() + save_patients(dataframe) + upload_to_datalake_task = upload_to_datalake( + input_path=f"pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data/{data_formatada}.csv", + dataset_id="whatsapp", + table_id="sisreg_scheduled_patients", + if_exists="replace", + csv_delimiter=";", + if_storage_data_exists="replace", + dump_mode="overwrite", + biglake_table=True, + ) + +flow_sisreg_scheduled_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +flow_sisreg_scheduled_patients.run_config = KubernetesRun( + image=constants.DOCKER_IMAGE.value, + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], +) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py new file mode 100644 index 000000000..222572b23 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py @@ -0,0 +1,4 @@ +from flows import flow_sisreg_scheduled_patients +from pipelines.utils.utils import run_local + +run_local(flow_sisreg_scheduled_patients) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/tasks.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py similarity index 73% rename from pipelines/rj_sms/whatsapp/tasks.py rename to pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py index b726f5e00..052f06ecc 100644 --- a/pipelines/rj_sms/whatsapp/tasks.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py @@ -5,8 +5,7 @@ import requests import pandas as pd from prefect import task -#from google.cloud import storage -from utils import log +from pipelines.utils.utils import log from datetime import datetime, timedelta @task @@ -61,24 +60,13 @@ def get_patients(): # Aguarda 1 minuto antes da próxima solicitação time.sleep(60) - - else: - log('Erro na autenticação') return pd.DataFrame() @task def save_patients(dataframe): - log('Salva lista de pacientes no cloud storage') data_futura = datetime.today() + timedelta(days=3) data_formatada = data_futura.strftime('%Y-%m-%d') - #filename = f'sisreg_scheduled_patients/origin/{data_formatada}.csv' - filename = f'files/{data_formatada}.csv' - #bucket_name = 'rj-whatsapp' - #storage_client = storage.Client() - #bucket = storage_client.get_bucket(bucket_name) - #blob = bucket.blob(filename) - #csv_data = dataframe.to_csv(sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') - #dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') - #blob.upload_from_string(csv_data, content_type="text/csv") - return True \ No newline at end of file + filename = f'pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data/{data_formatada}.csv' + dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') + return True diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py new file mode 100644 index 000000000..4f76724b4 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py @@ -0,0 +1,87 @@ +import prefect +from prefect import task +import basedosdados as bd +from pipelines.utils.utils import log + +@task +def upload_to_datalake( + input_path: str, + dataset_id: str, + table_id: str, + if_exists: str = "replace", + csv_delimiter: str = ";", + if_storage_data_exists: str = "replace", + biglake_table: bool = True, + dump_mode: str = "append", +): + """ + Uploads data from a file to a BigQuery table in a specified dataset. + + Args: + input_path (str): The path to the file containing the data to be uploaded. + dataset_id (str): The ID of the dataset where the table is located. + table_id (str): The ID of the table where the data will be uploaded. + if_exists (str, optional): Specifies what to do if the table already exists. + Defaults to "replace". + csv_delimiter (str, optional): The delimiter used in the CSV file. Defaults to ";". + if_storage_data_exists (str, optional): Specifies what to do if the storage data + already exists. Defaults to "replace". + biglake_table (bool, optional): Specifies whether the table is a BigLake table. + Defaults to True. + """ + tb = bd.Table(dataset_id=dataset_id, table_id=table_id) + table_staging = f"{tb.table_full_name['staging']}" + st = bd.Storage(dataset_id=dataset_id, table_id=table_id) + storage_path = f"{st.bucket_name}.staging.{dataset_id}.{table_id}" + storage_path_link = ( + f"https://console.cloud.google.com/storage/browser/{st.bucket_name}" + f"/staging/{dataset_id}/{table_id}" + ) + + try: + table_exists = tb.table_exists(mode="staging") + + if not table_exists: + log(f"CREATING TABLE: {dataset_id}.{table_id}") + tb.create( + path=input_path, + csv_delimiter=csv_delimiter, + if_storage_data_exists=if_storage_data_exists, + biglake_table=biglake_table, + ) + else: + if dump_mode == "append": + log( + f"TABLE ALREADY EXISTS APPENDING DATA TO STORAGE: {dataset_id}.{table_id}" + ) + + tb.append(filepath=input_path, if_exists=if_exists) + elif dump_mode == "overwrite": + log( + "MODE OVERWRITE: Table ALREADY EXISTS, DELETING OLD DATA!\n" + f"{storage_path}\n" + f"{storage_path_link}" + ) # pylint: disable=C0301 + st.delete_table( + mode="staging", bucket_name=st.bucket_name, not_found_ok=True + ) + log( + "MODE OVERWRITE: Sucessfully DELETED OLD DATA from Storage:\n" + f"{storage_path}\n" + f"{storage_path_link}" + ) # pylint: disable=C0301 + tb.delete(mode="all") + log( + "MODE OVERWRITE: Sucessfully DELETED TABLE:\n" f"{table_staging}\n" + ) # pylint: disable=C0301 + + tb.create( + path=input_path, + csv_delimiter=csv_delimiter, + if_storage_data_exists=if_storage_data_exists, + biglake_table=biglake_table, + ) + log("Data uploaded to BigQuery") + + except Exception as e: + log(f"An error occurred: {e}", level="error") From b7814d37c8634baea2ffa1b1d3a383430b6e3e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Wed, 25 Oct 2023 13:13:48 -0700 Subject: [PATCH 03/32] =?UTF-8?q?Corre=C3=A7=C3=A3o=20do=20pipeline=20do?= =?UTF-8?q?=20sisreg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sisreg_scheduled_patients/flows.py | 16 ++- .../sisreg_scheduled_patients/tasks.py | 94 +++++++++++++++- .../sisreg_scheduled_patients/utils.py | 104 ++++-------------- 3 files changed, 123 insertions(+), 91 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py index 9193be8aa..315a2ec1c 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py @@ -2,6 +2,8 @@ """ WhatsApp flow definition """ + + from prefect import Flow from prefect.storage import GCS from pipelines.constants import constants @@ -10,30 +12,26 @@ from tasks import ( get_patients, - save_patients -) - -from utils import ( + save_patients, upload_to_datalake ) with Flow("SISREG patients") as flow_sisreg_scheduled_patients: - data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime('%Y-%m-%d') # Tasks dataframe = get_patients() - save_patients(dataframe) + save = save_patients(dataframe) + save.set_upstream(dataframe) upload_to_datalake_task = upload_to_datalake( - input_path=f"pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data/{data_formatada}.csv", + input_path=f"pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data_partition", dataset_id="whatsapp", table_id="sisreg_scheduled_patients", if_exists="replace", csv_delimiter=";", if_storage_data_exists="replace", - dump_mode="overwrite", biglake_table=True, ) + upload_to_datalake_task.set_upstream(save) flow_sisreg_scheduled_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) flow_sisreg_scheduled_patients.run_config = KubernetesRun( diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py index 052f06ecc..17a042d08 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import csv +import shutil import time import json import requests @@ -7,6 +8,11 @@ from prefect import task from pipelines.utils.utils import log from datetime import datetime, timedelta +import basedosdados as bd + +from utils import ( + create_partitions +) @task def get_patients(): @@ -59,7 +65,7 @@ def get_patients(): log(f"Falha na solicitação, código de status: {response.status_code}") # Aguarda 1 minuto antes da próxima solicitação - time.sleep(60) + time.sleep(10) return pd.DataFrame() @@ -69,4 +75,90 @@ def save_patients(dataframe): data_formatada = data_futura.strftime('%Y-%m-%d') filename = f'pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data/{data_formatada}.csv' dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') + partition_directory = 'pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data_partition' + shutil.rmtree(partition_directory, ignore_errors=True) + create_partitions('pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data', partition_directory) return True + +@task +def upload_to_datalake( + input_path: str, + dataset_id: str, + table_id: str, + if_exists: str = "replace", + csv_delimiter: str = ";", + if_storage_data_exists: str = "replace", + biglake_table: bool = True, + dump_mode: str = "append", +): + """ + Uploads data from a file to a BigQuery table in a specified dataset. + + Args: + input_path (str): The path to the file containing the data to be uploaded. + dataset_id (str): The ID of the dataset where the table is located. + table_id (str): The ID of the table where the data will be uploaded. + if_exists (str, optional): Specifies what to do if the table already exists. + Defaults to "replace". + csv_delimiter (str, optional): The delimiter used in the CSV file. Defaults to ";". + if_storage_data_exists (str, optional): Specifies what to do if the storage data + already exists. Defaults to "replace". + biglake_table (bool, optional): Specifies whether the table is a BigLake table. + Defaults to True. + """ + tb = bd.Table(dataset_id=dataset_id, table_id=table_id) + table_staging = f"{tb.table_full_name['staging']}" + st = bd.Storage(dataset_id=dataset_id, table_id=table_id) + storage_path = f"{st.bucket_name}.staging.{dataset_id}.{table_id}" + storage_path_link = ( + f"https://console.cloud.google.com/storage/browser/{st.bucket_name}" + f"/staging/{dataset_id}/{table_id}" + ) + + try: + table_exists = tb.table_exists(mode="staging") + + if not table_exists: + log(f"CREATING TABLE: {dataset_id}.{table_id}") + tb.create( + path=input_path, + csv_delimiter=csv_delimiter, + if_storage_data_exists=if_storage_data_exists, + biglake_table=biglake_table, + ) + else: + if dump_mode == "append": + log( + f"TABLE ALREADY EXISTS APPENDING DATA TO STORAGE: {dataset_id}.{table_id}" + ) + + tb.append(filepath=input_path, if_exists=if_exists) + elif dump_mode == "overwrite": + log( + "MODE OVERWRITE: Table ALREADY EXISTS, DELETING OLD DATA!\n" + f"{storage_path}\n" + f"{storage_path_link}" + ) # pylint: disable=C0301 + st.delete_table( + mode="staging", bucket_name=st.bucket_name, not_found_ok=True + ) + log( + "MODE OVERWRITE: Sucessfully DELETED OLD DATA from Storage:\n" + f"{storage_path}\n" + f"{storage_path_link}" + ) # pylint: disable=C0301 + tb.delete(mode="all") + log( + "MODE OVERWRITE: Sucessfully DELETED TABLE:\n" f"{table_staging}\n" + ) # pylint: disable=C0301 + + tb.create( + path=input_path, + csv_delimiter=csv_delimiter, + if_storage_data_exists=if_storage_data_exists, + biglake_table=biglake_table, + ) + log("Data uploaded to BigQuery") + + except Exception as e: + log(f"An error occurred: {e}", level="error") \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py index 4f76724b4..8b29c73af 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py @@ -1,87 +1,29 @@ -import prefect -from prefect import task -import basedosdados as bd +from datetime import datetime +from pathlib import Path +import re +import shutil from pipelines.utils.utils import log - -@task -def upload_to_datalake( - input_path: str, - dataset_id: str, - table_id: str, - if_exists: str = "replace", - csv_delimiter: str = ";", - if_storage_data_exists: str = "replace", - biglake_table: bool = True, - dump_mode: str = "append", -): - """ - Uploads data from a file to a BigQuery table in a specified dataset. - Args: - input_path (str): The path to the file containing the data to be uploaded. - dataset_id (str): The ID of the dataset where the table is located. - table_id (str): The ID of the table where the data will be uploaded. - if_exists (str, optional): Specifies what to do if the table already exists. - Defaults to "replace". - csv_delimiter (str, optional): The delimiter used in the CSV file. Defaults to ";". - if_storage_data_exists (str, optional): Specifies what to do if the storage data - already exists. Defaults to "replace". - biglake_table (bool, optional): Specifies whether the table is a BigLake table. - Defaults to True. - """ - tb = bd.Table(dataset_id=dataset_id, table_id=table_id) - table_staging = f"{tb.table_full_name['staging']}" - st = bd.Storage(dataset_id=dataset_id, table_id=table_id) - storage_path = f"{st.bucket_name}.staging.{dataset_id}.{table_id}" - storage_path_link = ( - f"https://console.cloud.google.com/storage/browser/{st.bucket_name}" - f"/staging/{dataset_id}/{table_id}" - ) +def create_partitions(data_path: str, partition_directory: str): + data_path = Path(data_path) + partition_directory = Path(partition_directory) + files = data_path.glob("*.csv") - try: - table_exists = tb.table_exists(mode="staging") + for file_name in files: + date_str = re.search(r"\d{4}-\d{2}-\d{2}", str(file_name)).group() + parsed_date = datetime.strptime(date_str, "%Y-%m-%d") + ano_particao = parsed_date.strftime("%Y") + mes_particao = parsed_date.strftime("%m") + data_particao = parsed_date.strftime("%Y-%m-%d") - if not table_exists: - log(f"CREATING TABLE: {dataset_id}.{table_id}") - tb.create( - path=input_path, - csv_delimiter=csv_delimiter, - if_storage_data_exists=if_storage_data_exists, - biglake_table=biglake_table, - ) - else: - if dump_mode == "append": - log( - f"TABLE ALREADY EXISTS APPENDING DATA TO STORAGE: {dataset_id}.{table_id}" - ) + output_directory = ( + partition_directory + / f"ano_particao={int(ano_particao)}" + / f"mes_particao={int(mes_particao)}" + / f"data_particao={data_particao}" + ) + output_directory.mkdir(parents=True, exist_ok=True) - tb.append(filepath=input_path, if_exists=if_exists) - elif dump_mode == "overwrite": - log( - "MODE OVERWRITE: Table ALREADY EXISTS, DELETING OLD DATA!\n" - f"{storage_path}\n" - f"{storage_path_link}" - ) # pylint: disable=C0301 - st.delete_table( - mode="staging", bucket_name=st.bucket_name, not_found_ok=True - ) - log( - "MODE OVERWRITE: Sucessfully DELETED OLD DATA from Storage:\n" - f"{storage_path}\n" - f"{storage_path_link}" - ) # pylint: disable=C0301 - tb.delete(mode="all") - log( - "MODE OVERWRITE: Sucessfully DELETED TABLE:\n" f"{table_staging}\n" - ) # pylint: disable=C0301 + # Copy file to partition directory + shutil.copy(file_name, output_directory) - tb.create( - path=input_path, - csv_delimiter=csv_delimiter, - if_storage_data_exists=if_storage_data_exists, - biglake_table=biglake_table, - ) - log("Data uploaded to BigQuery") - - except Exception as e: - log(f"An error occurred: {e}", level="error") From 3fab11bbb71d001f108a95a7950f940beb1e8e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 10 Nov 2023 11:19:52 -0800 Subject: [PATCH 04/32] pipeline patients vitacare Create pipeline vitacare --- .../clinica_scheduled_patients/tasks.py | 42 ++++--- .../whatsapp/unidades_equipe_aps/flows.py | 41 +++++++ .../whatsapp/unidades_equipe_aps/run.py | 4 + .../whatsapp/unidades_equipe_aps/tasks.py | 115 ++++++++++++++++++ .../whatsapp/unidades_equipe_aps/utils.py | 28 +++++ 5 files changed, 213 insertions(+), 17 deletions(-) create mode 100644 pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py create mode 100644 pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py create mode 100644 pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py create mode 100644 pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index b8ae6f078..2c5042607 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -14,24 +14,11 @@ @task def get_patients(): - url = 'https://us-central1-rj-sms-dev.cloudfunctions.net/vitacare' - os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/Users/andremartins/.basedosdados/credentials/staging.json' - request = google.auth.transport.requests.Request() - audience = url - TOKEN = google.oauth2.id_token.fetch_id_token(request, audience) - - payload = json.dumps({ - "url": "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments", - "path": "whatsapp/clinica_patients_treated/origin/", - "env": "staging" - }) - headers = { - 'Content-Type': 'application/json', - 'Authorization': f'Bearer {TOKEN}' - } - response = requests.request("POST", url, headers=headers, data=payload) - log(response.text) + url = 'http://saudedigital.pepvitacare.com:8081/health/schedule/lastattendances' + context = 'clinica_patients_treated' + env = 'production' + cloud_function_vitacare(url, context, env) @task def save_patients(dataframe): @@ -47,3 +34,24 @@ def save_patients(dataframe): dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') #blob.upload_from_string(csv_data, content_type="text/csv") return True + +def cloud_function_vitacare(url, context, env): + if env == 'production': + function = 'https://us-central1-rj-sms.cloudfunctions.net/vitacare' + else: + function = 'https://us-central1-rj-sms.cloudfunctions.net/vitacare' + os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/Users/andremartins/.basedosdados/credentials/prod.json' + request = google.auth.transport.requests.Request() + audience = function + TOKEN = google.oauth2.id_token.fetch_id_token(request, audience) + + payload = json.dumps({ + "url": url, + "path": context, + "env": env + }) + headers = { + 'Content-Type': 'application/json', + 'Authorization': f'Bearer {TOKEN}' + } + return requests.request("POST", function, headers=headers, data=payload) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py new file mode 100644 index 000000000..ae39f9e6c --- /dev/null +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +""" +WhatsApp flow definition +""" + +from prefect import Flow +from prefect.storage import GCS +from pipelines.constants import constants +from prefect.run_configs import KubernetesRun +from datetime import datetime, timedelta + +from tasks import ( + read_file, + save_file, + upload_to_datalake +) + +with Flow("Unidades Equipe APS") as flow_unidades_equipe_aps: + + # Tasks + dataframe = read_file() + save = save_file(dataframe) + save.set_upstream(dataframe) + upload_to_datalake_task = upload_to_datalake( + input_path=f"pipelines/rj_sms/whatsapp/unidades_equipe_aps/data_partition", + dataset_id="whatsapp", + table_id="unidades_equipe_aps", + if_exists="replace", + csv_delimiter=";", + if_storage_data_exists="replace", + biglake_table=True, + ) + upload_to_datalake_task.set_upstream(save) + +flow_unidades_equipe_aps.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +flow_unidades_equipe_aps.run_config = KubernetesRun( + image=constants.DOCKER_IMAGE.value, + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], +) diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py new file mode 100644 index 000000000..82ddaf675 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py @@ -0,0 +1,4 @@ +from flows import flow_unidades_equipe_aps +from pipelines.utils.utils import run_local + +run_local(flow_unidades_equipe_aps) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py new file mode 100644 index 000000000..22c906af3 --- /dev/null +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +import csv +import shutil +import time +import json +import requests +import pandas as pd +from prefect import task +from pipelines.utils.utils import log +from datetime import datetime, timedelta +import basedosdados as bd + +from utils import ( + create_partitions +) + +@task +def read_file(): + arquivo_excel = 'pipelines/rj_sms/whatsapp/unidades_equipe_aps/data/unidades-equipes-aps-2023-10-27.csv' + dataframe = pd.read_csv(arquivo_excel, sep=';') + return dataframe + +@task +def save_file(dataframe): + data_futura = datetime.today() + timedelta(days=3) + data_formatada = data_futura.strftime('%Y-%m-%d') + filename = 'pipelines/rj_sms/whatsapp/unidades_equipe_aps/data/unidades-equipes-aps-2023-10-27.csv' + dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') + partition_directory = 'pipelines/rj_sms/whatsapp/unidades_equipe_aps/data_partition' + shutil.rmtree(partition_directory, ignore_errors=True) + create_partitions('pipelines/rj_sms/whatsapp/unidades_equipe_aps/data', partition_directory) + return True + +@task +def upload_to_datalake( + input_path: str, + dataset_id: str, + table_id: str, + if_exists: str = "replace", + csv_delimiter: str = ";", + if_storage_data_exists: str = "replace", + biglake_table: bool = True, + dump_mode: str = "append", +): + """ + Uploads data from a file to a BigQuery table in a specified dataset. + + Args: + input_path (str): The path to the file containing the data to be uploaded. + dataset_id (str): The ID of the dataset where the table is located. + table_id (str): The ID of the table where the data will be uploaded. + if_exists (str, optional): Specifies what to do if the table already exists. + Defaults to "replace". + csv_delimiter (str, optional): The delimiter used in the CSV file. Defaults to ";". + if_storage_data_exists (str, optional): Specifies what to do if the storage data + already exists. Defaults to "replace". + biglake_table (bool, optional): Specifies whether the table is a BigLake table. + Defaults to True. + """ + tb = bd.Table(dataset_id=dataset_id, table_id=table_id) + table_staging = f"{tb.table_full_name['staging']}" + st = bd.Storage(dataset_id=dataset_id, table_id=table_id) + storage_path = f"{st.bucket_name}.staging.{dataset_id}.{table_id}" + storage_path_link = ( + f"https://console.cloud.google.com/storage/browser/{st.bucket_name}" + f"/staging/{dataset_id}/{table_id}" + ) + + try: + table_exists = tb.table_exists(mode="staging") + + if not table_exists: + log(f"CREATING TABLE: {dataset_id}.{table_id}") + tb.create( + path=input_path, + csv_delimiter=csv_delimiter, + if_storage_data_exists=if_storage_data_exists, + biglake_table=biglake_table, + ) + else: + if dump_mode == "append": + log( + f"TABLE ALREADY EXISTS APPENDING DATA TO STORAGE: {dataset_id}.{table_id}" + ) + + tb.append(filepath=input_path, if_exists=if_exists) + elif dump_mode == "overwrite": + log( + "MODE OVERWRITE: Table ALREADY EXISTS, DELETING OLD DATA!\n" + f"{storage_path}\n" + f"{storage_path_link}" + ) # pylint: disable=C0301 + st.delete_table( + mode="staging", bucket_name=st.bucket_name, not_found_ok=True + ) + log( + "MODE OVERWRITE: Sucessfully DELETED OLD DATA from Storage:\n" + f"{storage_path}\n" + f"{storage_path_link}" + ) # pylint: disable=C0301 + tb.delete(mode="all") + log( + "MODE OVERWRITE: Sucessfully DELETED TABLE:\n" f"{table_staging}\n" + ) # pylint: disable=C0301 + + tb.create( + path=input_path, + csv_delimiter=csv_delimiter, + if_storage_data_exists=if_storage_data_exists, + biglake_table=biglake_table, + ) + log("Data uploaded to BigQuery") + + except Exception as e: + log(f"An error occurred: {e}", level="error") \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py new file mode 100644 index 000000000..8b353f00a --- /dev/null +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py @@ -0,0 +1,28 @@ +from datetime import datetime +from pathlib import Path +import re +import shutil +from pipelines.utils.utils import log + +def create_partitions(data_path: str, partition_directory: str): + data_path = Path(data_path) + partition_directory = Path(partition_directory) + files = data_path.glob("*.csv") + + for file_name in files: + date_str = re.search(r"\d{4}-\d{2}-\d{2}", str(file_name)).group() + parsed_date = datetime.strptime(date_str, "%Y-%m-%d") + ano_particao = parsed_date.strftime("%Y") + mes_particao = parsed_date.strftime("%m") + data_particao = parsed_date.strftime("%Y-%m-%d") + + output_directory = ( + partition_directory + / f"ano_particao={int(ano_particao)}" + / f"mes_particao={int(mes_particao)}" + / f"data_particao={data_particao}" + ) + output_directory.mkdir(parents=True, exist_ok=True) + + # Copy file to partition directory + shutil.copy(file_name, output_directory) \ No newline at end of file From b098dda106c72cc9af35524b85def1625d3443db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 10:31:43 -0800 Subject: [PATCH 05/32] =?UTF-8?q?Arquivos=20de=20configura=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 147 +++++++++++++++++++++---------------------------- pyproject.toml | 4 +- 2 files changed, 65 insertions(+), 86 deletions(-) diff --git a/poetry.lock b/poetry.lock index f106de89b..7e74deedf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "adal" @@ -617,30 +617,35 @@ tzdata = ["tzdata"] [[package]] name = "basedosdados" -version = "2.0.0b5" +version = "2.0.0b14" description = "Organizar e facilitar o acesso a dados brasileiros através de tabelas públicas no BigQuery." optional = false -python-versions = ">=3.8,<3.11" +python-versions = ">=3.8.1,<4" files = [ - {file = "basedosdados-2.0.0b5-py3-none-any.whl", hash = "sha256:a15fdbaa41d621094dabde3f2f14bcc4842b87f59f16a7a6c7a293351f841be5"}, - {file = "basedosdados-2.0.0b5.tar.gz", hash = "sha256:e4bdf3a0018f7208aa57adac9bb9340d07076a3c18d875e80c488cb4b80f0959"}, + {file = "basedosdados-2.0.0b14-py3-none-any.whl", hash = "sha256:4cde3d771bdc0cd25d1fb25a38852bdbba269df62589b417c5e3d76d052e44ff"}, + {file = "basedosdados-2.0.0b14.tar.gz", hash = "sha256:77b05776961e930003eb6e367e38b258aab83449c7eaa9d1a441531200a1fe8b"}, ] [package.dependencies] -google-api-python-client = ">=2.86.0,<3.0.0" -google-cloud-bigquery = ">=3.10.0,<4.0.0" -google-cloud-bigquery-connection = ">=1.12.0,<2.0.0" -google-cloud-bigquery-storage = ">=2.19.1,<3.0.0" -google-cloud-storage = ">=2.9.0,<3.0.0" -gql = ">=3.4.1,<4.0.0" -loguru = ">=0.7.0,<0.8.0" -pandas = ">=2.0.1,<3.0.0" -pandas-gbq = ">=0.19.2,<0.20.0" -pandavro = ">=1.7.2,<2.0.0" -pydata-google-auth = ">=1.8.0,<2.0.0" -requests-toolbelt = ">=1.0.0,<2.0.0" -tomlkit = ">=0.11.8,<0.12.0" -tqdm = ">=4.65.0,<5.0.0" +google-api-python-client = ">=2.86,<3.0" +google-cloud-bigquery = ">=3.10,<4.0" +google-cloud-bigquery-connection = ">=1.12,<2.0" +google-cloud-bigquery-storage = ">=2.19,<3.0" +google-cloud-storage = ">=2.9,<3.0" +gql = {version = ">=3.4,<4.0", optional = true, markers = "extra == \"all\" or extra == \"upload\""} +loguru = "0.7.0" +pandas = ">=2.0,<3.0" +pandas-gbq = ">=0.19,<0.20" +pydata-google-auth = ">=1.8,<2.0" +requests-toolbelt = {version = ">=1,<2", optional = true, markers = "extra == \"all\" or extra == \"upload\""} +tomlkit = ">=0.11,<0.12" +tqdm = ">=4,<5" + +[package.extras] +all = ["click (>=8.1,<9)", "gql (>=3.4,<4.0)", "pandavro (>=1.7,<2.0)", "requests-toolbelt (>=1,<2)"] +avro = ["pandavro (>=1.7,<2.0)"] +cli = ["click (>=8.1,<9)"] +upload = ["gql (>=3.4,<4.0)", "requests-toolbelt (>=1,<2)"] [[package]] name = "bcrypt" @@ -1525,38 +1530,6 @@ dev = ["pre-commit (>=2.17.0,<3.0.0)", "ruff (==0.0.138)", "uvicorn[standard] (> doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pyyaml (>=5.3.1,<7.0.0)", "typer[all] (>=0.6.1,<0.8.0)"] test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==22.10.0)", "coverage[toml] (>=6.5.0,<8.0)", "databases[sqlite] (>=0.3.2,<0.7.0)", "email-validator (>=1.1.1,<2.0.0)", "flask (>=1.1.2,<3.0.0)", "httpx (>=0.23.0,<0.24.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.982)", "orjson (>=3.2.1,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "peewee (>=3.13.3,<4.0.0)", "pytest (>=7.1.3,<8.0.0)", "python-jose[cryptography] (>=3.3.0,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<7.0.0)", "ruff (==0.0.138)", "sqlalchemy (>=1.3.18,<1.4.43)", "types-orjson (==3.6.2)", "types-ujson (==5.6.0.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)"] -[[package]] -name = "fastavro" -version = "1.5.4" -description = "Fast read/write of AVRO files" -optional = false -python-versions = ">=3.7" -files = [ - {file = "fastavro-1.5.4-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:d316cc476b2b24ef06402b8bfa047f8f72a9d6df2de777bb30d9ededda7e3a02"}, - {file = "fastavro-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8459faec46e34f2dfeb9b70ee8c36e935e626cff8608d675724718987a5f9ce5"}, - {file = "fastavro-1.5.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd44636d7ff8365a57b88707b747371fffb676c8c1f68c0d423ec36623888668"}, - {file = "fastavro-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:2402428b26d3c08a58acfa723833e19fb75077872bcb2475a4c81195cdae6a5d"}, - {file = "fastavro-1.5.4-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:5afc14398f4191d1a807aa59d2fba5ed869b31343679ec43dbc289db0a8e35c5"}, - {file = "fastavro-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5217e9713a3ea03205532394fba4d743749155b04b10b12a12fc26d225b89792"}, - {file = "fastavro-1.5.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e93a5eecb28cc35d670c9c4df70223fa9bcd6d9ca21b38b1b7ae13ece60c7fb"}, - {file = "fastavro-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:1a2f2465efd0e7de557c4034e8d4d88a132750cfa51e1582362a1b3a1a9fa911"}, - {file = "fastavro-1.5.4-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:f7d5bc76c03c692d9acea0e5d5baceec19e1c059b26cb8ae9f4481e842be95a5"}, - {file = "fastavro-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80fe920229ab1f40eccb1b4918481cdd8a20e5e7dce19308ab38b23732da8a70"}, - {file = "fastavro-1.5.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3d190aee86ab73caa1aa550eba850be2ca5dd29d814b38720f4e300184e01d5"}, - {file = "fastavro-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:b6c30299a49b11f42251cb81c8e15db67750642eac7ba5c194a5ee95c83ebb11"}, - {file = "fastavro-1.5.4-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:1f7685f3a3c38352abab432bad2f9f2229a0e5f5f8548831e887c30f8396f2e9"}, - {file = "fastavro-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd021ec850fd30020b7c4fa868466fb7f95450f1f06eac92bd2204cbd8e45fb8"}, - {file = "fastavro-1.5.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06a7b5602dfa032c92f20ca90b8bde88251573773e501bedf5e8b76b9feb14a3"}, - {file = "fastavro-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:18250aa2ab0f7a095b1865565cf9976ea4605c201129636e6defe24ec3ef112c"}, - {file = "fastavro-1.5.4.tar.gz", hash = "sha256:d86f72c966713fb699570a18f7960cf4110b069c70681d7538be8d671c9db7c8"}, -] - -[package.extras] -codecs = ["lz4", "python-snappy", "zstandard"] -lz4 = ["lz4"] -snappy = ["python-snappy"] -zstandard = ["zstandard"] - [[package]] name = "filelock" version = "3.12.2" @@ -2483,6 +2456,7 @@ files = [ {file = "greenlet-2.0.2-cp27-cp27m-win32.whl", hash = "sha256:6c3acb79b0bfd4fe733dff8bc62695283b57949ebcca05ae5c129eb606ff2d74"}, {file = "greenlet-2.0.2-cp27-cp27m-win_amd64.whl", hash = "sha256:283737e0da3f08bd637b5ad058507e578dd462db259f7f6e4c5c365ba4ee9343"}, {file = "greenlet-2.0.2-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:d27ec7509b9c18b6d73f2f5ede2622441de812e7b1a80bbd446cb0633bd3d5ae"}, + {file = "greenlet-2.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d967650d3f56af314b72df7089d96cda1083a7fc2da05b375d2bc48c82ab3f3c"}, {file = "greenlet-2.0.2-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:30bcf80dda7f15ac77ba5af2b961bdd9dbc77fd4ac6105cee85b0d0a5fcf74df"}, {file = "greenlet-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26fbfce90728d82bc9e6c38ea4d038cba20b7faf8a0ca53a9c07b67318d46088"}, {file = "greenlet-2.0.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9190f09060ea4debddd24665d6804b995a9c122ef5917ab26e1566dcc712ceeb"}, @@ -2491,6 +2465,7 @@ files = [ {file = "greenlet-2.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:76ae285c8104046b3a7f06b42f29c7b73f77683df18c49ab5af7983994c2dd91"}, {file = "greenlet-2.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:2d4686f195e32d36b4d7cf2d166857dbd0ee9f3d20ae349b6bf8afc8485b3645"}, {file = "greenlet-2.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c4302695ad8027363e96311df24ee28978162cdcdd2006476c43970b384a244c"}, + {file = "greenlet-2.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d4606a527e30548153be1a9f155f4e283d109ffba663a15856089fb55f933e47"}, {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c48f54ef8e05f04d6eff74b8233f6063cb1ed960243eacc474ee73a2ea8573ca"}, {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a1846f1b999e78e13837c93c778dcfc3365902cfb8d1bdb7dd73ead37059f0d0"}, {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a06ad5312349fec0ab944664b01d26f8d1f05009566339ac6f63f56589bc1a2"}, @@ -2520,6 +2495,7 @@ files = [ {file = "greenlet-2.0.2-cp37-cp37m-win32.whl", hash = "sha256:3f6ea9bd35eb450837a3d80e77b517ea5bc56b4647f5502cd28de13675ee12f7"}, {file = "greenlet-2.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:7492e2b7bd7c9b9916388d9df23fa49d9b88ac0640db0a5b4ecc2b653bf451e3"}, {file = "greenlet-2.0.2-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:b864ba53912b6c3ab6bcb2beb19f19edd01a6bfcbdfe1f37ddd1778abfe75a30"}, + {file = "greenlet-2.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1087300cf9700bbf455b1b97e24db18f2f77b55302a68272c56209d5587c12d1"}, {file = "greenlet-2.0.2-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:ba2956617f1c42598a308a84c6cf021a90ff3862eddafd20c3333d50f0edb45b"}, {file = "greenlet-2.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc3a569657468b6f3fb60587e48356fe512c1754ca05a564f11366ac9e306526"}, {file = "greenlet-2.0.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8eab883b3b2a38cc1e050819ef06a7e6344d4a990d24d45bc6f2cf959045a45b"}, @@ -2528,6 +2504,7 @@ files = [ {file = "greenlet-2.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b0ef99cdbe2b682b9ccbb964743a6aca37905fda5e0452e5ee239b1654d37f2a"}, {file = "greenlet-2.0.2-cp38-cp38-win32.whl", hash = "sha256:b80f600eddddce72320dbbc8e3784d16bd3fb7b517e82476d8da921f27d4b249"}, {file = "greenlet-2.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:4d2e11331fc0c02b6e84b0d28ece3a36e0548ee1a1ce9ddde03752d9b79bba40"}, + {file = "greenlet-2.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8512a0c38cfd4e66a858ddd1b17705587900dd760c6003998e9472b77b56d417"}, {file = "greenlet-2.0.2-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:88d9ab96491d38a5ab7c56dd7a3cc37d83336ecc564e4e8816dbed12e5aaefc8"}, {file = "greenlet-2.0.2-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:561091a7be172ab497a3527602d467e2b3fbe75f9e783d8b8ce403fa414f71a6"}, {file = "greenlet-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:971ce5e14dc5e73715755d0ca2975ac88cfdaefcaab078a284fea6cfabf866df"}, @@ -3358,6 +3335,16 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -3533,10 +3520,7 @@ packaging = "<24" pandas = "<3" prometheus-flask-exporter = {version = "*", optional = true, markers = "extra == \"extras\""} protobuf = ">=3.12.0,<5" -pyarrow = [ - {version = ">=4.0.0,<13"}, - {version = "*", optional = true, markers = "extra == \"extras\""}, -] +pyarrow = ">=4.0.0,<13" pysftp = {version = "*", optional = true, markers = "extra == \"extras\""} pytz = "<2024" pyyaml = ">=5.1,<7" @@ -3945,12 +3929,11 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.21.0", markers = "python_version <= \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\""}, - {version = ">=1.19.3", markers = "python_version >= \"3.6\" and platform_system == \"Linux\" and platform_machine == \"aarch64\" or python_version >= \"3.9\""}, - {version = ">=1.17.0", markers = "python_version >= \"3.7\""}, - {version = ">=1.17.3", markers = "python_version >= \"3.8\""}, - {version = ">=1.21.2", markers = "python_version >= \"3.10\""}, + {version = ">=1.21.0", markers = "python_version <= \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\" and python_version >= \"3.8\""}, + {version = ">=1.19.3", markers = "platform_system == \"Linux\" and platform_machine == \"aarch64\" and python_version >= \"3.8\" and python_version < \"3.10\" or python_version > \"3.9\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_system != \"Darwin\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_machine != \"arm64\" and python_version < \"3.10\""}, + {version = ">=1.17.3", markers = "(platform_system != \"Darwin\" and platform_system != \"Linux\") and python_version >= \"3.8\" and python_version < \"3.9\" or platform_system != \"Darwin\" and python_version >= \"3.8\" and python_version < \"3.9\" and platform_machine != \"aarch64\" or platform_machine != \"arm64\" and python_version >= \"3.8\" and python_version < \"3.9\" and platform_system != \"Linux\" or (platform_machine != \"arm64\" and platform_machine != \"aarch64\") and python_version >= \"3.8\" and python_version < \"3.9\""}, {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\""}, + {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\""}, ] [[package]] @@ -3968,6 +3951,7 @@ files = [ {file = "orjson-3.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a39c2529d75373b7167bf84c814ef9b8f3737a339c225ed6c0df40736df8748"}, {file = "orjson-3.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:84ebd6fdf138eb0eb4280045442331ee71c0aab5e16397ba6645f32f911bfb37"}, {file = "orjson-3.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5a60a1cfcfe310547a1946506dd4f1ed0a7d5bd5b02c8697d9d5dcd8d2e9245e"}, + {file = "orjson-3.9.2-cp310-none-win32.whl", hash = "sha256:2ae61f5d544030a6379dbc23405df66fea0777c48a0216d2d83d3e08b69eb676"}, {file = "orjson-3.9.2-cp310-none-win_amd64.whl", hash = "sha256:c290c4f81e8fd0c1683638802c11610b2f722b540f8e5e858b6914b495cf90c8"}, {file = "orjson-3.9.2-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:02ef014f9a605e84b675060785e37ec9c0d2347a04f1307a9d6840ab8ecd6f55"}, {file = "orjson-3.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:992af54265ada1c1579500d6594ed73fe333e726de70d64919cf37f93defdd06"}, @@ -3977,6 +3961,7 @@ files = [ {file = "orjson-3.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:275b5a18fd9ed60b2720543d3ddac170051c43d680e47d04ff5203d2c6d8ebf1"}, {file = "orjson-3.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b9aea6dcb99fcbc9f6d1dd84fca92322fda261da7fb014514bb4689c7c2097a8"}, {file = "orjson-3.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7d74ae0e101d17c22ef67b741ba356ab896fc0fa64b301c2bf2bb0a4d874b190"}, + {file = "orjson-3.9.2-cp311-none-win32.whl", hash = "sha256:a9a7d618f99b2d67365f2b3a588686195cb6e16666cd5471da603a01315c17cc"}, {file = "orjson-3.9.2-cp311-none-win_amd64.whl", hash = "sha256:6320b28e7bdb58c3a3a5efffe04b9edad3318d82409e84670a9b24e8035a249d"}, {file = "orjson-3.9.2-cp37-cp37m-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:368e9cc91ecb7ac21f2aa475e1901204110cf3e714e98649c2502227d248f947"}, {file = "orjson-3.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58e9e70f0dcd6a802c35887f306b555ff7a214840aad7de24901fc8bd9cf5dde"}, @@ -3986,6 +3971,7 @@ files = [ {file = "orjson-3.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e46e9c5b404bb9e41d5555762fd410d5466b7eb1ec170ad1b1609cbebe71df21"}, {file = "orjson-3.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:8170157288714678ffd64f5de33039e1164a73fd8b6be40a8a273f80093f5c4f"}, {file = "orjson-3.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e3e2f087161947dafe8319ea2cfcb9cea4bb9d2172ecc60ac3c9738f72ef2909"}, + {file = "orjson-3.9.2-cp37-none-win32.whl", hash = "sha256:373b7b2ad11975d143556fdbd2c27e1150b535d2c07e0b48dc434211ce557fe6"}, {file = "orjson-3.9.2-cp37-none-win_amd64.whl", hash = "sha256:d7de3dbbe74109ae598692113cec327fd30c5a30ebca819b21dfa4052f7b08ef"}, {file = "orjson-3.9.2-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:8cd4385c59bbc1433cad4a80aca65d2d9039646a9c57f8084897549b55913b17"}, {file = "orjson-3.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a74036aab1a80c361039290cdbc51aa7adc7ea13f56e5ef94e9be536abd227bd"}, @@ -3995,6 +3981,7 @@ files = [ {file = "orjson-3.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1882a70bb69595b9ec5aac0040a819e94d2833fe54901e2b32f5e734bc259a8b"}, {file = "orjson-3.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:fc05e060d452145ab3c0b5420769e7356050ea311fc03cb9d79c481982917cca"}, {file = "orjson-3.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:f8bc2c40d9bb26efefb10949d261a47ca196772c308babc538dd9f4b73e8d386"}, + {file = "orjson-3.9.2-cp38-none-win32.whl", hash = "sha256:302d80198d8d5b658065627da3a356cbe5efa082b89b303f162f030c622e0a17"}, {file = "orjson-3.9.2-cp38-none-win_amd64.whl", hash = "sha256:3164fc20a585ec30a9aff33ad5de3b20ce85702b2b2a456852c413e3f0d7ab09"}, {file = "orjson-3.9.2-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:7a6ccadf788531595ed4728aa746bc271955448d2460ff0ef8e21eb3f2a281ba"}, {file = "orjson-3.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3245d230370f571c945f69aab823c279a868dc877352817e22e551de155cb06c"}, @@ -4004,6 +3991,7 @@ files = [ {file = "orjson-3.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03fb36f187a0c19ff38f6289418863df8b9b7880cdbe279e920bef3a09d8dab1"}, {file = "orjson-3.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:20925d07a97c49c6305bff1635318d9fc1804aa4ccacb5fb0deb8a910e57d97a"}, {file = "orjson-3.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:eebfed53bec5674e981ebe8ed2cf00b3f7bcda62d634733ff779c264307ea505"}, + {file = "orjson-3.9.2-cp39-none-win32.whl", hash = "sha256:ba60f09d735f16593950c6adf033fbb526faa94d776925579a87b777db7d0838"}, {file = "orjson-3.9.2-cp39-none-win_amd64.whl", hash = "sha256:869b961df5fcedf6c79f4096119b35679b63272362e9b745e668f0391a892d39"}, {file = "orjson-3.9.2.tar.gz", hash = "sha256:24257c8f641979bf25ecd3e27251b5cc194cdd3a6e96004aac8446f5e63d9664"}, ] @@ -4131,25 +4119,6 @@ urllib3 = ">=1.26.3" xmltodict = "*" zipfile36 = "*" -[[package]] -name = "pandavro" -version = "1.7.2" -description = "The interface between Avro and pandas DataFrame" -optional = false -python-versions = ">=3.6.1" -files = [ - {file = "pandavro-1.7.2-py3-none-any.whl", hash = "sha256:5b4a2fbc86fb2b102e5b2b24490084e4775a5ac546fc8981931abecf6bb4a34b"}, - {file = "pandavro-1.7.2.tar.gz", hash = "sha256:4f2b7b6823522f54e8bfe33c091fb29898349892b70634f46c928e6a42a76e69"}, -] - -[package.dependencies] -fastavro = ">=1.5.1,<1.6.0" -numpy = ">=1.15.4" -pandas = ">=1.1" - -[package.extras] -tests = ["pytest (==7.1.2)"] - [[package]] name = "paramiko" version = "3.2.0" @@ -5296,6 +5265,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -5303,8 +5273,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -5321,6 +5298,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -5328,6 +5306,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -6088,7 +6067,7 @@ files = [ ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\""} +greenlet = {version = "!=0.4.17", markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""} typing-extensions = ">=4.2.0" [package.extras] @@ -6248,8 +6227,8 @@ packaging = ">=21.3" pandas = ">=0.25" patsy = ">=0.5.2" scipy = [ - {version = ">=1.3", markers = "(python_version > \"3.9\" or platform_system != \"Windows\" or platform_machine != \"x86\") and python_version < \"3.12\""}, - {version = ">=1.3,<1.9", markers = "(python_version == \"3.8\" or python_version == \"3.9\") and platform_system == \"Windows\" and platform_machine == \"x86\""}, + {version = ">=1.3", markers = "python_version > \"3.9\" and python_version < \"3.12\" or platform_system != \"Windows\" and python_version < \"3.12\" or platform_machine != \"x86\" and python_version < \"3.12\""}, + {version = ">=1.3,<1.9", markers = "python_version == \"3.8\" and platform_system == \"Windows\" and platform_machine == \"x86\" or python_version == \"3.9\" and platform_system == \"Windows\" and platform_machine == \"x86\""}, ] [package.extras] @@ -7118,5 +7097,5 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" -python-versions = ">=3.8,<3.11" -content-hash = "ed25c76ba0aeea3d6fc6c59725c127160d13c12b527a3cf3900cb58db177750c" +python-versions = ">=3.8.1,<3.11" +content-hash = "40faaf4c9bfb618c5b2e728d68e54be49679936fe4d518fcf497fd7701243f5c" diff --git a/pyproject.toml b/pyproject.toml index 0c8318999..b12774c03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ version = "0.1.0" PyMySQL = {extras = ["rsa"], version = "^1.0.2"} Shapely = "^1.8.1" Unidecode = "^1.3.6" -basedosdados = "2.0.0b5" +basedosdados = {version = "2.0.0b14", extras = ["upload"]} black = "20.8b1" bs4 = "^0.0.1" croniter = "^1.3.5" @@ -46,7 +46,7 @@ plotly = "^5.14.0" prefect = "0.15.9" pymssql = "^2.2.4" pyproj = "^3.4.0" -python = ">=3.8,<3.11" +python = ">=3.8.1,<3.11" python-telegram-bot = "^13.11" pytz = "^2021.3" rasterio = "1.2.10" From 3bab155dab531e3bf0c5742fb8e77ab34e8d53cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 12:16:23 -0800 Subject: [PATCH 06/32] Atualiza metodos pacientes agendados clinica familia --- pipelines/rj_sms/__init__.py | 1 + .../clinica_scheduled_patients/flows.py | 28 ++++++++-- .../clinica_scheduled_patients/tasks.py | 53 ++++--------------- 3 files changed, 35 insertions(+), 47 deletions(-) diff --git a/pipelines/rj_sms/__init__.py b/pipelines/rj_sms/__init__.py index bb37a9dca..02be18dba 100644 --- a/pipelines/rj_sms/__init__.py +++ b/pipelines/rj_sms/__init__.py @@ -6,3 +6,4 @@ from pipelines.rj_sms.dump_db_sivep.flows import * from pipelines.rj_sms.dump_ftp_cnes.flows import * from pipelines.rj_sms.dump_api_prontuario_vitai.flows import * +from pipelines.rj_sms.whatsapp.clinica_scheduled_patients.flows import * diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py index 229f593e5..ed9caaac5 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py @@ -7,17 +7,35 @@ from prefect.storage import GCS from pipelines.constants import constants from prefect.run_configs import KubernetesRun +from utils import upload_to_datalake from tasks import ( get_patients, - save_patients -) - -from utils import ( + save_patients, upload_to_datalake ) with Flow("Vitacare patients") as flow_clinica_scheduled_patients: # Tasks - get_patients() \ No newline at end of file + result = get_patients() + save = save_patients(result) + save.set_upstream(result) + upload_to_datalake_task = upload_to_datalake( + input_path=f"pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data_partition", + dataset_id="whatsapp", + table_id="clinica_scheduled_patients", + if_exists="replace", + csv_delimiter=";", + if_storage_data_exists="replace", + biglake_table=True, + ) + upload_to_datalake_task.set_upstream(save) + +flow_clinica_scheduled_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +flow_clinica_scheduled_patients.run_config = KubernetesRun( + image=constants.DOCKER_IMAGE.value, + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], +) \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index 2c5042607..f04b8a483 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -1,57 +1,26 @@ # -*- coding: utf-8 -*- -import os import csv -import time -import json -import requests +import shutil import pandas as pd from prefect import task from pipelines.utils.utils import log -#from google.cloud import storage +from utils import create_partitions, cloud_function_request from datetime import datetime, timedelta -import google.oauth2.id_token -import google.auth.transport.requests +from pipelines.utils.utils import log, get_vault_secret @task def get_patients(): - - url = 'http://saudedigital.pepvitacare.com:8081/health/schedule/lastattendances' - context = 'clinica_patients_treated' - env = 'production' - cloud_function_vitacare(url, context, env) + url = 'http://saudedigital.pepvitacare.com:8081/health/schedule/nextappointments' + params = "{\"cnes\": \"6688152\", \"date\": \"2023-11-13\"}" + return cloud_function_request(url = url, request_type = 'POST', body_params = params, env = 'staging') @task def save_patients(dataframe): data_futura = datetime.today() + timedelta(days=3) data_formatada = data_futura.strftime('%Y-%m-%d') - #filename = f'sisreg_scheduled_patients/origin/{data_formatada}.csv' - filename = f'files/{data_formatada}.csv' - #bucket_name = 'rj-whatsapp' - #storage_client = storage.Client() - #bucket = storage_client.get_bucket(bucket_name) - #blob = bucket.blob(filename) - #csv_data = dataframe.to_csv(sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') + filename = f'pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data/{data_formatada}.csv' dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') - #blob.upload_from_string(csv_data, content_type="text/csv") - return True - -def cloud_function_vitacare(url, context, env): - if env == 'production': - function = 'https://us-central1-rj-sms.cloudfunctions.net/vitacare' - else: - function = 'https://us-central1-rj-sms.cloudfunctions.net/vitacare' - os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/Users/andremartins/.basedosdados/credentials/prod.json' - request = google.auth.transport.requests.Request() - audience = function - TOKEN = google.oauth2.id_token.fetch_id_token(request, audience) - - payload = json.dumps({ - "url": url, - "path": context, - "env": env - }) - headers = { - 'Content-Type': 'application/json', - 'Authorization': f'Bearer {TOKEN}' - } - return requests.request("POST", function, headers=headers, data=payload) \ No newline at end of file + partition_directory = 'pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data_partition' + shutil.rmtree(partition_directory, ignore_errors=True) + create_partitions('pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data', partition_directory) + return True \ No newline at end of file From 915ed599a6547017fb3b1d8e2d4cac4903d8cb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 13:06:34 -0800 Subject: [PATCH 07/32] Cria task cloud_function_request --- pipelines/rj_sms/utils.py | 50 +++++++++++++++++++ .../clinica_scheduled_patients/tasks.py | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/pipelines/rj_sms/utils.py b/pipelines/rj_sms/utils.py index d55eb6dfa..bf3f43fa7 100644 --- a/pipelines/rj_sms/utils.py +++ b/pipelines/rj_sms/utils.py @@ -19,6 +19,9 @@ from azure.storage.blob import BlobServiceClient from prefect import task from pipelines.utils.utils import log, get_vault_secret +import json +import google.oauth2.id_token +import google.auth.transport.requests @task @@ -562,3 +565,50 @@ def upload_to_datalake( except Exception as e: log(f"An error occurred: {e}", level="error") + +@task +def cloud_function_request( + url: str, + request_type: str = 'GET', + body_params: list = None, + query_params: list = None, + env: str = "staging" +): + """ + Returns data from a URL sent as a parameter. + + Parâmetros: + - url (str): URL do endpoint. + - request_type (str): Request type [GET or POST] (default GET). + - body_params (list): list of parameters to send by body parameters. + - query_params (list): list of parameters to send by query parameters. + - env (str): Cloud function account [prod or staging] + Return: + - response: Request response HTTP. + """ + # Retrieve the API key from Vault + try: + credential = get_vault_secret(secret_path="prontuario_vitacare")["data"] + except Exception as e: + log(f"Not able to retrieve Vault secret {e}", level="error") + + if env == 'prod': + function = 'https://us-central1-rj-sms.cloudfunctions.net/vitacare' + else: + function = 'https://us-central1-rj-sms-dev.cloudfunctions.net/vitacare' + + request = google.auth.transport.requests.Request() + audience = function + TOKEN = google.oauth2.id_token.fetch_id_token(request, audience) + payload = json.dumps({ + "url": url, + "request_type": request_type, + "body_params": body_params, + "query_params": query_params, + "credential": credential + }) + headers = { + 'Content-Type': 'application/json', + 'Authorization': f'Bearer {TOKEN}' + } + return requests.request("POST", function, headers=headers, data=payload) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index f04b8a483..c0302e464 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -10,7 +10,7 @@ @task def get_patients(): - url = 'http://saudedigital.pepvitacare.com:8081/health/schedule/nextappointments' + url = 'http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments' params = "{\"cnes\": \"6688152\", \"date\": \"2023-11-13\"}" return cloud_function_request(url = url, request_type = 'POST', body_params = params, env = 'staging') From a2708ccba21e032dacaec90f2360e40612d24aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 13:09:25 -0800 Subject: [PATCH 08/32] Update poetry.lock --- poetry.lock | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/poetry.lock b/poetry.lock index e3130cc76..a3b7df36e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. [[package]] name = "adal" @@ -3426,16 +3426,6 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -3611,7 +3601,10 @@ packaging = "<24" pandas = "<3" prometheus-flask-exporter = {version = "*", optional = true, markers = "extra == \"extras\""} protobuf = ">=3.12.0,<5" -pyarrow = ">=4.0.0,<13" +pyarrow = [ + {version = ">=4.0.0,<13"}, + {version = "*", optional = true, markers = "extra == \"extras\""}, +] pysftp = {version = "*", optional = true, markers = "extra == \"extras\""} pytz = "<2024" pyyaml = ">=5.1,<7" @@ -4020,11 +4013,12 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.21.0", markers = "python_version <= \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\" and python_version >= \"3.8\""}, - {version = ">=1.19.3", markers = "platform_system == \"Linux\" and platform_machine == \"aarch64\" and python_version >= \"3.8\" and python_version < \"3.10\" or python_version > \"3.9\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_system != \"Darwin\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_machine != \"arm64\" and python_version < \"3.10\""}, - {version = ">=1.17.3", markers = "(platform_system != \"Darwin\" and platform_system != \"Linux\") and python_version >= \"3.8\" and python_version < \"3.9\" or platform_system != \"Darwin\" and python_version >= \"3.8\" and python_version < \"3.9\" and platform_machine != \"aarch64\" or platform_machine != \"arm64\" and python_version >= \"3.8\" and python_version < \"3.9\" and platform_system != \"Linux\" or (platform_machine != \"arm64\" and platform_machine != \"aarch64\") and python_version >= \"3.8\" and python_version < \"3.9\""}, + {version = ">=1.21.0", markers = "python_version <= \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\""}, + {version = ">=1.19.3", markers = "python_version >= \"3.6\" and platform_system == \"Linux\" and platform_machine == \"aarch64\" or python_version >= \"3.9\""}, + {version = ">=1.17.0", markers = "python_version >= \"3.7\""}, + {version = ">=1.17.3", markers = "python_version >= \"3.8\""}, + {version = ">=1.21.2", markers = "python_version >= \"3.10\""}, {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\""}, - {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\""}, ] [[package]] @@ -5418,7 +5412,6 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -5426,15 +5419,8 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -5451,7 +5437,6 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -5459,7 +5444,6 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -6220,7 +6204,7 @@ files = [ ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""} +greenlet = {version = "!=0.4.17", markers = "platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\""} typing-extensions = ">=4.2.0" [package.extras] @@ -7250,4 +7234,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.11" -content-hash = "791af1416eb18fcc168766779d4a4ca8b1a26701a95aad234c34f474614e7a9d" +content-hash = "791af1416eb18fcc168766779d4a4ca8b1a26701a95aad234c34f474614e7a9d" \ No newline at end of file From e3cc2882fe1e08caa024174d684ce6159ce32ac6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 21:12:23 +0000 Subject: [PATCH 09/32] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pipelines/rj_sms/utils.py | 40 ++++++------ .../clinica_scheduled_patients/flows.py | 9 +-- .../clinica_scheduled_patients/run.py | 3 +- .../clinica_scheduled_patients/tasks.py | 35 +++++++--- .../clinica_scheduled_patients/utils.py | 4 +- .../sisreg_scheduled_patients/flows.py | 7 +- .../whatsapp/sisreg_scheduled_patients/run.py | 3 +- .../sisreg_scheduled_patients/tasks.py | 64 +++++++++++-------- .../sisreg_scheduled_patients/utils.py | 3 +- .../whatsapp/unidades_equipe_aps/flows.py | 7 +- .../whatsapp/unidades_equipe_aps/run.py | 3 +- .../whatsapp/unidades_equipe_aps/tasks.py | 32 ++++++---- .../whatsapp/unidades_equipe_aps/utils.py | 4 +- 13 files changed, 123 insertions(+), 91 deletions(-) diff --git a/pipelines/rj_sms/utils.py b/pipelines/rj_sms/utils.py index bf3f43fa7..ef10bb9e2 100644 --- a/pipelines/rj_sms/utils.py +++ b/pipelines/rj_sms/utils.py @@ -566,17 +566,18 @@ def upload_to_datalake( except Exception as e: log(f"An error occurred: {e}", level="error") + @task def cloud_function_request( - url: str, - request_type: str = 'GET', - body_params: list = None, - query_params: list = None, - env: str = "staging" + url: str, + request_type: str = "GET", + body_params: list = None, + query_params: list = None, + env: str = "staging", ): """ Returns data from a URL sent as a parameter. - + Parâmetros: - url (str): URL do endpoint. - request_type (str): Request type [GET or POST] (default GET). @@ -592,23 +593,22 @@ def cloud_function_request( except Exception as e: log(f"Not able to retrieve Vault secret {e}", level="error") - if env == 'prod': - function = 'https://us-central1-rj-sms.cloudfunctions.net/vitacare' + if env == "prod": + function = "https://us-central1-rj-sms.cloudfunctions.net/vitacare" else: - function = 'https://us-central1-rj-sms-dev.cloudfunctions.net/vitacare' + function = "https://us-central1-rj-sms-dev.cloudfunctions.net/vitacare" request = google.auth.transport.requests.Request() audience = function TOKEN = google.oauth2.id_token.fetch_id_token(request, audience) - payload = json.dumps({ - "url": url, - "request_type": request_type, - "body_params": body_params, - "query_params": query_params, - "credential": credential - }) - headers = { - 'Content-Type': 'application/json', - 'Authorization': f'Bearer {TOKEN}' - } + payload = json.dumps( + { + "url": url, + "request_type": request_type, + "body_params": body_params, + "query_params": query_params, + "credential": credential, + } + ) + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {TOKEN}"} return requests.request("POST", function, headers=headers, data=payload) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py index ed9caaac5..7a2c82876 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py @@ -9,14 +9,9 @@ from prefect.run_configs import KubernetesRun from utils import upload_to_datalake -from tasks import ( - get_patients, - save_patients, - upload_to_datalake -) +from tasks import get_patients, save_patients, upload_to_datalake with Flow("Vitacare patients") as flow_clinica_scheduled_patients: - # Tasks result = get_patients() save = save_patients(result) @@ -38,4 +33,4 @@ labels=[ constants.RJ_SMS_DEV_AGENT_LABEL.value, ], -) \ No newline at end of file +) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py index 7bbc87027..61e3f1607 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py @@ -1,4 +1,5 @@ +# -*- coding: utf-8 -*- from flows import flow_clinica_scheduled_patients from pipelines.utils.utils import run_local -run_local(flow_clinica_scheduled_patients) \ No newline at end of file +run_local(flow_clinica_scheduled_patients) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index c0302e464..27d0eaee7 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -8,19 +8,36 @@ from datetime import datetime, timedelta from pipelines.utils.utils import log, get_vault_secret + @task def get_patients(): - url = 'http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments' - params = "{\"cnes\": \"6688152\", \"date\": \"2023-11-13\"}" - return cloud_function_request(url = url, request_type = 'POST', body_params = params, env = 'staging') + url = ( + "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" + ) + params = '{"cnes": "6688152", "date": "2023-11-13"}' + return cloud_function_request( + url=url, request_type="POST", body_params=params, env="staging" + ) + @task def save_patients(dataframe): data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime('%Y-%m-%d') - filename = f'pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data/{data_formatada}.csv' - dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') - partition_directory = 'pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data_partition' + data_formatada = data_futura.strftime("%Y-%m-%d") + filename = f"pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data/{data_formatada}.csv" + dataframe.to_csv( + filename, + sep=";", + quoting=csv.QUOTE_NONNUMERIC, + quotechar='"', + index=False, + encoding="utf-8", + ) + partition_directory = ( + "pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data_partition" + ) shutil.rmtree(partition_directory, ignore_errors=True) - create_partitions('pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data', partition_directory) - return True \ No newline at end of file + create_partitions( + "pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data", partition_directory + ) + return True diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py index 4f76724b4..d4f23621b 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py @@ -1,8 +1,10 @@ +# -*- coding: utf-8 -*- import prefect from prefect import task import basedosdados as bd from pipelines.utils.utils import log - + + @task def upload_to_datalake( input_path: str, diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py index 315a2ec1c..cdb247230 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py @@ -10,14 +10,9 @@ from prefect.run_configs import KubernetesRun from datetime import datetime, timedelta -from tasks import ( - get_patients, - save_patients, - upload_to_datalake -) +from tasks import get_patients, save_patients, upload_to_datalake with Flow("SISREG patients") as flow_sisreg_scheduled_patients: - # Tasks dataframe = get_patients() save = save_patients(dataframe) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py index 222572b23..ccfe6246a 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py @@ -1,4 +1,5 @@ +# -*- coding: utf-8 -*- from flows import flow_sisreg_scheduled_patients from pipelines.utils.utils import run_local -run_local(flow_sisreg_scheduled_patients) \ No newline at end of file +run_local(flow_sisreg_scheduled_patients) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py index 17a042d08..dd084bc02 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py @@ -10,43 +10,38 @@ from datetime import datetime, timedelta import basedosdados as bd -from utils import ( - create_partitions -) +from utils import create_partitions + @task def get_patients(): # Get Autentication url = "https://rest.smsrio.org/api/usuario/autenticar" - payload = json.dumps({ - "cpf": "SisregAmb", - "senha": "77HtOzVJ6^#d", - "cnes": "5462886" - }) + payload = json.dumps( + {"cpf": "SisregAmb", "senha": "77HtOzVJ6^#d", "cnes": "5462886"} + ) headers = { - 'Content-Type': 'application/json', - 'Cookie': 'PHPSESSID=b40302ab232addf99960f1d4ffa7073b' + "Content-Type": "application/json", + "Cookie": "PHPSESSID=b40302ab232addf99960f1d4ffa7073b", } response = requests.request("POST", url, headers=headers, data=payload) - if response.status_code == 200: + if response.status_code == 200: # Get token dados_json = json.loads(response.text) - token = dados_json['dados'] + token = dados_json["dados"] data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime('%Y-%m-%d') + data_formatada = data_futura.strftime("%Y-%m-%d") # Config Parameter list_cnes = ["6688152"] for cnes in list_cnes: url = f"https://web2.smsrio.org/ambulatorio/api/pacientesAgendados/{cnes}/{data_formatada}/" payload = "" - headers = { - 'Authorization': 'Bearer ' + token - } + headers = {"Authorization": "Bearer " + token} # Desired number of repetitions num_repeticoes = 5 @@ -57,29 +52,46 @@ def get_patients(): log("Solicitação bem-sucedida!") df = pd.read_json(response.text) if df.empty: - log('DataFrame is empty!') + log("DataFrame is empty!") else: - return df + return df break else: - log(f"Falha na solicitação, código de status: {response.status_code}") + log( + f"Falha na solicitação, código de status: {response.status_code}" + ) # Aguarda 1 minuto antes da próxima solicitação time.sleep(10) - + return pd.DataFrame() + @task def save_patients(dataframe): data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime('%Y-%m-%d') - filename = f'pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data/{data_formatada}.csv' - dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') - partition_directory = 'pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data_partition' + data_formatada = data_futura.strftime("%Y-%m-%d") + filename = ( + f"pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data/{data_formatada}.csv" + ) + dataframe.to_csv( + filename, + sep=";", + quoting=csv.QUOTE_NONNUMERIC, + quotechar='"', + index=False, + encoding="utf-8", + ) + partition_directory = ( + "pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data_partition" + ) shutil.rmtree(partition_directory, ignore_errors=True) - create_partitions('pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data', partition_directory) + create_partitions( + "pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data", partition_directory + ) return True + @task def upload_to_datalake( input_path: str, @@ -161,4 +173,4 @@ def upload_to_datalake( log("Data uploaded to BigQuery") except Exception as e: - log(f"An error occurred: {e}", level="error") \ No newline at end of file + log(f"An error occurred: {e}", level="error") diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py index 8b29c73af..609315c44 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py @@ -1,9 +1,11 @@ +# -*- coding: utf-8 -*- from datetime import datetime from pathlib import Path import re import shutil from pipelines.utils.utils import log + def create_partitions(data_path: str, partition_directory: str): data_path = Path(data_path) partition_directory = Path(partition_directory) @@ -26,4 +28,3 @@ def create_partitions(data_path: str, partition_directory: str): # Copy file to partition directory shutil.copy(file_name, output_directory) - diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py index ae39f9e6c..02589e9fe 100644 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py @@ -9,14 +9,9 @@ from prefect.run_configs import KubernetesRun from datetime import datetime, timedelta -from tasks import ( - read_file, - save_file, - upload_to_datalake -) +from tasks import read_file, save_file, upload_to_datalake with Flow("Unidades Equipe APS") as flow_unidades_equipe_aps: - # Tasks dataframe = read_file() save = save_file(dataframe) diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py index 82ddaf675..ed4546226 100644 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py @@ -1,4 +1,5 @@ +# -*- coding: utf-8 -*- from flows import flow_unidades_equipe_aps from pipelines.utils.utils import run_local -run_local(flow_unidades_equipe_aps) \ No newline at end of file +run_local(flow_unidades_equipe_aps) diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py index 22c906af3..98eb870a0 100644 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py @@ -10,27 +10,37 @@ from datetime import datetime, timedelta import basedosdados as bd -from utils import ( - create_partitions -) +from utils import create_partitions + @task def read_file(): - arquivo_excel = 'pipelines/rj_sms/whatsapp/unidades_equipe_aps/data/unidades-equipes-aps-2023-10-27.csv' - dataframe = pd.read_csv(arquivo_excel, sep=';') + arquivo_excel = "pipelines/rj_sms/whatsapp/unidades_equipe_aps/data/unidades-equipes-aps-2023-10-27.csv" + dataframe = pd.read_csv(arquivo_excel, sep=";") return dataframe + @task def save_file(dataframe): data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime('%Y-%m-%d') - filename = 'pipelines/rj_sms/whatsapp/unidades_equipe_aps/data/unidades-equipes-aps-2023-10-27.csv' - dataframe.to_csv(filename, sep=';', quoting=csv.QUOTE_NONNUMERIC, quotechar='"', index=False, encoding='utf-8') - partition_directory = 'pipelines/rj_sms/whatsapp/unidades_equipe_aps/data_partition' + data_formatada = data_futura.strftime("%Y-%m-%d") + filename = "pipelines/rj_sms/whatsapp/unidades_equipe_aps/data/unidades-equipes-aps-2023-10-27.csv" + dataframe.to_csv( + filename, + sep=";", + quoting=csv.QUOTE_NONNUMERIC, + quotechar='"', + index=False, + encoding="utf-8", + ) + partition_directory = "pipelines/rj_sms/whatsapp/unidades_equipe_aps/data_partition" shutil.rmtree(partition_directory, ignore_errors=True) - create_partitions('pipelines/rj_sms/whatsapp/unidades_equipe_aps/data', partition_directory) + create_partitions( + "pipelines/rj_sms/whatsapp/unidades_equipe_aps/data", partition_directory + ) return True + @task def upload_to_datalake( input_path: str, @@ -112,4 +122,4 @@ def upload_to_datalake( log("Data uploaded to BigQuery") except Exception as e: - log(f"An error occurred: {e}", level="error") \ No newline at end of file + log(f"An error occurred: {e}", level="error") diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py index 8b353f00a..609315c44 100644 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py @@ -1,9 +1,11 @@ +# -*- coding: utf-8 -*- from datetime import datetime from pathlib import Path import re import shutil from pipelines.utils.utils import log + def create_partitions(data_path: str, partition_directory: str): data_path = Path(data_path) partition_directory = Path(partition_directory) @@ -25,4 +27,4 @@ def create_partitions(data_path: str, partition_directory: str): output_directory.mkdir(parents=True, exist_ok=True) # Copy file to partition directory - shutil.copy(file_name, output_directory) \ No newline at end of file + shutil.copy(file_name, output_directory) From 9d4fc8237edef016f58c66a069d8cd6aec7ba049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 13:26:13 -0800 Subject: [PATCH 10/32] Fix import upload_to_datalake --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py index ed9caaac5..83d214b77 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py @@ -7,7 +7,7 @@ from prefect.storage import GCS from pipelines.constants import constants from prefect.run_configs import KubernetesRun -from utils import upload_to_datalake +from pipelines.rj_sms.utils import upload_to_datalake from tasks import ( get_patients, From b2afe6e8d4bade2c0e5b9dc1ca9d41eb8ad278f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 13:38:28 -0800 Subject: [PATCH 11/32] Fix import tasks --- .../rj_sms/whatsapp/clinica_scheduled_patients/flows.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py index e359d4393..6c79bf07b 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py @@ -8,10 +8,9 @@ from pipelines.constants import constants from prefect.run_configs import KubernetesRun from pipelines.rj_sms.utils import upload_to_datalake +from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import get_patients, save_patients -from tasks import get_patients, save_patients, upload_to_datalake - -with Flow("Vitacare patients") as flow_clinica_scheduled_patients: +with Flow("SMS: Dump VitaCare - Captura dos pacientes agendados") as flow_clinica_scheduled_patients: # Tasks result = get_patients() save = save_patients(result) From bcb7f584cc5b27fde07483ad1b86f8721dbc3462 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 21:39:10 +0000 Subject: [PATCH 12/32] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../rj_sms/whatsapp/clinica_scheduled_patients/flows.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py index 6c79bf07b..0b36fe53e 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py @@ -8,9 +8,14 @@ from pipelines.constants import constants from prefect.run_configs import KubernetesRun from pipelines.rj_sms.utils import upload_to_datalake -from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import get_patients, save_patients +from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import ( + get_patients, + save_patients, +) -with Flow("SMS: Dump VitaCare - Captura dos pacientes agendados") as flow_clinica_scheduled_patients: +with Flow( + "SMS: Dump VitaCare - Captura dos pacientes agendados" +) as flow_clinica_scheduled_patients: # Tasks result = get_patients() save = save_patients(result) From 9f13d6be5605b53eb6f6dad5f51519c88c079676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 13:55:23 -0800 Subject: [PATCH 13/32] Fix import sisreg and unidades --- pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py | 2 +- pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py index cdb247230..bda88c8a9 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py @@ -10,7 +10,7 @@ from prefect.run_configs import KubernetesRun from datetime import datetime, timedelta -from tasks import get_patients, save_patients, upload_to_datalake +from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import get_patients, save_patients, upload_to_datalake with Flow("SISREG patients") as flow_sisreg_scheduled_patients: # Tasks diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py index 02589e9fe..021951306 100644 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py @@ -9,7 +9,7 @@ from prefect.run_configs import KubernetesRun from datetime import datetime, timedelta -from tasks import read_file, save_file, upload_to_datalake +from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import read_file, save_file, upload_to_datalake with Flow("Unidades Equipe APS") as flow_unidades_equipe_aps: # Tasks From febd8bc2a6cafe51be29f929e5af73bafbd41915 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 21:55:52 +0000 Subject: [PATCH 14/32] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../rj_sms/whatsapp/sisreg_scheduled_patients/flows.py | 6 +++++- pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py index bda88c8a9..460fec665 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py @@ -10,7 +10,11 @@ from prefect.run_configs import KubernetesRun from datetime import datetime, timedelta -from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import get_patients, save_patients, upload_to_datalake +from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import ( + get_patients, + save_patients, + upload_to_datalake, +) with Flow("SISREG patients") as flow_sisreg_scheduled_patients: # Tasks diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py index 021951306..d6169d8f5 100644 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py @@ -9,7 +9,11 @@ from prefect.run_configs import KubernetesRun from datetime import datetime, timedelta -from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import read_file, save_file, upload_to_datalake +from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import ( + read_file, + save_file, + upload_to_datalake, +) with Flow("Unidades Equipe APS") as flow_unidades_equipe_aps: # Tasks From 3edd9ec6bfc059936cc3078708e7c93dbd9121dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 14:06:25 -0800 Subject: [PATCH 15/32] Fix import create_partitions --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py | 2 +- pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py | 3 +-- pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index 27d0eaee7..6f98b4a16 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -4,7 +4,7 @@ import pandas as pd from prefect import task from pipelines.utils.utils import log -from utils import create_partitions, cloud_function_request +from pipelines.rj_sms.utils import create_partitions, cloud_function_request from datetime import datetime, timedelta from pipelines.utils.utils import log, get_vault_secret diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py index dd084bc02..bee18f9cc 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py @@ -9,8 +9,7 @@ from pipelines.utils.utils import log from datetime import datetime, timedelta import basedosdados as bd - -from utils import create_partitions +from pipelines.rj_sms.utils import create_partitions @task diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py index 98eb870a0..b25dec292 100644 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py @@ -9,8 +9,7 @@ from pipelines.utils.utils import log from datetime import datetime, timedelta import basedosdados as bd - -from utils import create_partitions +from pipelines.rj_sms.utils import create_partitions @task From a26ece50525b751abe4aaf1a483a8f58b935e8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 14:22:06 -0800 Subject: [PATCH 16/32] Fix name pipeline and fix import tasks --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py | 2 +- pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py | 2 +- pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py index 0b36fe53e..794154fc7 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py @@ -8,7 +8,7 @@ from pipelines.constants import constants from prefect.run_configs import KubernetesRun from pipelines.rj_sms.utils import upload_to_datalake -from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import ( +from pipelines.rj_sms.whatsapp.clinica_scheduled_patients.tasks import ( get_patients, save_patients, ) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py index 460fec665..ec7eafc0d 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py @@ -16,7 +16,7 @@ upload_to_datalake, ) -with Flow("SISREG patients") as flow_sisreg_scheduled_patients: +with Flow("SMS: Dump SISREG - Captura dos pacientes agendados") as flow_sisreg_scheduled_patients: # Tasks dataframe = get_patients() save = save_patients(dataframe) diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py index d6169d8f5..7aff6f04d 100644 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py +++ b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py @@ -15,7 +15,7 @@ upload_to_datalake, ) -with Flow("Unidades Equipe APS") as flow_unidades_equipe_aps: +with Flow("SMS: Dump SISREG - Import Unidades Equipe APS") as flow_unidades_equipe_aps: # Tasks dataframe = read_file() save = save_file(dataframe) From cfd8aea9f42f05dc5bd8d5a8e7633bbbb9a5fa85 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 22:22:24 +0000 Subject: [PATCH 17/32] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py index ec7eafc0d..9cb6cf46a 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py +++ b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py @@ -16,7 +16,9 @@ upload_to_datalake, ) -with Flow("SMS: Dump SISREG - Captura dos pacientes agendados") as flow_sisreg_scheduled_patients: +with Flow( + "SMS: Dump SISREG - Captura dos pacientes agendados" +) as flow_sisreg_scheduled_patients: # Tasks dataframe = get_patients() save = save_patients(dataframe) From a537b374253fd4269516cc900255f5effedc53c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 15:40:07 -0800 Subject: [PATCH 18/32] Fix call task cloud_function_request --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index 6f98b4a16..9b967680b 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -6,7 +6,6 @@ from pipelines.utils.utils import log from pipelines.rj_sms.utils import create_partitions, cloud_function_request from datetime import datetime, timedelta -from pipelines.utils.utils import log, get_vault_secret @task @@ -15,7 +14,7 @@ def get_patients(): "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" ) params = '{"cnes": "6688152", "date": "2023-11-13"}' - return cloud_function_request( + return cloud_function_request.run( url=url, request_type="POST", body_params=params, env="staging" ) From 1dfee95c208d6cb2bd3b356f212de46772f04223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 17 Nov 2023 15:43:36 -0800 Subject: [PATCH 19/32] Fix call create_partitions --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index 9b967680b..a916c06bc 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -36,7 +36,7 @@ def save_patients(dataframe): "pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data_partition" ) shutil.rmtree(partition_directory, ignore_errors=True) - create_partitions( + create_partitions.run( "pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data", partition_directory ) return True From ac53c564ffe81a9dc8838c24f2bc5af27c4fb145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Sat, 18 Nov 2023 11:10:58 -0800 Subject: [PATCH 20/32] Change parameters request cloud function --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index a916c06bc..25e7afa33 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -13,9 +13,9 @@ def get_patients(): url = ( "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" ) - params = '{"cnes": "6688152", "date": "2023-11-13"}' + params = '{"cnes": "6688152", "date": "2023-10-27"}' return cloud_function_request.run( - url=url, request_type="POST", body_params=params, env="staging" + url=url, request_type="GET", body_params=params, env="staging" ) From 991bfa6ed9eb8538439dbe7072f2d84b44c0530d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Sat, 18 Nov 2023 11:18:48 -0800 Subject: [PATCH 21/32] Convert response into DataFrame --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index 25e7afa33..b29e97cdf 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -14,9 +14,10 @@ def get_patients(): "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" ) params = '{"cnes": "6688152", "date": "2023-10-27"}' - return cloud_function_request.run( + response = cloud_function_request.run( url=url, request_type="GET", body_params=params, env="staging" ) + return pd.read_json(response.text) @task From 57d9e119710c750c22ae32e1934f0699070f809e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Sat, 18 Nov 2023 18:51:03 -0800 Subject: [PATCH 22/32] Create path to save file --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index b29e97cdf..d293dc907 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import os import csv import shutil import pandas as pd @@ -22,6 +23,9 @@ def get_patients(): @task def save_patients(dataframe): + path = 'pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data' + if not os.path.exists(path): + os.mkdir(path) data_futura = datetime.today() + timedelta(days=3) data_formatada = data_futura.strftime("%Y-%m-%d") filename = f"pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data/{data_formatada}.csv" From d6b7552f355abcc72aa0a9a8e99a229dc76a3e81 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 19 Nov 2023 02:51:22 +0000 Subject: [PATCH 23/32] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py index d293dc907..b2232cefb 100644 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py @@ -23,7 +23,7 @@ def get_patients(): @task def save_patients(dataframe): - path = 'pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data' + path = "pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data" if not os.path.exists(path): os.mkdir(path) data_futura = datetime.today() + timedelta(days=3) From dab3d5a49b3a6cbd70d2a0307f6498e9d3474d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Wed, 22 Nov 2023 06:06:38 -0800 Subject: [PATCH 24/32] Create new pipeline vitacare attended patients --- pipelines/rj_sms/__init__.py | 3 +- .../dump_api_prontuario_vitacare/flows.py | 75 ++++++++ .../dump_api_prontuario_vitacare/schedules.py | 33 ++++ .../dump_api_prontuario_vitacare/tasks.py | 73 ++++++++ .../flows.py | 29 ++- .../rj_sms/dump_api_regulacao_sisreg/run.py | 5 + .../dump_api_regulacao_sisreg/schedules.py | 21 +++ .../rj_sms/dump_api_regulacao_sisreg/tasks.py | 90 +++++++++ pipelines/rj_sms/dump_db_sivep/__init_.py | 0 pipelines/rj_sms/dump_db_sivep/flows.py | 41 ---- pipelines/rj_sms/dump_db_sivep/schedules.py | 44 ----- .../clinica_scheduled_patients/flows.py | 40 ---- .../clinica_scheduled_patients/run.py | 5 - .../clinica_scheduled_patients/tasks.py | 47 ----- .../clinica_scheduled_patients/utils.py | 89 --------- .../whatsapp/sisreg_scheduled_patients/run.py | 5 - .../sisreg_scheduled_patients/tasks.py | 175 ------------------ .../sisreg_scheduled_patients/utils.py | 30 --- .../whatsapp/unidades_equipe_aps/flows.py | 40 ---- .../whatsapp/unidades_equipe_aps/run.py | 5 - .../whatsapp/unidades_equipe_aps/tasks.py | 124 ------------- .../whatsapp/unidades_equipe_aps/utils.py | 30 --- 22 files changed, 313 insertions(+), 691 deletions(-) create mode 100644 pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py create mode 100644 pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py create mode 100644 pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py rename pipelines/rj_sms/{whatsapp/sisreg_scheduled_patients => dump_api_regulacao_sisreg}/flows.py (50%) create mode 100644 pipelines/rj_sms/dump_api_regulacao_sisreg/run.py create mode 100644 pipelines/rj_sms/dump_api_regulacao_sisreg/schedules.py create mode 100644 pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py delete mode 100644 pipelines/rj_sms/dump_db_sivep/__init_.py delete mode 100644 pipelines/rj_sms/dump_db_sivep/flows.py delete mode 100644 pipelines/rj_sms/dump_db_sivep/schedules.py delete mode 100644 pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py delete mode 100644 pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py delete mode 100644 pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py delete mode 100644 pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py delete mode 100644 pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py delete mode 100644 pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py delete mode 100644 pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py delete mode 100644 pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py delete mode 100644 pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py delete mode 100644 pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py delete mode 100644 pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py diff --git a/pipelines/rj_sms/__init__.py b/pipelines/rj_sms/__init__.py index 02be18dba..e31c92cf6 100644 --- a/pipelines/rj_sms/__init__.py +++ b/pipelines/rj_sms/__init__.py @@ -6,4 +6,5 @@ from pipelines.rj_sms.dump_db_sivep.flows import * from pipelines.rj_sms.dump_ftp_cnes.flows import * from pipelines.rj_sms.dump_api_prontuario_vitai.flows import * -from pipelines.rj_sms.whatsapp.clinica_scheduled_patients.flows import * +from pipelines.rj_sms.dump_api_prontuario_vitacare.flows import * +from pipelines.rj_sms.dump_api_regulacao_sisreg.flows import * \ No newline at end of file diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py new file mode 100644 index 000000000..b1dcda15a --- /dev/null +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +""" +WhatsApp Vitacare flow definition +""" +import pandas as pd +from prefect import Flow +from prefect.storage import GCS +from pipelines.constants import constants +from prefect.run_configs import KubernetesRun +from pipelines.rj_sms.utils import upload_to_datalake +from pipelines.rj_sms.dump_api_prontuario_vitacare.tasks import ( + get_patients, + save_patients +) + +from pipelines.rj_sms.dump_api_prontuario_vitacare.schedules import ( + every_day_at_six_am, + every_day_at_seven_am +) + +with Flow( + "SMS: Dump VitaCare - Captura dos pacientes agendados" +) as dump_vitacare_scheduled_patients: + # Tasks + result = get_patients('6688152', context = 'scheduled') + save = save_patients(result, context = 'scheduled') + save.set_upstream(result) + upload_to_datalake_task = upload_to_datalake( + input_path=f"pipelines/rj_sms/dump_api_prontuario_vitacare/data_partition", + dataset_id="brutos_prontuario_vitacare", + table_id="pacientes_agendados_3_dias", + if_exists="replace", + csv_delimiter=";", + if_storage_data_exists="replace", + biglake_table=True, + ) + upload_to_datalake_task.set_upstream(save) + +dump_vitacare_scheduled_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +dump_vitacare_scheduled_patients.run_config = KubernetesRun( + image=constants.DOCKER_IMAGE.value, + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], +) + +dump_vitacare_scheduled_patients.schedule = every_day_at_six_am + +with Flow( + "SMS: Dump VitaCare - Captura dos pacientes atendidos" +) as dump_vitacare_attended_patients: + # Tasks + result = get_patients('6688152', context = 'attended') + save = save_patients(result, context = 'attended') + save.set_upstream(result) + upload_to_datalake_task = upload_to_datalake( + input_path=f"pipelines/rj_sms/dump_api_prontuario_vitacare/data_partition", + dataset_id="brutos_prontuario_vitacare", + table_id="pacientes_atendidos_dia_anterior", + if_exists="replace", + csv_delimiter=";", + if_storage_data_exists="replace", + biglake_table=True, + ) + upload_to_datalake_task.set_upstream(save) + +dump_vitacare_attended_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +dump_vitacare_attended_patients.run_config = KubernetesRun( + image=constants.DOCKER_IMAGE.value, + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], +) + +dump_vitacare_attended_patients.schedule = every_day_at_seven_am \ No newline at end of file diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py new file mode 100644 index 000000000..ff7c7885a --- /dev/null +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py @@ -0,0 +1,33 @@ +""" +Schedules for the database dump pipeline +""" + +from datetime import timedelta +import pendulum +from prefect.schedules import Schedule +from prefect.schedules.clocks import IntervalClock +from pipelines.constants import constants + +every_day_at_six_am = Schedule( + clocks=[ + IntervalClock( + interval=timedelta(days=1), + start_date=pendulum.datetime(2023, 1, 1, 6, 0, 0, tz="America/Sao_Paulo"), + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], + ) + ] +) + +every_day_at_seven_am = Schedule( + clocks=[ + IntervalClock( + interval=timedelta(days=1), + start_date=pendulum.datetime(2023, 1, 1, 7, 0, 0, tz="America/Sao_Paulo"), + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], + ) + ] +) \ No newline at end of file diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py new file mode 100644 index 000000000..e28a39164 --- /dev/null +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +import os +import csv +import shutil +import pandas as pd +from prefect import task +from pipelines.utils.utils import log +from pipelines.rj_sms.utils import create_partitions, cloud_function_request +from datetime import datetime, timedelta + + +@task +def get_patients(cnes, context): + log("Getting data from cloud function") + if context == 'scheduled': + url = ( + "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" + ) + data = datetime.today() + timedelta(days=3) + else: + url = ( + "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" + ) + data = datetime.today() - timedelta(days=1) + #data_formatada = data.strftime('%Y-%m-%d') + data_formatada = '2023-10-24' + df = pd.DataFrame() + params = '{"cnes": "' + cnes + '", "date": "' + data_formatada + '"}' + response = cloud_function_request.run( + url=url, request_type="GET", body_params=params, env="staging" + ) + df_temp = pd.read_json(response.text) + if not df_temp.empty: + df = pd.concat([df, df_temp], ignore_index=True) + else: + log('Error read data from cnes - ' + cnes, level='error' ) + return df + +@task +def save_patients(dataframe, context): + log("Saving data into the server") + path = 'pipelines/rj_sms/dump_api_prontuario_vitacare/data' + try: + if os.path.exists(path): + shutil.rmtree(path, ignore_errors=True) + os.mkdir(path) + else: + os.mkdir(path) + if context == 'scheduled': + data_futura = datetime.today() + timedelta(days=3) + else: + data_futura = datetime.today() - timedelta(days=1) + data_formatada = data_futura.strftime("%Y-%m-%d") + filename = f"pipelines/rj_sms/dump_api_prontuario_vitacare/data/{data_formatada}.csv" + dataframe.to_csv( + filename, + sep=";", + quoting=csv.QUOTE_NONNUMERIC, + quotechar='"', + index=False, + encoding="utf-8", + ) + partition_directory = ( + "pipelines/rj_sms/dump_api_prontuario_vitacare/data_partition" + ) + shutil.rmtree(partition_directory, ignore_errors=True) + create_partitions.run( + "pipelines/rj_sms/dump_api_prontuario_vitacare/data", partition_directory + ) + return True + except: + log('Error when trying to save files', level='error') + return False \ No newline at end of file diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py similarity index 50% rename from pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py rename to pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py index 9cb6cf46a..0be0db5be 100644 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/flows.py +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py @@ -1,32 +1,29 @@ # -*- coding: utf-8 -*- """ -WhatsApp flow definition +WhatsApp SISREG flow definition """ - - from prefect import Flow from prefect.storage import GCS from pipelines.constants import constants from prefect.run_configs import KubernetesRun -from datetime import datetime, timedelta - -from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import ( +from pipelines.rj_sms.utils import upload_to_datalake +from pipelines.rj_sms.dump_api_regulacao_sisreg.tasks import ( get_patients, - save_patients, - upload_to_datalake, + save_patients ) +from pipelines.rj_sms.dump_api_regulacao_sisreg.schedules import every_day_at_six_am with Flow( "SMS: Dump SISREG - Captura dos pacientes agendados" -) as flow_sisreg_scheduled_patients: +) as dump_sisreg_scheduled_patients: # Tasks - dataframe = get_patients() + dataframe = get_patients('6688152') save = save_patients(dataframe) save.set_upstream(dataframe) upload_to_datalake_task = upload_to_datalake( - input_path=f"pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data_partition", - dataset_id="whatsapp", - table_id="sisreg_scheduled_patients", + input_path=f"pipelines/rj_sms/dump_api_regulacao_sisreg/data_partition", + dataset_id="brutos_regulacao_sisreg", + table_id="pacientes_agendados_5_dias", if_exists="replace", csv_delimiter=";", if_storage_data_exists="replace", @@ -34,10 +31,12 @@ ) upload_to_datalake_task.set_upstream(save) -flow_sisreg_scheduled_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) -flow_sisreg_scheduled_patients.run_config = KubernetesRun( +dump_sisreg_scheduled_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +dump_sisreg_scheduled_patients.run_config = KubernetesRun( image=constants.DOCKER_IMAGE.value, labels=[ constants.RJ_SMS_DEV_AGENT_LABEL.value, ], ) + +dump_sisreg_scheduled_patients.schedule = every_day_at_six_am diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/run.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/run.py new file mode 100644 index 000000000..3e8289777 --- /dev/null +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/run.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +from flows import dump_sisreg_scheduled_patients +from pipelines.utils.utils import run_local + +run_local(dump_sisreg_scheduled_patients) diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/schedules.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/schedules.py new file mode 100644 index 000000000..a480446cf --- /dev/null +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/schedules.py @@ -0,0 +1,21 @@ +""" +Schedules for the database dump pipeline +""" + +from datetime import timedelta +import pendulum +from prefect.schedules import Schedule +from prefect.schedules.clocks import IntervalClock +from pipelines.constants import constants + +every_day_at_six_am = Schedule( + clocks=[ + IntervalClock( + interval=timedelta(days=1), + start_date=pendulum.datetime(2023, 1, 1, 6, 0, 0, tz="America/Sao_Paulo"), + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], + ) + ] +) \ No newline at end of file diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py new file mode 100644 index 000000000..247197d62 --- /dev/null +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +import os +import csv +import shutil +import time +import json +import requests +import pandas as pd +from prefect import task +from pipelines.utils.utils import log +from datetime import datetime, timedelta +from pipelines.rj_sms.utils import create_partitions + + +@task +def get_patients(cnes): + # Get Autentication + url = "https://rest.smsrio.org/api/usuario/autenticar" + + payload = json.dumps( + {"cpf": "SisregAmb", "senha": "77HtOzVJ6^#d", "cnes": "5462886"} + ) + + headers = { + "Content-Type": "application/json", + "Cookie": "PHPSESSID=b40302ab232addf99960f1d4ffa7073b", + } + + response = requests.request("POST", url, headers=headers, data=payload) + + if response.status_code == 200: + # Get token + dados_json = json.loads(response.text) + token = dados_json["dados"] + data_futura = datetime.today() + timedelta(days=5) + data_formatada = data_futura.strftime("%Y-%m-%d") + url = f"https://web2.smsrio.org/ambulatorio/api/pacientesAgendados/{cnes}/{data_formatada}/" + + payload = "" + headers = {"Authorization": "Bearer " + token} + + # Desired number of repetitions + num_repeticoes = 5 + + for _ in range(num_repeticoes): + response = requests.get(url, headers=headers, data=payload) + if response.status_code == 200: + log("Solicitação bem-sucedida!") + df = pd.read_json(response.text) + if df.empty: + log("DataFrame is empty!") + else: + return df + break + else: + log(f"Falha na solicitação, código de status: {response.status_code}") + # Aguarda 1 minuto antes da próxima solicitação + time.sleep(10) + + return pd.DataFrame() + + +@task +def save_patients(dataframe): + path='pipelines/rj_sms/dump_api_regulacao_sisreg/data' + if os.path.exists(path): + shutil.rmtree(path, ignore_errors=True) + os.mkdir(path) + else: + os.mkdir(path) + data_futura = datetime.today() + timedelta(days=5) + data_formatada = data_futura.strftime("%Y-%m-%d") + filename = f"pipelines/rj_sms/dump_api_regulacao_sisreg/data/{data_formatada}.csv" + dataframe.to_csv( + filename, + sep=";", + quoting=csv.QUOTE_NONNUMERIC, + quotechar='"', + index=False, + encoding="utf-8", + ) + partition_directory = ( + "pipelines/rj_sms/dump_api_regulacao_sisreg/data_partition" + ) + shutil.rmtree(partition_directory, ignore_errors=True) + create_partitions.run( + "pipelines/rj_sms/dump_api_regulacao_sisreg/data", partition_directory + ) + return True + diff --git a/pipelines/rj_sms/dump_db_sivep/__init_.py b/pipelines/rj_sms/dump_db_sivep/__init_.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/pipelines/rj_sms/dump_db_sivep/flows.py b/pipelines/rj_sms/dump_db_sivep/flows.py deleted file mode 100644 index c9478c7ab..000000000 --- a/pipelines/rj_sms/dump_db_sivep/flows.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Database dumping flows for sms project SIVEP -""" - -from copy import deepcopy - -from prefect.run_configs import KubernetesRun -from prefect.storage import GCS - -from pipelines.constants import constants - -from pipelines.rj_sms.dump_db_sivep.schedules import sms_web_weekly_update_schedule -from pipelines.utils.dump_db.flows import dump_sql_flow -from pipelines.utils.utils import set_default_parameters - -# SMS: SIVEP - Ingerir tabelas de banco SQL - -sms_sivep_flow = deepcopy(dump_sql_flow) -sms_sivep_flow.name = "SMS: SIVEP - Ingerir tabelas de banco SQL" -sms_sivep_flow.storage = GCS(constants.GCS_FLOWS_BUCKET.value) -sms_sivep_flow.run_config = KubernetesRun( - image=constants.DOCKER_IMAGE.value, - labels=[ - constants.RJ_SMS_AGENT_LABEL.value, - ], -) - -sms_default_parameters = { - "db_database": "gtsinan", - "db_host": "10.50.74.94", - "db_port": "3306", - "db_type": "mysql", - "vault_secret_path": "formacao-sivep", - "dataset_id": "sms_covid", -} -sms_sivep_flow = set_default_parameters( - sms_sivep_flow, default_parameters=sms_default_parameters -) - -sms_sivep_flow.schedule = sms_web_weekly_update_schedule diff --git a/pipelines/rj_sms/dump_db_sivep/schedules.py b/pipelines/rj_sms/dump_db_sivep/schedules.py deleted file mode 100644 index 5028a69a2..000000000 --- a/pipelines/rj_sms/dump_db_sivep/schedules.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Schedules for the database dump pipeline -""" - -from datetime import datetime, timedelta - -import pytz -from prefect.schedules import Schedule -from pipelines.constants import constants -from pipelines.utils.dump_db.utils import generate_dump_db_schedules -from pipelines.utils.utils import untuple_clocks as untuple - -##################################### -# -# EGPWeb Schedules -# -##################################### - -sms_web_queries = { - "srag": { - "dump_mode": "overwrite", - "execute_query": "SELECT * FROM gtsinan.vw_sivep_escritoriodados;", - "materialize_after_dump": True, - "materialization_mode": "prod", - } -} - -sms_web_clocks = generate_dump_db_schedules( - interval=timedelta(days=1), - start_date=datetime(2022, 9, 14, 15, 0, tzinfo=pytz.timezone("America/Sao_Paulo")), - labels=[ - constants.RJ_SMS_AGENT_LABEL.value, - ], - db_database="gtsinan", - db_host="10.50.74.94", - db_port=3306, - db_type="mysql", - dataset_id="sms_covid", - vault_secret_path="formacao-sivep", - table_parameters=sms_web_queries, -) - -sms_web_weekly_update_schedule = Schedule(clocks=untuple(sms_web_clocks)) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py deleted file mode 100644 index 794154fc7..000000000 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/flows.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -""" -WhatsApp flow definition -""" -import pandas as pd -from prefect import Flow -from prefect.storage import GCS -from pipelines.constants import constants -from prefect.run_configs import KubernetesRun -from pipelines.rj_sms.utils import upload_to_datalake -from pipelines.rj_sms.whatsapp.clinica_scheduled_patients.tasks import ( - get_patients, - save_patients, -) - -with Flow( - "SMS: Dump VitaCare - Captura dos pacientes agendados" -) as flow_clinica_scheduled_patients: - # Tasks - result = get_patients() - save = save_patients(result) - save.set_upstream(result) - upload_to_datalake_task = upload_to_datalake( - input_path=f"pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data_partition", - dataset_id="whatsapp", - table_id="clinica_scheduled_patients", - if_exists="replace", - csv_delimiter=";", - if_storage_data_exists="replace", - biglake_table=True, - ) - upload_to_datalake_task.set_upstream(save) - -flow_clinica_scheduled_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) -flow_clinica_scheduled_patients.run_config = KubernetesRun( - image=constants.DOCKER_IMAGE.value, - labels=[ - constants.RJ_SMS_DEV_AGENT_LABEL.value, - ], -) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py deleted file mode 100644 index 61e3f1607..000000000 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/run.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- -from flows import flow_clinica_scheduled_patients -from pipelines.utils.utils import run_local - -run_local(flow_clinica_scheduled_patients) diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py deleted file mode 100644 index d293dc907..000000000 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -import os -import csv -import shutil -import pandas as pd -from prefect import task -from pipelines.utils.utils import log -from pipelines.rj_sms.utils import create_partitions, cloud_function_request -from datetime import datetime, timedelta - - -@task -def get_patients(): - url = ( - "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" - ) - params = '{"cnes": "6688152", "date": "2023-10-27"}' - response = cloud_function_request.run( - url=url, request_type="GET", body_params=params, env="staging" - ) - return pd.read_json(response.text) - - -@task -def save_patients(dataframe): - path = 'pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data' - if not os.path.exists(path): - os.mkdir(path) - data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime("%Y-%m-%d") - filename = f"pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data/{data_formatada}.csv" - dataframe.to_csv( - filename, - sep=";", - quoting=csv.QUOTE_NONNUMERIC, - quotechar='"', - index=False, - encoding="utf-8", - ) - partition_directory = ( - "pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data_partition" - ) - shutil.rmtree(partition_directory, ignore_errors=True) - create_partitions.run( - "pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data", partition_directory - ) - return True diff --git a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py b/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py deleted file mode 100644 index d4f23621b..000000000 --- a/pipelines/rj_sms/whatsapp/clinica_scheduled_patients/utils.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -import prefect -from prefect import task -import basedosdados as bd -from pipelines.utils.utils import log - - -@task -def upload_to_datalake( - input_path: str, - dataset_id: str, - table_id: str, - if_exists: str = "replace", - csv_delimiter: str = ";", - if_storage_data_exists: str = "replace", - biglake_table: bool = True, - dump_mode: str = "append", -): - """ - Uploads data from a file to a BigQuery table in a specified dataset. - - Args: - input_path (str): The path to the file containing the data to be uploaded. - dataset_id (str): The ID of the dataset where the table is located. - table_id (str): The ID of the table where the data will be uploaded. - if_exists (str, optional): Specifies what to do if the table already exists. - Defaults to "replace". - csv_delimiter (str, optional): The delimiter used in the CSV file. Defaults to ";". - if_storage_data_exists (str, optional): Specifies what to do if the storage data - already exists. Defaults to "replace". - biglake_table (bool, optional): Specifies whether the table is a BigLake table. - Defaults to True. - """ - tb = bd.Table(dataset_id=dataset_id, table_id=table_id) - table_staging = f"{tb.table_full_name['staging']}" - st = bd.Storage(dataset_id=dataset_id, table_id=table_id) - storage_path = f"{st.bucket_name}.staging.{dataset_id}.{table_id}" - storage_path_link = ( - f"https://console.cloud.google.com/storage/browser/{st.bucket_name}" - f"/staging/{dataset_id}/{table_id}" - ) - - try: - table_exists = tb.table_exists(mode="staging") - - if not table_exists: - log(f"CREATING TABLE: {dataset_id}.{table_id}") - tb.create( - path=input_path, - csv_delimiter=csv_delimiter, - if_storage_data_exists=if_storage_data_exists, - biglake_table=biglake_table, - ) - else: - if dump_mode == "append": - log( - f"TABLE ALREADY EXISTS APPENDING DATA TO STORAGE: {dataset_id}.{table_id}" - ) - - tb.append(filepath=input_path, if_exists=if_exists) - elif dump_mode == "overwrite": - log( - "MODE OVERWRITE: Table ALREADY EXISTS, DELETING OLD DATA!\n" - f"{storage_path}\n" - f"{storage_path_link}" - ) # pylint: disable=C0301 - st.delete_table( - mode="staging", bucket_name=st.bucket_name, not_found_ok=True - ) - log( - "MODE OVERWRITE: Sucessfully DELETED OLD DATA from Storage:\n" - f"{storage_path}\n" - f"{storage_path_link}" - ) # pylint: disable=C0301 - tb.delete(mode="all") - log( - "MODE OVERWRITE: Sucessfully DELETED TABLE:\n" f"{table_staging}\n" - ) # pylint: disable=C0301 - - tb.create( - path=input_path, - csv_delimiter=csv_delimiter, - if_storage_data_exists=if_storage_data_exists, - biglake_table=biglake_table, - ) - log("Data uploaded to BigQuery") - - except Exception as e: - log(f"An error occurred: {e}", level="error") diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py deleted file mode 100644 index ccfe6246a..000000000 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/run.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- -from flows import flow_sisreg_scheduled_patients -from pipelines.utils.utils import run_local - -run_local(flow_sisreg_scheduled_patients) diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py deleted file mode 100644 index bee18f9cc..000000000 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/tasks.py +++ /dev/null @@ -1,175 +0,0 @@ -# -*- coding: utf-8 -*- -import csv -import shutil -import time -import json -import requests -import pandas as pd -from prefect import task -from pipelines.utils.utils import log -from datetime import datetime, timedelta -import basedosdados as bd -from pipelines.rj_sms.utils import create_partitions - - -@task -def get_patients(): - # Get Autentication - url = "https://rest.smsrio.org/api/usuario/autenticar" - - payload = json.dumps( - {"cpf": "SisregAmb", "senha": "77HtOzVJ6^#d", "cnes": "5462886"} - ) - - headers = { - "Content-Type": "application/json", - "Cookie": "PHPSESSID=b40302ab232addf99960f1d4ffa7073b", - } - - response = requests.request("POST", url, headers=headers, data=payload) - - if response.status_code == 200: - # Get token - dados_json = json.loads(response.text) - token = dados_json["dados"] - data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime("%Y-%m-%d") - # Config Parameter - list_cnes = ["6688152"] - for cnes in list_cnes: - url = f"https://web2.smsrio.org/ambulatorio/api/pacientesAgendados/{cnes}/{data_formatada}/" - - payload = "" - headers = {"Authorization": "Bearer " + token} - - # Desired number of repetitions - num_repeticoes = 5 - - for _ in range(num_repeticoes): - response = requests.get(url, headers=headers, data=payload) - if response.status_code == 200: - log("Solicitação bem-sucedida!") - df = pd.read_json(response.text) - if df.empty: - log("DataFrame is empty!") - else: - return df - break - else: - log( - f"Falha na solicitação, código de status: {response.status_code}" - ) - - # Aguarda 1 minuto antes da próxima solicitação - time.sleep(10) - - return pd.DataFrame() - - -@task -def save_patients(dataframe): - data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime("%Y-%m-%d") - filename = ( - f"pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data/{data_formatada}.csv" - ) - dataframe.to_csv( - filename, - sep=";", - quoting=csv.QUOTE_NONNUMERIC, - quotechar='"', - index=False, - encoding="utf-8", - ) - partition_directory = ( - "pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data_partition" - ) - shutil.rmtree(partition_directory, ignore_errors=True) - create_partitions( - "pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/data", partition_directory - ) - return True - - -@task -def upload_to_datalake( - input_path: str, - dataset_id: str, - table_id: str, - if_exists: str = "replace", - csv_delimiter: str = ";", - if_storage_data_exists: str = "replace", - biglake_table: bool = True, - dump_mode: str = "append", -): - """ - Uploads data from a file to a BigQuery table in a specified dataset. - - Args: - input_path (str): The path to the file containing the data to be uploaded. - dataset_id (str): The ID of the dataset where the table is located. - table_id (str): The ID of the table where the data will be uploaded. - if_exists (str, optional): Specifies what to do if the table already exists. - Defaults to "replace". - csv_delimiter (str, optional): The delimiter used in the CSV file. Defaults to ";". - if_storage_data_exists (str, optional): Specifies what to do if the storage data - already exists. Defaults to "replace". - biglake_table (bool, optional): Specifies whether the table is a BigLake table. - Defaults to True. - """ - tb = bd.Table(dataset_id=dataset_id, table_id=table_id) - table_staging = f"{tb.table_full_name['staging']}" - st = bd.Storage(dataset_id=dataset_id, table_id=table_id) - storage_path = f"{st.bucket_name}.staging.{dataset_id}.{table_id}" - storage_path_link = ( - f"https://console.cloud.google.com/storage/browser/{st.bucket_name}" - f"/staging/{dataset_id}/{table_id}" - ) - - try: - table_exists = tb.table_exists(mode="staging") - - if not table_exists: - log(f"CREATING TABLE: {dataset_id}.{table_id}") - tb.create( - path=input_path, - csv_delimiter=csv_delimiter, - if_storage_data_exists=if_storage_data_exists, - biglake_table=biglake_table, - ) - else: - if dump_mode == "append": - log( - f"TABLE ALREADY EXISTS APPENDING DATA TO STORAGE: {dataset_id}.{table_id}" - ) - - tb.append(filepath=input_path, if_exists=if_exists) - elif dump_mode == "overwrite": - log( - "MODE OVERWRITE: Table ALREADY EXISTS, DELETING OLD DATA!\n" - f"{storage_path}\n" - f"{storage_path_link}" - ) # pylint: disable=C0301 - st.delete_table( - mode="staging", bucket_name=st.bucket_name, not_found_ok=True - ) - log( - "MODE OVERWRITE: Sucessfully DELETED OLD DATA from Storage:\n" - f"{storage_path}\n" - f"{storage_path_link}" - ) # pylint: disable=C0301 - tb.delete(mode="all") - log( - "MODE OVERWRITE: Sucessfully DELETED TABLE:\n" f"{table_staging}\n" - ) # pylint: disable=C0301 - - tb.create( - path=input_path, - csv_delimiter=csv_delimiter, - if_storage_data_exists=if_storage_data_exists, - biglake_table=biglake_table, - ) - log("Data uploaded to BigQuery") - - except Exception as e: - log(f"An error occurred: {e}", level="error") diff --git a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py b/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py deleted file mode 100644 index 609315c44..000000000 --- a/pipelines/rj_sms/whatsapp/sisreg_scheduled_patients/utils.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -from datetime import datetime -from pathlib import Path -import re -import shutil -from pipelines.utils.utils import log - - -def create_partitions(data_path: str, partition_directory: str): - data_path = Path(data_path) - partition_directory = Path(partition_directory) - files = data_path.glob("*.csv") - - for file_name in files: - date_str = re.search(r"\d{4}-\d{2}-\d{2}", str(file_name)).group() - parsed_date = datetime.strptime(date_str, "%Y-%m-%d") - ano_particao = parsed_date.strftime("%Y") - mes_particao = parsed_date.strftime("%m") - data_particao = parsed_date.strftime("%Y-%m-%d") - - output_directory = ( - partition_directory - / f"ano_particao={int(ano_particao)}" - / f"mes_particao={int(mes_particao)}" - / f"data_particao={data_particao}" - ) - output_directory.mkdir(parents=True, exist_ok=True) - - # Copy file to partition directory - shutil.copy(file_name, output_directory) diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py deleted file mode 100644 index 7aff6f04d..000000000 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/flows.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -""" -WhatsApp flow definition -""" - -from prefect import Flow -from prefect.storage import GCS -from pipelines.constants import constants -from prefect.run_configs import KubernetesRun -from datetime import datetime, timedelta - -from pipelines.rj_sms.whatsapp.sisreg_scheduled_patients.tasks import ( - read_file, - save_file, - upload_to_datalake, -) - -with Flow("SMS: Dump SISREG - Import Unidades Equipe APS") as flow_unidades_equipe_aps: - # Tasks - dataframe = read_file() - save = save_file(dataframe) - save.set_upstream(dataframe) - upload_to_datalake_task = upload_to_datalake( - input_path=f"pipelines/rj_sms/whatsapp/unidades_equipe_aps/data_partition", - dataset_id="whatsapp", - table_id="unidades_equipe_aps", - if_exists="replace", - csv_delimiter=";", - if_storage_data_exists="replace", - biglake_table=True, - ) - upload_to_datalake_task.set_upstream(save) - -flow_unidades_equipe_aps.storage = GCS(constants.GCS_FLOWS_BUCKET.value) -flow_unidades_equipe_aps.run_config = KubernetesRun( - image=constants.DOCKER_IMAGE.value, - labels=[ - constants.RJ_SMS_DEV_AGENT_LABEL.value, - ], -) diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py deleted file mode 100644 index ed4546226..000000000 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/run.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- -from flows import flow_unidades_equipe_aps -from pipelines.utils.utils import run_local - -run_local(flow_unidades_equipe_aps) diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py deleted file mode 100644 index b25dec292..000000000 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/tasks.py +++ /dev/null @@ -1,124 +0,0 @@ -# -*- coding: utf-8 -*- -import csv -import shutil -import time -import json -import requests -import pandas as pd -from prefect import task -from pipelines.utils.utils import log -from datetime import datetime, timedelta -import basedosdados as bd -from pipelines.rj_sms.utils import create_partitions - - -@task -def read_file(): - arquivo_excel = "pipelines/rj_sms/whatsapp/unidades_equipe_aps/data/unidades-equipes-aps-2023-10-27.csv" - dataframe = pd.read_csv(arquivo_excel, sep=";") - return dataframe - - -@task -def save_file(dataframe): - data_futura = datetime.today() + timedelta(days=3) - data_formatada = data_futura.strftime("%Y-%m-%d") - filename = "pipelines/rj_sms/whatsapp/unidades_equipe_aps/data/unidades-equipes-aps-2023-10-27.csv" - dataframe.to_csv( - filename, - sep=";", - quoting=csv.QUOTE_NONNUMERIC, - quotechar='"', - index=False, - encoding="utf-8", - ) - partition_directory = "pipelines/rj_sms/whatsapp/unidades_equipe_aps/data_partition" - shutil.rmtree(partition_directory, ignore_errors=True) - create_partitions( - "pipelines/rj_sms/whatsapp/unidades_equipe_aps/data", partition_directory - ) - return True - - -@task -def upload_to_datalake( - input_path: str, - dataset_id: str, - table_id: str, - if_exists: str = "replace", - csv_delimiter: str = ";", - if_storage_data_exists: str = "replace", - biglake_table: bool = True, - dump_mode: str = "append", -): - """ - Uploads data from a file to a BigQuery table in a specified dataset. - - Args: - input_path (str): The path to the file containing the data to be uploaded. - dataset_id (str): The ID of the dataset where the table is located. - table_id (str): The ID of the table where the data will be uploaded. - if_exists (str, optional): Specifies what to do if the table already exists. - Defaults to "replace". - csv_delimiter (str, optional): The delimiter used in the CSV file. Defaults to ";". - if_storage_data_exists (str, optional): Specifies what to do if the storage data - already exists. Defaults to "replace". - biglake_table (bool, optional): Specifies whether the table is a BigLake table. - Defaults to True. - """ - tb = bd.Table(dataset_id=dataset_id, table_id=table_id) - table_staging = f"{tb.table_full_name['staging']}" - st = bd.Storage(dataset_id=dataset_id, table_id=table_id) - storage_path = f"{st.bucket_name}.staging.{dataset_id}.{table_id}" - storage_path_link = ( - f"https://console.cloud.google.com/storage/browser/{st.bucket_name}" - f"/staging/{dataset_id}/{table_id}" - ) - - try: - table_exists = tb.table_exists(mode="staging") - - if not table_exists: - log(f"CREATING TABLE: {dataset_id}.{table_id}") - tb.create( - path=input_path, - csv_delimiter=csv_delimiter, - if_storage_data_exists=if_storage_data_exists, - biglake_table=biglake_table, - ) - else: - if dump_mode == "append": - log( - f"TABLE ALREADY EXISTS APPENDING DATA TO STORAGE: {dataset_id}.{table_id}" - ) - - tb.append(filepath=input_path, if_exists=if_exists) - elif dump_mode == "overwrite": - log( - "MODE OVERWRITE: Table ALREADY EXISTS, DELETING OLD DATA!\n" - f"{storage_path}\n" - f"{storage_path_link}" - ) # pylint: disable=C0301 - st.delete_table( - mode="staging", bucket_name=st.bucket_name, not_found_ok=True - ) - log( - "MODE OVERWRITE: Sucessfully DELETED OLD DATA from Storage:\n" - f"{storage_path}\n" - f"{storage_path_link}" - ) # pylint: disable=C0301 - tb.delete(mode="all") - log( - "MODE OVERWRITE: Sucessfully DELETED TABLE:\n" f"{table_staging}\n" - ) # pylint: disable=C0301 - - tb.create( - path=input_path, - csv_delimiter=csv_delimiter, - if_storage_data_exists=if_storage_data_exists, - biglake_table=biglake_table, - ) - log("Data uploaded to BigQuery") - - except Exception as e: - log(f"An error occurred: {e}", level="error") diff --git a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py b/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py deleted file mode 100644 index 609315c44..000000000 --- a/pipelines/rj_sms/whatsapp/unidades_equipe_aps/utils.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -from datetime import datetime -from pathlib import Path -import re -import shutil -from pipelines.utils.utils import log - - -def create_partitions(data_path: str, partition_directory: str): - data_path = Path(data_path) - partition_directory = Path(partition_directory) - files = data_path.glob("*.csv") - - for file_name in files: - date_str = re.search(r"\d{4}-\d{2}-\d{2}", str(file_name)).group() - parsed_date = datetime.strptime(date_str, "%Y-%m-%d") - ano_particao = parsed_date.strftime("%Y") - mes_particao = parsed_date.strftime("%m") - data_particao = parsed_date.strftime("%Y-%m-%d") - - output_directory = ( - partition_directory - / f"ano_particao={int(ano_particao)}" - / f"mes_particao={int(mes_particao)}" - / f"data_particao={data_particao}" - ) - output_directory.mkdir(parents=True, exist_ok=True) - - # Copy file to partition directory - shutil.copy(file_name, output_directory) From 6a67e8bd5a010d891afab1b8c88d848ed22c9b61 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:09:21 +0000 Subject: [PATCH 25/32] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pipelines/rj_sms/__init__.py | 2 +- .../dump_api_prontuario_vitacare/flows.py | 16 +++++----- .../dump_api_prontuario_vitacare/schedules.py | 3 +- .../dump_api_prontuario_vitacare/tasks.py | 29 +++++++++---------- .../rj_sms/dump_api_regulacao_sisreg/flows.py | 7 ++--- .../dump_api_regulacao_sisreg/schedules.py | 3 +- .../rj_sms/dump_api_regulacao_sisreg/tasks.py | 7 ++--- 7 files changed, 31 insertions(+), 36 deletions(-) diff --git a/pipelines/rj_sms/__init__.py b/pipelines/rj_sms/__init__.py index e31c92cf6..2c93986c6 100644 --- a/pipelines/rj_sms/__init__.py +++ b/pipelines/rj_sms/__init__.py @@ -7,4 +7,4 @@ from pipelines.rj_sms.dump_ftp_cnes.flows import * from pipelines.rj_sms.dump_api_prontuario_vitai.flows import * from pipelines.rj_sms.dump_api_prontuario_vitacare.flows import * -from pipelines.rj_sms.dump_api_regulacao_sisreg.flows import * \ No newline at end of file +from pipelines.rj_sms.dump_api_regulacao_sisreg.flows import * diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py index b1dcda15a..d4140f04b 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py @@ -10,20 +10,20 @@ from pipelines.rj_sms.utils import upload_to_datalake from pipelines.rj_sms.dump_api_prontuario_vitacare.tasks import ( get_patients, - save_patients + save_patients, ) from pipelines.rj_sms.dump_api_prontuario_vitacare.schedules import ( every_day_at_six_am, - every_day_at_seven_am + every_day_at_seven_am, ) with Flow( - "SMS: Dump VitaCare - Captura dos pacientes agendados" + "SMS: Dump VitaCare - Captura dos pacientes agendados" ) as dump_vitacare_scheduled_patients: # Tasks - result = get_patients('6688152', context = 'scheduled') - save = save_patients(result, context = 'scheduled') + result = get_patients("6688152", context="scheduled") + save = save_patients(result, context="scheduled") save.set_upstream(result) upload_to_datalake_task = upload_to_datalake( input_path=f"pipelines/rj_sms/dump_api_prontuario_vitacare/data_partition", @@ -50,8 +50,8 @@ "SMS: Dump VitaCare - Captura dos pacientes atendidos" ) as dump_vitacare_attended_patients: # Tasks - result = get_patients('6688152', context = 'attended') - save = save_patients(result, context = 'attended') + result = get_patients("6688152", context="attended") + save = save_patients(result, context="attended") save.set_upstream(result) upload_to_datalake_task = upload_to_datalake( input_path=f"pipelines/rj_sms/dump_api_prontuario_vitacare/data_partition", @@ -72,4 +72,4 @@ ], ) -dump_vitacare_attended_patients.schedule = every_day_at_seven_am \ No newline at end of file +dump_vitacare_attended_patients.schedule = every_day_at_seven_am diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py index ff7c7885a..be9125302 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Schedules for the database dump pipeline """ @@ -30,4 +31,4 @@ ], ) ] -) \ No newline at end of file +) diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py index e28a39164..b70ec6293 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py @@ -12,18 +12,14 @@ @task def get_patients(cnes, context): log("Getting data from cloud function") - if context == 'scheduled': - url = ( - "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" - ) + if context == "scheduled": + url = "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" data = datetime.today() + timedelta(days=3) else: - url = ( - "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" - ) + url = "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" data = datetime.today() - timedelta(days=1) - #data_formatada = data.strftime('%Y-%m-%d') - data_formatada = '2023-10-24' + # data_formatada = data.strftime('%Y-%m-%d') + data_formatada = "2023-10-24" df = pd.DataFrame() params = '{"cnes": "' + cnes + '", "date": "' + data_formatada + '"}' response = cloud_function_request.run( @@ -33,25 +29,28 @@ def get_patients(cnes, context): if not df_temp.empty: df = pd.concat([df, df_temp], ignore_index=True) else: - log('Error read data from cnes - ' + cnes, level='error' ) + log("Error read data from cnes - " + cnes, level="error") return df + @task def save_patients(dataframe, context): log("Saving data into the server") - path = 'pipelines/rj_sms/dump_api_prontuario_vitacare/data' + path = "pipelines/rj_sms/dump_api_prontuario_vitacare/data" try: if os.path.exists(path): shutil.rmtree(path, ignore_errors=True) os.mkdir(path) else: os.mkdir(path) - if context == 'scheduled': + if context == "scheduled": data_futura = datetime.today() + timedelta(days=3) else: data_futura = datetime.today() - timedelta(days=1) data_formatada = data_futura.strftime("%Y-%m-%d") - filename = f"pipelines/rj_sms/dump_api_prontuario_vitacare/data/{data_formatada}.csv" + filename = ( + f"pipelines/rj_sms/dump_api_prontuario_vitacare/data/{data_formatada}.csv" + ) dataframe.to_csv( filename, sep=";", @@ -69,5 +68,5 @@ def save_patients(dataframe, context): ) return True except: - log('Error when trying to save files', level='error') - return False \ No newline at end of file + log("Error when trying to save files", level="error") + return False diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py index 0be0db5be..d62c85fa6 100644 --- a/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py @@ -7,17 +7,14 @@ from pipelines.constants import constants from prefect.run_configs import KubernetesRun from pipelines.rj_sms.utils import upload_to_datalake -from pipelines.rj_sms.dump_api_regulacao_sisreg.tasks import ( - get_patients, - save_patients -) +from pipelines.rj_sms.dump_api_regulacao_sisreg.tasks import get_patients, save_patients from pipelines.rj_sms.dump_api_regulacao_sisreg.schedules import every_day_at_six_am with Flow( "SMS: Dump SISREG - Captura dos pacientes agendados" ) as dump_sisreg_scheduled_patients: # Tasks - dataframe = get_patients('6688152') + dataframe = get_patients("6688152") save = save_patients(dataframe) save.set_upstream(dataframe) upload_to_datalake_task = upload_to_datalake( diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/schedules.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/schedules.py index a480446cf..e2d7beaf9 100644 --- a/pipelines/rj_sms/dump_api_regulacao_sisreg/schedules.py +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/schedules.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Schedules for the database dump pipeline """ @@ -18,4 +19,4 @@ ], ) ] -) \ No newline at end of file +) diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py index 247197d62..4652982fa 100644 --- a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py @@ -62,7 +62,7 @@ def get_patients(cnes): @task def save_patients(dataframe): - path='pipelines/rj_sms/dump_api_regulacao_sisreg/data' + path = "pipelines/rj_sms/dump_api_regulacao_sisreg/data" if os.path.exists(path): shutil.rmtree(path, ignore_errors=True) os.mkdir(path) @@ -79,12 +79,9 @@ def save_patients(dataframe): index=False, encoding="utf-8", ) - partition_directory = ( - "pipelines/rj_sms/dump_api_regulacao_sisreg/data_partition" - ) + partition_directory = "pipelines/rj_sms/dump_api_regulacao_sisreg/data_partition" shutil.rmtree(partition_directory, ignore_errors=True) create_partitions.run( "pipelines/rj_sms/dump_api_regulacao_sisreg/data", partition_directory ) return True - From 7235662e2233ae72086eeede84f785c6d0b06005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Wed, 22 Nov 2023 06:18:22 -0800 Subject: [PATCH 26/32] dump db sivep --- pipelines/rj_sms/dump_db_sivep/__init_.py | 0 pipelines/rj_sms/dump_db_sivep/flows.py | 41 +++++++++++++++++++ pipelines/rj_sms/dump_db_sivep/schedules.py | 44 +++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 pipelines/rj_sms/dump_db_sivep/__init_.py create mode 100644 pipelines/rj_sms/dump_db_sivep/flows.py create mode 100644 pipelines/rj_sms/dump_db_sivep/schedules.py diff --git a/pipelines/rj_sms/dump_db_sivep/__init_.py b/pipelines/rj_sms/dump_db_sivep/__init_.py new file mode 100644 index 000000000..e69de29bb diff --git a/pipelines/rj_sms/dump_db_sivep/flows.py b/pipelines/rj_sms/dump_db_sivep/flows.py new file mode 100644 index 000000000..c9478c7ab --- /dev/null +++ b/pipelines/rj_sms/dump_db_sivep/flows.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +""" +Database dumping flows for sms project SIVEP +""" + +from copy import deepcopy + +from prefect.run_configs import KubernetesRun +from prefect.storage import GCS + +from pipelines.constants import constants + +from pipelines.rj_sms.dump_db_sivep.schedules import sms_web_weekly_update_schedule +from pipelines.utils.dump_db.flows import dump_sql_flow +from pipelines.utils.utils import set_default_parameters + +# SMS: SIVEP - Ingerir tabelas de banco SQL + +sms_sivep_flow = deepcopy(dump_sql_flow) +sms_sivep_flow.name = "SMS: SIVEP - Ingerir tabelas de banco SQL" +sms_sivep_flow.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +sms_sivep_flow.run_config = KubernetesRun( + image=constants.DOCKER_IMAGE.value, + labels=[ + constants.RJ_SMS_AGENT_LABEL.value, + ], +) + +sms_default_parameters = { + "db_database": "gtsinan", + "db_host": "10.50.74.94", + "db_port": "3306", + "db_type": "mysql", + "vault_secret_path": "formacao-sivep", + "dataset_id": "sms_covid", +} +sms_sivep_flow = set_default_parameters( + sms_sivep_flow, default_parameters=sms_default_parameters +) + +sms_sivep_flow.schedule = sms_web_weekly_update_schedule diff --git a/pipelines/rj_sms/dump_db_sivep/schedules.py b/pipelines/rj_sms/dump_db_sivep/schedules.py new file mode 100644 index 000000000..5028a69a2 --- /dev/null +++ b/pipelines/rj_sms/dump_db_sivep/schedules.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +""" +Schedules for the database dump pipeline +""" + +from datetime import datetime, timedelta + +import pytz +from prefect.schedules import Schedule +from pipelines.constants import constants +from pipelines.utils.dump_db.utils import generate_dump_db_schedules +from pipelines.utils.utils import untuple_clocks as untuple + +##################################### +# +# EGPWeb Schedules +# +##################################### + +sms_web_queries = { + "srag": { + "dump_mode": "overwrite", + "execute_query": "SELECT * FROM gtsinan.vw_sivep_escritoriodados;", + "materialize_after_dump": True, + "materialization_mode": "prod", + } +} + +sms_web_clocks = generate_dump_db_schedules( + interval=timedelta(days=1), + start_date=datetime(2022, 9, 14, 15, 0, tzinfo=pytz.timezone("America/Sao_Paulo")), + labels=[ + constants.RJ_SMS_AGENT_LABEL.value, + ], + db_database="gtsinan", + db_host="10.50.74.94", + db_port=3306, + db_type="mysql", + dataset_id="sms_covid", + vault_secret_path="formacao-sivep", + table_parameters=sms_web_queries, +) + +sms_web_weekly_update_schedule = Schedule(clocks=untuple(sms_web_clocks)) From e226aa6442b55a5b32b61543cf457a48d9fa9cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 24 Nov 2023 08:57:53 -0800 Subject: [PATCH 27/32] Get credencial from vault --- .../dump_api_prontuario_vitacare/constants.py | 40 +++++++++++++++++ .../dump_api_prontuario_vitacare/flows.py | 4 +- .../dump_api_prontuario_vitacare/run.py | 5 +++ .../dump_api_prontuario_vitacare/tasks.py | 45 ++++++++++++------- .../rj_sms/dump_api_regulacao_sisreg/tasks.py | 10 ++++- pyproject.toml | 2 +- 6 files changed, 85 insertions(+), 21 deletions(-) create mode 100644 pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py create mode 100644 pipelines/rj_sms/dump_api_prontuario_vitacare/run.py diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py new file mode 100644 index 000000000..5ed3720ca --- /dev/null +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# pylint: disable=C0103 +""" +Constants for utils. +""" +from enum import Enum + + +class constants(Enum): + """ + Constant values for the dump vitai flows + """ + URL_PACIENTES_AGENDADOS = "http://saudedigital.pepvitacare.com:8081/health/schedule/nextappointments" + URL_PACIENTES_ATENDIDOS = "http://saudedigital.pepvitacare.com:8081/health/schedule/lastattendances" + CNES = [ + "9057722", "5476607", "7892802", "0199338", "5620287", "7896204", "3567567", "5179726", "9128867", "9101764", + "3567540", "6869009", "6713564", "6808077", "3416321", "7036914", "3820599", "9071385", "6804209", "6023320", + "7892810", "6820018", "6914152", "9111344", "6496989", "7052049", "7119798", "0193089", "9078983", "6677711", + "7108265", "5154197", "6660185", "9131884", "9345515", "6023975", "9715444", "6762042", "6671020", "7985657", + "6742130", "5044685", "0189200", "6793231", "9131795", "2280310", "6028233", "9057706", "7723296", "7722494", + "6664075", "2277298", "6023916", "7996675", "6648371", "6664040", "6618863", "7892829", "6681379", "6559727", + "7894554", "7998678", "6688152", "6618871", "9442251", "2295237", "6932916", "6581994", "6635709", "7873565", + "9127100", "6571956", "6852203", "9075143", "7908237", "6559735", "6572014", "0214949", "7986505", "6974708", + "7995520", "7088574", "6029965", "6761704", "6503772", "5546591", "9307265", "6568491", "6864708", "6716598", + "9061401", "9061398", "9079939", "9080163", "9072640", "7523246", "9016805", "6901042", "9067078", "9045023", + "6387152", "6927289", "6855709", "6927319", "0265233", "7021771", "3785025", "6506232", "6524486", "9023089", + "6029841", "9311661", "3416372", "6683851", "7810172", "6272053", "4030990", "6618855", "6919626", "6873960", + "7036884", "5417708", "3567559", "3785009", "9107835", "6514022", "2295253", "9072659", "7874162", "3784975", + "2270323", "6026737", "6029922", "2269937", "2269848", "5879655", "2273551", "2270277", "2296551", "6033121", + "4178602", "2273225", "2270463", "2273179", "3416356", "6029825", "2269309", "2778696", "2280744", "2269732", + "5358612", "5546583", "2269929", "2270013", "2708167", "2273578", "6632831", "2269295", "2273616", "2708183", + "2269651", "2270072", "2270579", "2269562", "2269546", "2269538", "2269503", "2273586", "2708426", "2270250", + "5315026", "2269759", "2273543", "2269511", "4046307", "2708213", "2269376", "7414226", "2270439", "5457009", + "6784720", "2280795", "3784959", "2296543", "2269902", "2291274", "9391983", "2273640", "2270315", "2270366", + "6922031", "2708434", "2288346", "2280760", "2280272", "2295032", "2708205", "2270633", "2270560", "2269805", + "2270307", "2296535", "2296586", "2280779", "7856954", "6927254", "2280280", "2280787", "5465877", "2277328", + "2270455", "5467136", "2270641", "2288370", "5315050", "3567508", "2270293", "2280736", "7990286", "2280205", + "6926797", "2269953", "5465885", "6664164", "2806320", "2270552", "2269627", "5598435", "3796310", "5670357", + "5476844", "2270420", "2270285" + ] \ No newline at end of file diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py index d4140f04b..701acd94b 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py @@ -22,7 +22,7 @@ "SMS: Dump VitaCare - Captura dos pacientes agendados" ) as dump_vitacare_scheduled_patients: # Tasks - result = get_patients("6688152", context="scheduled") + result = get_patients(context="scheduled") save = save_patients(result, context="scheduled") save.set_upstream(result) upload_to_datalake_task = upload_to_datalake( @@ -50,7 +50,7 @@ "SMS: Dump VitaCare - Captura dos pacientes atendidos" ) as dump_vitacare_attended_patients: # Tasks - result = get_patients("6688152", context="attended") + result = get_patients(context="attended") save = save_patients(result, context="attended") save.set_upstream(result) upload_to_datalake_task = upload_to_datalake( diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/run.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/run.py new file mode 100644 index 000000000..3dc034696 --- /dev/null +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/run.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +from flows import dump_vitacare_attended_patients +from pipelines.utils.utils import run_local + +run_local(dump_vitacare_attended_patients) diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py index b70ec6293..855234a81 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py @@ -5,31 +5,44 @@ import pandas as pd from prefect import task from pipelines.utils.utils import log -from pipelines.rj_sms.utils import create_partitions, cloud_function_request from datetime import datetime, timedelta - +from pipelines.rj_sms.utils import create_partitions, cloud_function_request +from pipelines.rj_sms.dump_api_prontuario_vitacare.constants import ( + constants as vitacare_constants, +) @task -def get_patients(cnes, context): +def get_patients(context): log("Getting data from cloud function") + list_cnes = vitacare_constants.CNES.value if context == "scheduled": - url = "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" + url = vitacare_constants.URL_PACIENTES_AGENDADOS.value data = datetime.today() + timedelta(days=3) else: - url = "http://homologacao-devrj.pepvitacare.com:9003/health/schedule/nextappointments" + url = vitacare_constants.URL_PACIENTES_ATENDIDOS.value data = datetime.today() - timedelta(days=1) - # data_formatada = data.strftime('%Y-%m-%d') - data_formatada = "2023-10-24" + data_formatada = data.strftime('%Y-%m-%d') df = pd.DataFrame() - params = '{"cnes": "' + cnes + '", "date": "' + data_formatada + '"}' - response = cloud_function_request.run( - url=url, request_type="GET", body_params=params, env="staging" - ) - df_temp = pd.read_json(response.text) - if not df_temp.empty: - df = pd.concat([df, df_temp], ignore_index=True) - else: - log("Error read data from cnes - " + cnes, level="error") + list_cnes_error = [] + list_cnes_empty = [] + for cnes in list_cnes: + params = '{"cnes": "' + cnes + '", "date": "' + data_formatada + '"}' + response = cloud_function_request.run( + url=url, request_type="POST", body_params=params, env="prod" + ) + if response.text.startswith('A solicitação não foi bem-sucedida'): + list_cnes_error.append(cnes) + else: + try: + df_temp = pd.read_json(response.text) + except: + log(f"Error cnes - {cnes}, Detail: {response.text}" , level="error") + if not df_temp.empty: + df = pd.concat([df, df_temp], ignore_index=True) + else: + list_cnes_empty.append(cnes) + log(f"List cnes error {list_cnes_error}" , level="error") + log(f"List cnes empty erro {list_cnes_empty}" , level="error") return df diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py index 4652982fa..94e829bb7 100644 --- a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py @@ -7,7 +7,7 @@ import requests import pandas as pd from prefect import task -from pipelines.utils.utils import log +from pipelines.utils.utils import log, get_vault_secret from datetime import datetime, timedelta from pipelines.rj_sms.utils import create_partitions @@ -17,8 +17,14 @@ def get_patients(cnes): # Get Autentication url = "https://rest.smsrio.org/api/usuario/autenticar" + # Retrieve the API key from Vault + try: + credential = get_vault_secret(secret_path="regulacao_sisreg")["data"] + except Exception as e: + log(f"Not able to retrieve Vault secret {e}", level="error") + payload = json.dumps( - {"cpf": "SisregAmb", "senha": "77HtOzVJ6^#d", "cnes": "5462886"} + credential ) headers = { diff --git a/pyproject.toml b/pyproject.toml index 82e9ed73b..d0f29ffe1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ version = "0.1.0" PyMySQL = { extras = ["rsa"], version = "^1.0.2" } Shapely = "^1.8.1" Unidecode = "^1.3.6" -basedosdados = { version = "2.0.0b14", extras = ["upload"] } +basedosdados = {version = "2.0.0b14", extras = ["upload"]} black = "20.8b1" bs4 = "^0.0.1" croniter = "^1.3.5" From f3215203ef8c94807306093b30cecddc87172da5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 24 Nov 2023 16:58:13 +0000 Subject: [PATCH 28/32] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../dump_api_prontuario_vitacare/constants.py | 268 ++++++++++++++++-- .../dump_api_prontuario_vitacare/tasks.py | 15 +- .../rj_sms/dump_api_regulacao_sisreg/tasks.py | 4 +- 3 files changed, 250 insertions(+), 37 deletions(-) diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py index 5ed3720ca..6a99bd085 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py @@ -10,31 +10,245 @@ class constants(Enum): """ Constant values for the dump vitai flows """ - URL_PACIENTES_AGENDADOS = "http://saudedigital.pepvitacare.com:8081/health/schedule/nextappointments" - URL_PACIENTES_ATENDIDOS = "http://saudedigital.pepvitacare.com:8081/health/schedule/lastattendances" + + URL_PACIENTES_AGENDADOS = ( + "http://saudedigital.pepvitacare.com:8081/health/schedule/nextappointments" + ) + URL_PACIENTES_ATENDIDOS = ( + "http://saudedigital.pepvitacare.com:8081/health/schedule/lastattendances" + ) CNES = [ - "9057722", "5476607", "7892802", "0199338", "5620287", "7896204", "3567567", "5179726", "9128867", "9101764", - "3567540", "6869009", "6713564", "6808077", "3416321", "7036914", "3820599", "9071385", "6804209", "6023320", - "7892810", "6820018", "6914152", "9111344", "6496989", "7052049", "7119798", "0193089", "9078983", "6677711", - "7108265", "5154197", "6660185", "9131884", "9345515", "6023975", "9715444", "6762042", "6671020", "7985657", - "6742130", "5044685", "0189200", "6793231", "9131795", "2280310", "6028233", "9057706", "7723296", "7722494", - "6664075", "2277298", "6023916", "7996675", "6648371", "6664040", "6618863", "7892829", "6681379", "6559727", - "7894554", "7998678", "6688152", "6618871", "9442251", "2295237", "6932916", "6581994", "6635709", "7873565", - "9127100", "6571956", "6852203", "9075143", "7908237", "6559735", "6572014", "0214949", "7986505", "6974708", - "7995520", "7088574", "6029965", "6761704", "6503772", "5546591", "9307265", "6568491", "6864708", "6716598", - "9061401", "9061398", "9079939", "9080163", "9072640", "7523246", "9016805", "6901042", "9067078", "9045023", - "6387152", "6927289", "6855709", "6927319", "0265233", "7021771", "3785025", "6506232", "6524486", "9023089", - "6029841", "9311661", "3416372", "6683851", "7810172", "6272053", "4030990", "6618855", "6919626", "6873960", - "7036884", "5417708", "3567559", "3785009", "9107835", "6514022", "2295253", "9072659", "7874162", "3784975", - "2270323", "6026737", "6029922", "2269937", "2269848", "5879655", "2273551", "2270277", "2296551", "6033121", - "4178602", "2273225", "2270463", "2273179", "3416356", "6029825", "2269309", "2778696", "2280744", "2269732", - "5358612", "5546583", "2269929", "2270013", "2708167", "2273578", "6632831", "2269295", "2273616", "2708183", - "2269651", "2270072", "2270579", "2269562", "2269546", "2269538", "2269503", "2273586", "2708426", "2270250", - "5315026", "2269759", "2273543", "2269511", "4046307", "2708213", "2269376", "7414226", "2270439", "5457009", - "6784720", "2280795", "3784959", "2296543", "2269902", "2291274", "9391983", "2273640", "2270315", "2270366", - "6922031", "2708434", "2288346", "2280760", "2280272", "2295032", "2708205", "2270633", "2270560", "2269805", - "2270307", "2296535", "2296586", "2280779", "7856954", "6927254", "2280280", "2280787", "5465877", "2277328", - "2270455", "5467136", "2270641", "2288370", "5315050", "3567508", "2270293", "2280736", "7990286", "2280205", - "6926797", "2269953", "5465885", "6664164", "2806320", "2270552", "2269627", "5598435", "3796310", "5670357", - "5476844", "2270420", "2270285" - ] \ No newline at end of file + "9057722", + "5476607", + "7892802", + "0199338", + "5620287", + "7896204", + "3567567", + "5179726", + "9128867", + "9101764", + "3567540", + "6869009", + "6713564", + "6808077", + "3416321", + "7036914", + "3820599", + "9071385", + "6804209", + "6023320", + "7892810", + "6820018", + "6914152", + "9111344", + "6496989", + "7052049", + "7119798", + "0193089", + "9078983", + "6677711", + "7108265", + "5154197", + "6660185", + "9131884", + "9345515", + "6023975", + "9715444", + "6762042", + "6671020", + "7985657", + "6742130", + "5044685", + "0189200", + "6793231", + "9131795", + "2280310", + "6028233", + "9057706", + "7723296", + "7722494", + "6664075", + "2277298", + "6023916", + "7996675", + "6648371", + "6664040", + "6618863", + "7892829", + "6681379", + "6559727", + "7894554", + "7998678", + "6688152", + "6618871", + "9442251", + "2295237", + "6932916", + "6581994", + "6635709", + "7873565", + "9127100", + "6571956", + "6852203", + "9075143", + "7908237", + "6559735", + "6572014", + "0214949", + "7986505", + "6974708", + "7995520", + "7088574", + "6029965", + "6761704", + "6503772", + "5546591", + "9307265", + "6568491", + "6864708", + "6716598", + "9061401", + "9061398", + "9079939", + "9080163", + "9072640", + "7523246", + "9016805", + "6901042", + "9067078", + "9045023", + "6387152", + "6927289", + "6855709", + "6927319", + "0265233", + "7021771", + "3785025", + "6506232", + "6524486", + "9023089", + "6029841", + "9311661", + "3416372", + "6683851", + "7810172", + "6272053", + "4030990", + "6618855", + "6919626", + "6873960", + "7036884", + "5417708", + "3567559", + "3785009", + "9107835", + "6514022", + "2295253", + "9072659", + "7874162", + "3784975", + "2270323", + "6026737", + "6029922", + "2269937", + "2269848", + "5879655", + "2273551", + "2270277", + "2296551", + "6033121", + "4178602", + "2273225", + "2270463", + "2273179", + "3416356", + "6029825", + "2269309", + "2778696", + "2280744", + "2269732", + "5358612", + "5546583", + "2269929", + "2270013", + "2708167", + "2273578", + "6632831", + "2269295", + "2273616", + "2708183", + "2269651", + "2270072", + "2270579", + "2269562", + "2269546", + "2269538", + "2269503", + "2273586", + "2708426", + "2270250", + "5315026", + "2269759", + "2273543", + "2269511", + "4046307", + "2708213", + "2269376", + "7414226", + "2270439", + "5457009", + "6784720", + "2280795", + "3784959", + "2296543", + "2269902", + "2291274", + "9391983", + "2273640", + "2270315", + "2270366", + "6922031", + "2708434", + "2288346", + "2280760", + "2280272", + "2295032", + "2708205", + "2270633", + "2270560", + "2269805", + "2270307", + "2296535", + "2296586", + "2280779", + "7856954", + "6927254", + "2280280", + "2280787", + "5465877", + "2277328", + "2270455", + "5467136", + "2270641", + "2288370", + "5315050", + "3567508", + "2270293", + "2280736", + "7990286", + "2280205", + "6926797", + "2269953", + "5465885", + "6664164", + "2806320", + "2270552", + "2269627", + "5598435", + "3796310", + "5670357", + "5476844", + "2270420", + "2270285", + ] diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py index 855234a81..00907e7f1 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py @@ -11,6 +11,7 @@ constants as vitacare_constants, ) + @task def get_patients(context): log("Getting data from cloud function") @@ -21,7 +22,7 @@ def get_patients(context): else: url = vitacare_constants.URL_PACIENTES_ATENDIDOS.value data = datetime.today() - timedelta(days=1) - data_formatada = data.strftime('%Y-%m-%d') + data_formatada = data.strftime("%Y-%m-%d") df = pd.DataFrame() list_cnes_error = [] list_cnes_empty = [] @@ -30,19 +31,19 @@ def get_patients(context): response = cloud_function_request.run( url=url, request_type="POST", body_params=params, env="prod" ) - if response.text.startswith('A solicitação não foi bem-sucedida'): + if response.text.startswith("A solicitação não foi bem-sucedida"): list_cnes_error.append(cnes) - else: - try: + else: + try: df_temp = pd.read_json(response.text) except: - log(f"Error cnes - {cnes}, Detail: {response.text}" , level="error") + log(f"Error cnes - {cnes}, Detail: {response.text}", level="error") if not df_temp.empty: df = pd.concat([df, df_temp], ignore_index=True) else: list_cnes_empty.append(cnes) - log(f"List cnes error {list_cnes_error}" , level="error") - log(f"List cnes empty erro {list_cnes_empty}" , level="error") + log(f"List cnes error {list_cnes_error}", level="error") + log(f"List cnes empty erro {list_cnes_empty}", level="error") return df diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py index 94e829bb7..0fec96c6a 100644 --- a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py @@ -23,9 +23,7 @@ def get_patients(cnes): except Exception as e: log(f"Not able to retrieve Vault secret {e}", level="error") - payload = json.dumps( - credential - ) + payload = json.dumps(credential) headers = { "Content-Type": "application/json", From 822940cff7d984f996475ecabe906ffe4fbe0d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Thu, 28 Dec 2023 11:20:40 -0800 Subject: [PATCH 29/32] Update tasks.py --- .../dump_api_prontuario_vitacare/tasks.py | 181 ++++++++++++++++++ 1 file changed, 181 insertions(+) diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py index 00907e7f1..f9f73aef0 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py @@ -10,6 +10,9 @@ from pipelines.rj_sms.dump_api_prontuario_vitacare.constants import ( constants as vitacare_constants, ) +from google.cloud import bigquery +import requests +import json @task @@ -84,3 +87,181 @@ def save_patients(dataframe, context): except: log("Error when trying to save files", level="error") return False + +@task +def read_data(cnes=None, date_param=None, table=None +): + """ + Read data + + Args: + date_param (str, mandatory): The date to query in the format "YYYY-MM-DD". + cnes (str, mandatory): health unit identifier + table (str, mandatory): Name of table on bigQuery + + Returns: + str: Data from BigQuery. + """ + client = bigquery.Client() + + query = f""" + SELECT * + FROM `{table}` + WHERE cnes = '{cnes}' AND date = '{date_param}' + """ + + query_job = client.query(query) + results = query_job.result() + + df = pd.DataFrame(data=[list(row.values()) for row in results], + columns=list(results.schema.field_names)) + + return df + +@task +def remove_opt_out(data=None +): + """ + Read table data "opt-out" and remove from data param + + Args: + data (str, mandatory): List of scheduled patients. + + Returns: + DataFrame: New data after remover opt-out. + """ + client = bigquery.Client() + + query = """ + SELECT DISTINCT cpf + FROM `rj-sms-dev.whatsapp_staging.opt_out` + """ + + # Executando a query e obtendo os CPFs + query_job = client.query(query) + cpf_opt_out = [row['cpf'] for row in query_job.result()] + + + data_filtered = data[~data['cpf'].isin(cpf_opt_out)] + return data_filtered + +@task +def clean_data(data=None +): + """ + Remove empty and invalid numbers/ remove minors + + Args: + data (str, mandatory): List of scheduled patients. + + Returns: + DataFrame: New data after remover opt-out. + """ + # Remover linhas com números de telefone inválidos ou vazios + data = data[data['telefone'].astype(str).str.len() == 11] + + # Converter a coluna 'data_nascimento' para o tipo datetime + data['data_nascimento'] = pd.to_datetime(data['data_nascimento'], errors='coerce') + + # Calcular a idade com base na data de nascimento + data['idade'] = (datetime.now() - data['data_nascimento']).astype('= 18] + + # Remover coluna 'idade' temporária + data = data.drop(columns=['idade']) + +@task +def find_team_number( +): + """ + Use the link to search for the team number it belongs to, passing the address as a parameter + https://subpav.org/SAP/includes/ + + Args: + data (str, mandatory): List of scheduled patients. + + Returns: + DataFrame: New data after remover opt-out. + """ + return None + + +@task +def send_whatsapp(data: None, case: None +): + """ + Send message using whatsapp API Wetalkie + + Args: + data (str, mandatory): List of scheduled patients. + case (str, mandatory): Tipo de caso a ser execudado. Os valores podem ser: + clinica_familia_scheduled_patients + clinica_familia_patients_treated + sisreg_scheduled_patients + + Returns: + DataFrame: New data after remover opt-out. + """ + for patient in data: + if case == 'clinica_familia_scheduled_patients': + payload = json.dumps([ + { + "phone": patient['phone'], + "nome": patient['name'], + "procedimento": patient['procedimento'], + "data": patient['data'], + "horario": patient['horario'], + "unidade": patient['unidade'], + "endereco": patient['endereco'], + "urlcontato": patient['telefone_unidade'] + } + ]) + url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_72h_antes&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=e738eeff-b394-4c29-8def-cef05a44ec40&scheduleTime=30&separator=%2C&checkAttendance=false" + + elif case == 'clinica_familia_patients_treated': + payload = json.dumps([ + { + "phone": patient['phone'], + "nome": patient['name'], + "data": patient['data'], + "unidade": patient['unidade'] + } + ]) + url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_24h_depois&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=b27e0851-0f10-468c-be8b-186f00578058&scheduleTime=60&separator=%2C&checkAttendance=false" + + elif case == 'sisreg_scheduled_patients': + payload = json.dumps([ + { + "phone": patient['phone'], + "nome": patient['name'], + "procedimento": patient['procedimento'], + "especialidade": patient['especialidade'], + "preparo": patient['preparo'], + "data": patient['data'], + "horario": patient['horario'], + "unidade": patient['unidade'], + "endereco": patient['endereco'], + "urlcontato": patient['telefone_unidade'] + } + ]) + url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_5d_antes&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=62af61cc-37b7-4cf9-ae81-ff7297399146&scheduleTime=60&separator=%2C&checkAttendance=false" + + + headers = { + 'accept': 'text/plain', + 'identifier': '@user', + 'accessKey': '@password', + 'Content-Type': 'application/json-patch+json' + } + #print(f'Case: {case} - Payload whatsapp: {payload}') + response = requests.request("POST", url, headers=headers, data=payload) + save_log(response.text) + print('Whatsapp Enviado:' + response.text) + + return 'Mensagens do whatsapp enviadas' + +def save_log( +): + return None \ No newline at end of file From 8d361f353f736066321afc54848fdacf0ecf6230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 29 Dec 2023 10:52:36 -0800 Subject: [PATCH 30/32] Update tasks.py --- pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py index f9f73aef0..66fbdeb3a 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py @@ -32,7 +32,7 @@ def get_patients(context): for cnes in list_cnes: params = '{"cnes": "' + cnes + '", "date": "' + data_formatada + '"}' response = cloud_function_request.run( - url=url, request_type="POST", body_params=params, env="prod" + url=url, request_type="POST", body_params=params, env="staging" ) if response.text.startswith("A solicitação não foi bem-sucedida"): list_cnes_error.append(cnes) From 9fd2b60ce7221e5dc09ece3607adef95d826120e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 29 Dec 2023 12:11:16 -0800 Subject: [PATCH 31/32] Merge com master --- pipelines/rj_sms/__init__.py | 1 - .../dump_api_prontuario_vitacare/constants.py | 242 +++++++++++++++++ .../dump_api_prontuario_vitacare/flows.py | 61 +++++ .../dump_api_prontuario_vitacare/schedules.py | 27 +- .../dump_api_prontuario_vitacare/tasks.py | 256 +++++++++++++++++- .../rj_sms/dump_api_regulacao_sisreg/flows.py | 2 +- .../rj_sms/dump_api_regulacao_sisreg/tasks.py | 2 +- pipelines/rj_sms/tasks.py | 46 ++++ 8 files changed, 631 insertions(+), 6 deletions(-) diff --git a/pipelines/rj_sms/__init__.py b/pipelines/rj_sms/__init__.py index dd9925226..636724622 100644 --- a/pipelines/rj_sms/__init__.py +++ b/pipelines/rj_sms/__init__.py @@ -9,5 +9,4 @@ from pipelines.rj_sms.dump_api_prontuario_vitai.flows import * from pipelines.rj_sms.dump_api_prontuario_vitacare.flows import * from pipelines.rj_sms.dump_sheets.flows import * -from pipelines.rj_sms.dump_api_prontuario_vitacare.flows import * from pipelines.rj_sms.dump_api_regulacao_sisreg.flows import * diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py index 4b2476b0b..465b1f5bd 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py @@ -29,3 +29,245 @@ class constants(Enum): "posicao": "/reports/pharmacy/stocks", "movimento": "/reports/pharmacy/movements", } + URL_PACIENTES_AGENDADOS = ( + "http://saudedigital.pepvitacare.com:8081/health/schedule/nextappointments" + ) + URL_PACIENTES_ATENDIDOS = ( + "http://saudedigital.pepvitacare.com:8081/health/schedule/lastattendances" + ) + CNES = [ + "9057722", + "5476607", + "7892802", + "0199338", + "5620287", + "7896204", + "3567567", + "5179726", + "9128867", + "9101764", + "3567540", + "6869009", + "6713564", + "6808077", + "3416321", + "7036914", + "3820599", + "9071385", + "6804209", + "6023320", + "7892810", + "6820018", + "6914152", + "9111344", + "6496989", + "7052049", + "7119798", + "0193089", + "9078983", + "6677711", + "7108265", + "5154197", + "6660185", + "9131884", + "9345515", + "6023975", + "9715444", + "6762042", + "6671020", + "7985657", + "6742130", + "5044685", + "0189200", + "6793231", + "9131795", + "2280310", + "6028233", + "9057706", + "7723296", + "7722494", + "6664075", + "2277298", + "6023916", + "7996675", + "6648371", + "6664040", + "6618863", + "7892829", + "6681379", + "6559727", + "7894554", + "7998678", + "6688152", + "6618871", + "9442251", + "2295237", + "6932916", + "6581994", + "6635709", + "7873565", + "9127100", + "6571956", + "6852203", + "9075143", + "7908237", + "6559735", + "6572014", + "0214949", + "7986505", + "6974708", + "7995520", + "7088574", + "6029965", + "6761704", + "6503772", + "5546591", + "9307265", + "6568491", + "6864708", + "6716598", + "9061401", + "9061398", + "9079939", + "9080163", + "9072640", + "7523246", + "9016805", + "6901042", + "9067078", + "9045023", + "6387152", + "6927289", + "6855709", + "6927319", + "0265233", + "7021771", + "3785025", + "6506232", + "6524486", + "9023089", + "6029841", + "9311661", + "3416372", + "6683851", + "7810172", + "6272053", + "4030990", + "6618855", + "6919626", + "6873960", + "7036884", + "5417708", + "3567559", + "3785009", + "9107835", + "6514022", + "2295253", + "9072659", + "7874162", + "3784975", + "2270323", + "6026737", + "6029922", + "2269937", + "2269848", + "5879655", + "2273551", + "2270277", + "2296551", + "6033121", + "4178602", + "2273225", + "2270463", + "2273179", + "3416356", + "6029825", + "2269309", + "2778696", + "2280744", + "2269732", + "5358612", + "5546583", + "2269929", + "2270013", + "2708167", + "2273578", + "6632831", + "2269295", + "2273616", + "2708183", + "2269651", + "2270072", + "2270579", + "2269562", + "2269546", + "2269538", + "2269503", + "2273586", + "2708426", + "2270250", + "5315026", + "2269759", + "2273543", + "2269511", + "4046307", + "2708213", + "2269376", + "7414226", + "2270439", + "5457009", + "6784720", + "2280795", + "3784959", + "2296543", + "2269902", + "2291274", + "9391983", + "2273640", + "2270315", + "2270366", + "6922031", + "2708434", + "2288346", + "2280760", + "2280272", + "2295032", + "2708205", + "2270633", + "2270560", + "2269805", + "2270307", + "2296535", + "2296586", + "2280779", + "7856954", + "6927254", + "2280280", + "2280787", + "5465877", + "2277328", + "2270455", + "5467136", + "2270641", + "2288370", + "5315050", + "3567508", + "2270293", + "2280736", + "7990286", + "2280205", + "6926797", + "2269953", + "5465885", + "6664164", + "2806320", + "2270552", + "2269627", + "5598435", + "3796310", + "5670357", + "5476844", + "2270420", + "2270285", + ] + diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py index 78ec60291..b870e32bb 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/flows.py @@ -19,16 +19,21 @@ create_partitions, upload_to_datalake, ) + from pipelines.rj_sms.dump_api_prontuario_vitacare.tasks import ( rename_flow, build_url, build_params, create_filename, save_data_to_file, + get_patients, + save_patients, ) from pipelines.rj_sms.dump_api_prontuario_vitacare.schedules import ( vitacare_daily_update_schedule, + vitacare_every_day_at_six_am, + vitacare_every_day_at_seven_am, ) @@ -136,3 +141,59 @@ ) dump_vitacare.schedule = vitacare_daily_update_schedule + +with Flow( + "SMS: Dump VitaCare - Captura dos pacientes agendados" +) as dump_vitacare_scheduled_patients: + # Tasks + result = get_patients(context="scheduled") + save = save_patients(result, context="scheduled") + save.set_upstream(result) + upload_to_datalake_task = upload_to_datalake( + input_path=f"pipelines/rj_sms/dump_api_prontuario_vitacare/data_partition", + dataset_id="brutos_prontuario_vitacare", + table_id="pacientes_agendados_3_dias", + if_exists="replace", + csv_delimiter=";", + if_storage_data_exists="replace", + biglake_table=True, + ) + upload_to_datalake_task.set_upstream(save) + +dump_vitacare_scheduled_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +dump_vitacare_scheduled_patients.run_config = KubernetesRun( + image=constants.DOCKER_IMAGE.value, + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], +) + +dump_vitacare_scheduled_patients.schedule = vitacare_every_day_at_six_am + +with Flow( + "SMS: Dump VitaCare - Captura dos pacientes atendidos" +) as dump_vitacare_attended_patients: + # Tasks + result = get_patients(context="attended") + save = save_patients(result, context="attended") + save.set_upstream(result) + upload_to_datalake_task = upload_to_datalake( + input_path=f"pipelines/rj_sms/dump_api_prontuario_vitacare/data_partition", + dataset_id="brutos_prontuario_vitacare", + table_id="paciente_atendido_dia_anterior", + if_exists="replace", + csv_delimiter=";", + if_storage_data_exists="replace", + biglake_table=True, + ) + upload_to_datalake_task.set_upstream(save) + +dump_vitacare_attended_patients.storage = GCS(constants.GCS_FLOWS_BUCKET.value) +dump_vitacare_attended_patients.run_config = KubernetesRun( + image=constants.DOCKER_IMAGE.value, + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], +) + +dump_vitacare_attended_patients.schedule = vitacare_every_day_at_seven_am diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py index 9f194f609..ea52da33c 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py @@ -5,9 +5,10 @@ """ from datetime import timedelta, datetime - +from prefect.schedules.clocks import IntervalClock from prefect.schedules import Schedule import pytz +import pendulum from pipelines.constants import constants @@ -56,3 +57,27 @@ ) vitacare_daily_update_schedule = Schedule(clocks=untuple(vitacare_clocks)) + +vitacare_every_day_at_six_am = Schedule( + clocks=[ + IntervalClock( + interval=timedelta(days=1), + start_date=pendulum.datetime(2023, 1, 1, 6, 0, 0, tz="America/Sao_Paulo"), + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], + ) + ] +) + +vitacare_every_day_at_seven_am = Schedule( + clocks=[ + IntervalClock( + interval=timedelta(days=1), + start_date=pendulum.datetime(2023, 1, 1, 7, 0, 0, tz="America/Sao_Paulo"), + labels=[ + constants.RJ_SMS_DEV_AGENT_LABEL.value, + ], + ) + ] +) \ No newline at end of file diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py index 134ccceee..226c2e265 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py @@ -11,7 +11,12 @@ from prefect import task import pandas as pd - +import os +import csv +import shutil +from google.cloud import bigquery +import requests +import json from pipelines.rj_sms.dump_api_prontuario_vitacare.constants import ( constants as vitacare_constants, ) @@ -19,7 +24,13 @@ from pipelines.utils.tasks import ( rename_current_flow_run_dataset_table, ) -from pipelines.rj_sms.tasks import from_json_to_csv, add_load_date_column, save_to_file +from pipelines.rj_sms.tasks import ( + from_json_to_csv, + add_load_date_column, + save_to_file, + create_partitions, + cloud_function_request_patients +) @task @@ -154,3 +165,244 @@ def save_data_to_file( fix_payload_column_order.run(filepath=csv_file_path, table_id=table_id) return True + +@task +def get_patients(context): + log("Getting data from cloud function") + list_cnes = vitacare_constants.CNES.value + if context == "scheduled": + url = vitacare_constants.URL_PACIENTES_AGENDADOS.value + data = datetime.today() + timedelta(days=3) + else: + url = vitacare_constants.URL_PACIENTES_ATENDIDOS.value + data = datetime.today() - timedelta(days=1) + data_formatada = data.strftime("%Y-%m-%d") + df = pd.DataFrame() + list_cnes_error = [] + list_cnes_empty = [] + for cnes in list_cnes: + params = '{"cnes": "' + cnes + '", "date": "' + data_formatada + '"}' + response = cloud_function_request_patients.run( + url=url, request_type="POST", body_params=params, env="staging" + ) + if response.text.startswith("A solicitação não foi bem-sucedida"): + list_cnes_error.append(cnes) + else: + try: + df_temp = pd.read_json(response.text) + except: + log(f"Error cnes - {cnes}, Detail: {response.text}", level="error") + if not df_temp.empty: + df = pd.concat([df, df_temp], ignore_index=True) + else: + list_cnes_empty.append(cnes) + log(f"List cnes error {list_cnes_error}", level="error") + log(f"List cnes empty erro {list_cnes_empty}", level="error") + return df + + +@task +def save_patients(dataframe, context): + log("Saving data into the server") + path = "pipelines/rj_sms/dump_api_prontuario_vitacare/data" + try: + if os.path.exists(path): + shutil.rmtree(path, ignore_errors=True) + os.mkdir(path) + else: + os.mkdir(path) + if context == "scheduled": + data_futura = datetime.today() + timedelta(days=3) + else: + data_futura = datetime.today() - timedelta(days=1) + data_formatada = data_futura.strftime("%Y-%m-%d") + filename = ( + f"pipelines/rj_sms/dump_api_prontuario_vitacare/data/{data_formatada}.csv" + ) + dataframe.to_csv( + filename, + sep=";", + quoting=csv.QUOTE_NONNUMERIC, + quotechar='"', + index=False, + encoding="utf-8", + ) + partition_directory = ( + "pipelines/rj_sms/dump_api_prontuario_vitacare/data_partition" + ) + shutil.rmtree(partition_directory, ignore_errors=True) + create_partitions.run( + "pipelines/rj_sms/dump_api_prontuario_vitacare/data", partition_directory + ) + return True + except: + log("Error when trying to save files", level="error") + return False + +@task +def read_data(cnes=None, date_param=None, table=None +): + """ + Read data + Args: + date_param (str, mandatory): The date to query in the format "YYYY-MM-DD". + cnes (str, mandatory): health unit identifier + table (str, mandatory): Name of table on bigQuery + Returns: + str: Data from BigQuery. + """ + client = bigquery.Client() + + query = f""" + SELECT * + FROM `{table}` + WHERE cnes = '{cnes}' AND date = '{date_param}' + """ + + query_job = client.query(query) + results = query_job.result() + + df = pd.DataFrame(data=[list(row.values()) for row in results], + columns=list(results.schema.field_names)) + + return df + +@task +def remove_opt_out(data=None +): + """ + Read table data "opt-out" and remove from data param + Args: + data (str, mandatory): List of scheduled patients. + Returns: + DataFrame: New data after remover opt-out. + """ + client = bigquery.Client() + + query = """ + SELECT DISTINCT cpf + FROM `rj-sms-dev.whatsapp_staging.opt_out` + """ + + # Executando a query e obtendo os CPFs + query_job = client.query(query) + cpf_opt_out = [row['cpf'] for row in query_job.result()] + + + data_filtered = data[~data['cpf'].isin(cpf_opt_out)] + return data_filtered + +@task +def clean_data(data=None +): + """ + Remove empty and invalid numbers/ remove minors + Args: + data (str, mandatory): List of scheduled patients. + Returns: + DataFrame: New data after remover opt-out. + """ + # Remover linhas com números de telefone inválidos ou vazios + data = data[data['telefone'].astype(str).str.len() == 11] + + # Converter a coluna 'data_nascimento' para o tipo datetime + data['data_nascimento'] = pd.to_datetime(data['data_nascimento'], errors='coerce') + + # Calcular a idade com base na data de nascimento + data['idade'] = (datetime.now() - data['data_nascimento']).astype('= 18] + + # Remover coluna 'idade' temporária + data = data.drop(columns=['idade']) + +@task +def find_team_number( +): + """ + Use the link to search for the team number it belongs to, passing the address as a parameter + https://subpav.org/SAP/includes/ + Args: + data (str, mandatory): List of scheduled patients. + Returns: + DataFrame: New data after remover opt-out. + """ + return None + + +@task +def send_whatsapp(data: None, case: None +): + """ + Send message using whatsapp API Wetalkie + Args: + data (str, mandatory): List of scheduled patients. + case (str, mandatory): Tipo de caso a ser execudado. Os valores podem ser: + clinica_familia_scheduled_patients + clinica_familia_patients_treated + sisreg_scheduled_patients + Returns: + DataFrame: New data after remover opt-out. + """ + for patient in data: + if case == 'clinica_familia_scheduled_patients': + payload = json.dumps([ + { + "phone": patient['phone'], + "nome": patient['name'], + "procedimento": patient['procedimento'], + "data": patient['data'], + "horario": patient['horario'], + "unidade": patient['unidade'], + "endereco": patient['endereco'], + "urlcontato": patient['telefone_unidade'] + } + ]) + url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_72h_antes&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=e738eeff-b394-4c29-8def-cef05a44ec40&scheduleTime=30&separator=%2C&checkAttendance=false" + + elif case == 'clinica_familia_patients_treated': + payload = json.dumps([ + { + "phone": patient['phone'], + "nome": patient['name'], + "data": patient['data'], + "unidade": patient['unidade'] + } + ]) + url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_24h_depois&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=b27e0851-0f10-468c-be8b-186f00578058&scheduleTime=60&separator=%2C&checkAttendance=false" + + elif case == 'sisreg_scheduled_patients': + payload = json.dumps([ + { + "phone": patient['phone'], + "nome": patient['name'], + "procedimento": patient['procedimento'], + "especialidade": patient['especialidade'], + "preparo": patient['preparo'], + "data": patient['data'], + "horario": patient['horario'], + "unidade": patient['unidade'], + "endereco": patient['endereco'], + "urlcontato": patient['telefone_unidade'] + } + ]) + url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_5d_antes&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=62af61cc-37b7-4cf9-ae81-ff7297399146&scheduleTime=60&separator=%2C&checkAttendance=false" + + + headers = { + 'accept': 'text/plain', + 'identifier': '@user', + 'accessKey': '@password', + 'Content-Type': 'application/json-patch+json' + } + #print(f'Case: {case} - Payload whatsapp: {payload}') + response = requests.request("POST", url, headers=headers, data=payload) + save_log(response.text) + print('Whatsapp Enviado:' + response.text) + + return 'Mensagens do whatsapp enviadas' + +def save_log( +): + return None \ No newline at end of file diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py index d62c85fa6..d13002b02 100644 --- a/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/flows.py @@ -6,7 +6,7 @@ from prefect.storage import GCS from pipelines.constants import constants from prefect.run_configs import KubernetesRun -from pipelines.rj_sms.utils import upload_to_datalake +from pipelines.rj_sms.tasks import upload_to_datalake from pipelines.rj_sms.dump_api_regulacao_sisreg.tasks import get_patients, save_patients from pipelines.rj_sms.dump_api_regulacao_sisreg.schedules import every_day_at_six_am diff --git a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py index 0fec96c6a..12dbbb05a 100644 --- a/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py +++ b/pipelines/rj_sms/dump_api_regulacao_sisreg/tasks.py @@ -9,7 +9,7 @@ from prefect import task from pipelines.utils.utils import log, get_vault_secret from datetime import datetime, timedelta -from pipelines.rj_sms.utils import create_partitions +from pipelines.rj_sms.tasks import create_partitions @task diff --git a/pipelines/rj_sms/tasks.py b/pipelines/rj_sms/tasks.py index 82d16b98f..d86248123 100644 --- a/pipelines/rj_sms/tasks.py +++ b/pipelines/rj_sms/tasks.py @@ -700,3 +700,49 @@ def upload_to_datalake( except Exception as e: log(f"An error occurred: {e}", level="error") + +@task +def cloud_function_request_patients( + url: str, + request_type: str = "GET", + body_params: list = None, + query_params: list = None, + env: str = "staging", +): + """ + Returns data from a URL sent as a parameter. + + Parâmetros: + - url (str): URL do endpoint. + - request_type (str): Request type [GET or POST] (default GET). + - body_params (list): list of parameters to send by body parameters. + - query_params (list): list of parameters to send by query parameters. + - env (str): Cloud function account [prod or staging] + Return: + - response: Request response HTTP. + """ + # Retrieve the API key from Vault + try: + credential = get_vault_secret(secret_path="prontuario_vitacare")["data"] + except Exception as e: + log(f"Not able to retrieve Vault secret {e}", level="error") + + if env == "prod": + function = "https://us-central1-rj-sms.cloudfunctions.net/vitacare" + else: + function = "https://us-central1-rj-sms-dev.cloudfunctions.net/vitacare" + + request = google.auth.transport.requests.Request() + audience = function + TOKEN = google.oauth2.id_token.fetch_id_token(request, audience) + payload = json.dumps( + { + "url": url, + "request_type": request_type, + "body_params": body_params, + "query_params": query_params, + "credential": credential, + } + ) + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {TOKEN}"} + return requests.request("POST", function, headers=headers, data=payload) \ No newline at end of file From 8b407595cbc3c21442e14c74fb56ab369d0e3ee6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 20:11:36 +0000 Subject: [PATCH 32/32] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../dump_api_prontuario_vitacare/constants.py | 1 - .../dump_api_prontuario_vitacare/schedules.py | 2 +- .../dump_api_prontuario_vitacare/tasks.py | 156 +++++++++--------- pipelines/rj_sms/tasks.py | 3 +- 4 files changed, 84 insertions(+), 78 deletions(-) diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py index 465b1f5bd..1188702ba 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/constants.py @@ -270,4 +270,3 @@ class constants(Enum): "2270420", "2270285", ] - diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py index ea52da33c..7d1e4a46e 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/schedules.py @@ -80,4 +80,4 @@ ], ) ] -) \ No newline at end of file +) diff --git a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py index 226c2e265..1066da0b8 100644 --- a/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py +++ b/pipelines/rj_sms/dump_api_prontuario_vitacare/tasks.py @@ -25,11 +25,11 @@ rename_current_flow_run_dataset_table, ) from pipelines.rj_sms.tasks import ( - from_json_to_csv, - add_load_date_column, - save_to_file, - create_partitions, - cloud_function_request_patients + from_json_to_csv, + add_load_date_column, + save_to_file, + create_partitions, + cloud_function_request_patients, ) @@ -166,6 +166,7 @@ def save_data_to_file( return True + @task def get_patients(context): log("Getting data from cloud function") @@ -239,11 +240,11 @@ def save_patients(dataframe, context): log("Error when trying to save files", level="error") return False + @task -def read_data(cnes=None, date_param=None, table=None -): +def read_data(cnes=None, date_param=None, table=None): """ - Read data + Read data Args: date_param (str, mandatory): The date to query in the format "YYYY-MM-DD". cnes (str, mandatory): health unit identifier @@ -262,14 +263,16 @@ def read_data(cnes=None, date_param=None, table=None query_job = client.query(query) results = query_job.result() - df = pd.DataFrame(data=[list(row.values()) for row in results], - columns=list(results.schema.field_names)) + df = pd.DataFrame( + data=[list(row.values()) for row in results], + columns=list(results.schema.field_names), + ) return df + @task -def remove_opt_out(data=None -): +def remove_opt_out(data=None): """ Read table data "opt-out" and remove from data param Args: @@ -286,15 +289,14 @@ def remove_opt_out(data=None # Executando a query e obtendo os CPFs query_job = client.query(query) - cpf_opt_out = [row['cpf'] for row in query_job.result()] + cpf_opt_out = [row["cpf"] for row in query_job.result()] - - data_filtered = data[~data['cpf'].isin(cpf_opt_out)] + data_filtered = data[~data["cpf"].isin(cpf_opt_out)] return data_filtered + @task -def clean_data(data=None -): +def clean_data(data=None): """ Remove empty and invalid numbers/ remove minors Args: @@ -303,23 +305,23 @@ def clean_data(data=None DataFrame: New data after remover opt-out. """ # Remover linhas com números de telefone inválidos ou vazios - data = data[data['telefone'].astype(str).str.len() == 11] + data = data[data["telefone"].astype(str).str.len() == 11] # Converter a coluna 'data_nascimento' para o tipo datetime - data['data_nascimento'] = pd.to_datetime(data['data_nascimento'], errors='coerce') + data["data_nascimento"] = pd.to_datetime(data["data_nascimento"], errors="coerce") # Calcular a idade com base na data de nascimento - data['idade'] = (datetime.now() - data['data_nascimento']).astype('= 18] + data = data[data["idade"] >= 18] # Remover coluna 'idade' temporária - data = data.drop(columns=['idade']) + data = data.drop(columns=["idade"]) + @task -def find_team_number( -): +def find_team_number(): """ Use the link to search for the team number it belongs to, passing the address as a parameter https://subpav.org/SAP/includes/ @@ -332,8 +334,7 @@ def find_team_number( @task -def send_whatsapp(data: None, case: None -): +def send_whatsapp(data: None, case: None): """ Send message using whatsapp API Wetalkie Args: @@ -346,63 +347,68 @@ def send_whatsapp(data: None, case: None DataFrame: New data after remover opt-out. """ for patient in data: - if case == 'clinica_familia_scheduled_patients': - payload = json.dumps([ - { - "phone": patient['phone'], - "nome": patient['name'], - "procedimento": patient['procedimento'], - "data": patient['data'], - "horario": patient['horario'], - "unidade": patient['unidade'], - "endereco": patient['endereco'], - "urlcontato": patient['telefone_unidade'] - } - ]) + if case == "clinica_familia_scheduled_patients": + payload = json.dumps( + [ + { + "phone": patient["phone"], + "nome": patient["name"], + "procedimento": patient["procedimento"], + "data": patient["data"], + "horario": patient["horario"], + "unidade": patient["unidade"], + "endereco": patient["endereco"], + "urlcontato": patient["telefone_unidade"], + } + ] + ) url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_72h_antes&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=e738eeff-b394-4c29-8def-cef05a44ec40&scheduleTime=30&separator=%2C&checkAttendance=false" - elif case == 'clinica_familia_patients_treated': - payload = json.dumps([ - { - "phone": patient['phone'], - "nome": patient['name'], - "data": patient['data'], - "unidade": patient['unidade'] - } - ]) + elif case == "clinica_familia_patients_treated": + payload = json.dumps( + [ + { + "phone": patient["phone"], + "nome": patient["name"], + "data": patient["data"], + "unidade": patient["unidade"], + } + ] + ) url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_24h_depois&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=b27e0851-0f10-468c-be8b-186f00578058&scheduleTime=60&separator=%2C&checkAttendance=false" - elif case == 'sisreg_scheduled_patients': - payload = json.dumps([ - { - "phone": patient['phone'], - "nome": patient['name'], - "procedimento": patient['procedimento'], - "especialidade": patient['especialidade'], - "preparo": patient['preparo'], - "data": patient['data'], - "horario": patient['horario'], - "unidade": patient['unidade'], - "endereco": patient['endereco'], - "urlcontato": patient['telefone_unidade'] - } - ]) + elif case == "sisreg_scheduled_patients": + payload = json.dumps( + [ + { + "phone": patient["phone"], + "nome": patient["name"], + "procedimento": patient["procedimento"], + "especialidade": patient["especialidade"], + "preparo": patient["preparo"], + "data": patient["data"], + "horario": patient["horario"], + "unidade": patient["unidade"], + "endereco": patient["endereco"], + "urlcontato": patient["telefone_unidade"], + } + ] + ) url = "https://takebroadcast.cs.blip.ai/api/v2/Broadcast/list?phoneColumn=phone&namespace=whatsapp%3Ahsm%3Amessaging%3Ablip&template=poc_sms_wa_5d_antes&flowId=4b96ec20-f0d1-48f9-8138-cd7d133e39ee&stateId=62af61cc-37b7-4cf9-ae81-ff7297399146&scheduleTime=60&separator=%2C&checkAttendance=false" - headers = { - 'accept': 'text/plain', - 'identifier': '@user', - 'accessKey': '@password', - 'Content-Type': 'application/json-patch+json' - } - #print(f'Case: {case} - Payload whatsapp: {payload}') + "accept": "text/plain", + "identifier": "@user", + "accessKey": "@password", + "Content-Type": "application/json-patch+json", + } + # print(f'Case: {case} - Payload whatsapp: {payload}') response = requests.request("POST", url, headers=headers, data=payload) save_log(response.text) - print('Whatsapp Enviado:' + response.text) + print("Whatsapp Enviado:" + response.text) - return 'Mensagens do whatsapp enviadas' + return "Mensagens do whatsapp enviadas" -def save_log( -): - return None \ No newline at end of file + +def save_log(): + return None diff --git a/pipelines/rj_sms/tasks.py b/pipelines/rj_sms/tasks.py index d86248123..4abe6e281 100644 --- a/pipelines/rj_sms/tasks.py +++ b/pipelines/rj_sms/tasks.py @@ -701,6 +701,7 @@ def upload_to_datalake( except Exception as e: log(f"An error occurred: {e}", level="error") + @task def cloud_function_request_patients( url: str, @@ -745,4 +746,4 @@ def cloud_function_request_patients( } ) headers = {"Content-Type": "application/json", "Authorization": f"Bearer {TOKEN}"} - return requests.request("POST", function, headers=headers, data=payload) \ No newline at end of file + return requests.request("POST", function, headers=headers, data=payload)