afl-ai-utils
rm -rf build dist
python3 setup.py sdist bdist_wheel
twine upload --repository pypi dist/*
Usage
Slack Alerting
"""Send a Slack message to a channel via a webhook.
Args:
info_alert_slack_webhook_url(str): Infor slack channel url
red_alert_slack_webhook_url(str): red alert channel url
slack_red_alert_userids (list): userid's to mention in slack for red alert notification
payload (dict): Dictionary containing Slack message, i.e. {"text": "This is a test"}
is_red_alert (bool): Full Slack webhook URL for your chosen channel.
Returns:
HTTP response code, i.e. <Response [503]>
"""
BigQuery Dataframe to BigQuery
"""Send a Slack message to a channel via a webhook.
Args:
dataframe(pandas dataframe): for dataframe to be dumped to bigquery
schema(BigQuery.Schema ): ex:
schema = [
bigquery.SchemaField("date_range_start", bigquery.enums.SqlTypeNames.DATE),
bigquery.SchemaField("date_range_end", bigquery.enums.SqlTypeNames.DATE)
]
table_id (list): table_id in which dataframe need to be inserted e.g project_id.dataset.table_name = table_id
mode(str): To append or replace the table - e.g mode = "append" or mode="replace"
Returns:
returns as success message with number of inserted rows and table name
"""
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
afl-ai-utils-0.0.5.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file afl-ai-utils-0.0.5.tar.gz.
File metadata
- Download URL: afl-ai-utils-0.0.5.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4c8111df146f46af06077ecdb95692edb129bb164541942e84d5e4333571c10
|
|
| MD5 |
b593da31d02d210ce17303d4bd548e63
|
|
| BLAKE2b-256 |
3733aa4adc5f4264bbabac811695ba2fff893fe8c7127cd9a9066889a28eca79
|
File details
Details for the file afl_ai_utils-0.0.5-py3-none-any.whl.
File metadata
- Download URL: afl_ai_utils-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
012751c3a6c545885d7a40bf566c1c79bc85a4fe20118b3d2fb3449137fb89bd
|
|
| MD5 |
370c18c0ff1a693aff5d3369f19beec8
|
|
| BLAKE2b-256 |
194564063a7e2f232b32515fa9337b10eea8be14d311364d6e56853aa42867fb
|