{"id":19892995,"url":"https://github.com/kevinfjiang/funcnotify","last_synced_at":"2025-10-06T10:31:17.856Z","repository":{"id":45701364,"uuid":"394874406","full_name":"kevinfjiang/FuncNotify","owner":"kevinfjiang","description":"Automatically notifies you of start and completion using environment variables","archived":false,"fork":false,"pushed_at":"2023-08-04T12:55:18.000Z","size":183,"stargazers_count":12,"open_issues_count":8,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T23:32:55.572Z","etag":null,"topics":["beginner-friendly","decorator","environment-variables","neural-network","nn","notify","python","python3","slack","teams","twilio","wechat"],"latest_commit_sha":null,"homepage":"https://kevinfjiang.github.io/FuncNotify/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinfjiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-08-11T05:35:21.000Z","updated_at":"2025-01-14T01:20:50.000Z","dependencies_parsed_at":"2023-10-17T05:01:22.113Z","dependency_job_id":"bc85b7c4-0282-45b1-9a7a-f15b4e73aa79","html_url":"https://github.com/kevinfjiang/FuncNotify","commit_stats":{"total_commits":182,"total_committers":5,"mean_commits":36.4,"dds":"0.027472527472527486","last_synced_commit":"4a8ecd810452be89eab4c975c397c6ba19d18528"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinfjiang%2FFuncNotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinfjiang%2FFuncNotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinfjiang%2FFuncNotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinfjiang%2FFuncNotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinfjiang","download_url":"https://codeload.github.com/kevinfjiang/FuncNotify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235519935,"owners_count":19003201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beginner-friendly","decorator","environment-variables","neural-network","nn","notify","python","python3","slack","teams","twilio","wechat"],"created_at":"2024-11-12T18:26:42.855Z","updated_at":"2025-10-06T10:31:12.573Z","avatar_url":"https://github.com/kevinfjiang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **FuncNotify ⏰**\n\u003e **Get notified when your code finishes/crashes with one line of code**\n\n![Build](https://img.shields.io/github/workflow/status/kevinfjiang/FuncNotify/CI?label=CI) ![Deploy](https://img.shields.io/github/workflow/status/kevinfjiang/FuncNotify/CD?label=CD) [![DOC](https://github.com/kevinfjiang/FuncNotify/actions/workflows/docs.yml/badge.svg)](https://kevinfjiang.github.io/FuncNotify/) ![LCommit](https://img.shields.io/github/last-commit/kevinfjiang/FuncNotify) ![release](https://img.shields.io/github/v/release/kevinfjiang/FuncNotify?include_prereleases) ![License](https://img.shields.io/github/license/kevinfjiang/FuncNotify.svg)\n![Donwload](https://img.shields.io/pypi/dm/FuncNotify)\n![wheel](https://img.shields.io/pypi/wheel/FuncNotify)\n\n\n\n**[Documentation](https://kevinfjiang.github.io/FuncNotify/#header-submodules) | [GitHub](https://github.com/kevinfjiang/FuncNotify) | [PyPI](https://pypi.org/project/FuncNotify/)**\n\n### **Installation:**\n```$ pip install FuncNotify```\n\n### **Guide:**\n```python\n\"\"\"Add more as projects grow!\"\"\"\nfrom FuncNotify import time_func, time_text, time_slack\n\n\n@time_func(NotifyMethod=\"Text\", use_env=True, env_path\".env\", update_env=True, phone=\"8001234567\")\ndef wait_func():\n    \"\"\"This function will use the text method and pull env varaibles from\n    `.env`, it will update the already determined env variables too!\"\"\"\n    do_something()\n\n\n@time_Text()\ndef wait_func2():\n    \"\"\"All parameters are optional and each method has a personal decorator, even the\n    function call is optional see below\"\"\"\n    do_something()\n\n@time_Text\ndef wait_func3():\n    \"\"\"Auto pull from `.env` is enabled by default with Method specific time decorators\"\"\"\n    do_something()\n\n@time_func(multi_target=[{...}, {...}], multi_env=[\"1.env\", \"2.env\"])\ndef wait_func4():\n    \"\"\"Send to multiple sources either through specifying multiple dictionaries of kwargs\n    or multiple .env paths, or both in pairs!\"\"\"\n    do_something()\n\ncustom_message(\"HELLO WORLD\", NotifyMethod=\"Text\", multi_target=[{...}, {...}], multi_env=[\"1.env\", \"2.env\"])\n\"\"\"Custom messaging is here, pass the same arguments in as time_func and you\ncan mass send messages in many methods\"\"\"\n\nif __name__ == \"__main__\":\n    \"\"\"You don't even need to use the timer as a decorator, use it as a normal function\n    This is how we do testing 😊 \"\"\"\n    time_func(function=wait_func5)(*func5_args, **func5_kwargs)\n```\n#### **CLI arguments:**\n```\n$ FuncNotify [command here] --kwargs NotifyMethod=Text phone=8001234567\n```\n\n```\n$ FuncNotify go run main.go --kwargs NotifyMethod=Email multi_env=1.env multi_env=2.env\n```\n\n```\n$ FuncNotify sleep 5 --kwargs NotifyMethod=Text multi_target=\"[{'NotifyMethod': 'Print', 'verbose': True}, {'phone': '8001234567'}]\"\n```\n\nAnything after `--kwargs` with an equal sign will automatically be parsesd as a key word argument for FuncNotify. The remainder without `=` will be executed. Wrap lists, dicts, and tuples in `\"` so they get read properly. This allows you to time any script.\n\n### **Demo:**\n```\n$ pip install FuncNotify\n```\n\n```\n$ FuncNotify sleep 5 --kwargs NotifyMethod=Print\n```\n\nTo expand, create a `.env` file and a twilio account according to these [instructions](https://www.twilio.com/docs/sms/quickstart/python) (it's free!). Instead of hard coding variables or exporting them to your env, just put them in the twilio alerts section of your `.env`, skip installing twilio as it's already installed. Then try:\n\n```$ FuncNotify sleep 5 --kwargs NotifyMethod=Text```\n\n### **[Contributing:](.github/Contributing.md)**\nClick above for instructions on how to contribute\n\n### Supported Methods:\n|               Platform                |\n| :-----: |\n| Console Print|\n|[Email Twilio](https://docs.sendgrid.com/for-developers/sending-email/v3-python-code-example)|\n|[Email Yagmail](https://github.com/kootenpv/yagmai)|\n|[Text](https://www.twilio.com/docs/sms/send-messages)|\n|[Slack](https://api.slack.com/messaging/sending)|\n|[Microsoft Teams](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook)|\n\n\n### Create following .env in CWD\n\u003cdetails\u003e\n\u003csummary\u003e\u003c/summary\u003e\n\u003ca href=\"https://raw.githubusercontent.com/kevinfjiang/FuncNotify/master/template.env\"\u003e\u0026emsp; .env\u003c/a\u003e\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinfjiang%2Ffuncnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinfjiang%2Ffuncnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinfjiang%2Ffuncnotify/lists"}