{"id":18413175,"url":"https://github.com/pybites/bday-app","last_synced_at":"2025-04-07T11:32:21.460Z","repository":{"id":20763872,"uuid":"90842943","full_name":"pybites/bday-app","owner":"pybites","description":"Never Forget A Friend’s Birthday with Python, Flask and Twilio","archived":false,"fork":false,"pushed_at":"2022-12-07T23:57:45.000Z","size":262,"stargazers_count":36,"open_issues_count":5,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T17:11:32.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.twilio.com/blog/2017/09/never-forget-friends-birthday-python-flask-twilio.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pybites.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-10T08:56:02.000Z","updated_at":"2025-02-19T23:47:16.000Z","dependencies_parsed_at":"2022-08-27T19:12:24.779Z","dependency_job_id":null,"html_url":"https://github.com/pybites/bday-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybites%2Fbday-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybites%2Fbday-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybites%2Fbday-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybites%2Fbday-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pybites","download_url":"https://codeload.github.com/pybites/bday-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247644680,"owners_count":20972340,"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":[],"created_at":"2024-11-06T03:45:03.704Z","updated_at":"2025-04-07T11:32:21.155Z","avatar_url":"https://github.com/pybites.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Birthday App (bday-app)\n\u003e Never Forget A Friend's Birthday with Python, Flask and Twilio\n\n[![GitHub issues][git-issues-image]][git-issues-url]\n[![GitHub forks][git-forks-image]][git-forks-url]\n[![GitHub stars][git-stars-image]][git-stars-url]\n[![Twitter][twitter-image]][twitter-url]\n\nThis app lets you:\n\n- import your Facebook birthday calendar,\n- send SMS notification messages of upcoming birthdays,\n- send text messages and simple ecards via SMS.\n\n![app-printscreen](app-printscreen.png)\n\n## Setup instructions\n\n1. Clone this repo:\n\n\t\t$ git clone https://github.com/pybites/bday-app\n\n2. Make a virtual env and install dependencies:\n\n\t\t$ cd bday-app\n\t\t$ python3 -m venv venv\n\t\t$ source venv/bin/activate\n\t\t$ pip install -r requirements.txt\n\n3. Create a Twilio account, get a phone number and API key (sid) and token.\n\n4. Copy the [settings template](https://github.com/pybites/bday-app/blob/master/env-example.conf) in place:\n\n\t\t$ cp env-example.conf env.conf\n\n5. Update it with the correct settings:\n\n\t* flask - secret = set this to a random, hard to guess string (see [Flask docs](http://flask.pocoo.org/docs/0.12/quickstart/))\n\t* twilio_api - sid + token = obtained in step 3\n\t* phones - twilio = obtained in step 3\n\t* phones - admin = your (verified) mobile phone number, where you want to receive notification messages\n\t* login - user + password = define your login credentials for the Flask app\n\t* server - url = unchanged if running locally, update to base URL if deployed elsewhere (so far I only tested it on my localhost)\n\n\u003e NOTE: make sure you use E.164 number formatting for phone numbers (e.g. +34666555444, +442071838750). See Twilio's support article: [Formatting International Phone Numbers](https://support.twilio.com/hc/en-us/articles/223183008-Formatting-International-Phone-Numbers).\n\n6. Import your FB calendar into local SQLite database with birthdays\n\n\t- Export your birthday calendar from Facebook and save it as `cal.ics` in the app's toplevel directory.\n\n\t\t![export FB cal](http://projects.bobbelderbos.com/twilio/import_birthdays.gif)\n\n\t- Run `model.py` to import the birthdays into the DB. Use it with `-t` if you want to strip out real names.\n\n\t\t\t$ python model.py\n\n## How to run it\n\nThis app has two parts:\n\n1. The [notifier](https://github.com/pybites/bday-app/blob/master/notify.py) which checks once a day for birthdays. If there are one or more birthdays that day it sends out an SMS to your configured admin phone. You need to run this as a background job so use `nohup`:\n\n\t\t$ nohup ./notify.py \u0026\n\n2. The front-end is a Flask app which you can invoke with:\n\n\t\t$ python app.py\n\nNote that for both scripts you need to have your virtualenv enabled.\n\n\n[git-issues-image]: https://img.shields.io/github/issues/pybites/bday-app.svg\n[git-issues-url]: https://github.com/pybites/bday-app/issues\n[git-forks-image]: https://img.shields.io/github/forks/pybites/bday-app.svg\n[git-forks-url]: https://github.com/pybites/bday-app/network\n[git-stars-image]: https://img.shields.io/github/stars/pybites/bday-app.svg\n[git-stars-url]: https://github.com/pybites/bday-app/stargazers\n[twitter-image]: https://img.shields.io/twitter/url/https/github.com/pybites/bday-app.svg?style=social\n[twitter-url]: https://twitter.com/intent/tweet?text=Wow:\u0026url=%5Bobject%20Object%5D\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpybites%2Fbday-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpybites%2Fbday-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpybites%2Fbday-app/lists"}