Git Product home page Git Product logo

pauloboaventura / appointment-reminders-flask Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrjohnsson77/appointment-reminders-flask

0.0 1.0 0.0 1.39 MB

Use Twilio to send SMS reminders to your customers about upcoming appointments

Home Page: https://www.twilio.com/docs/tutorials/walkthrough/appointment-reminders/python/flask

License: MIT License

Python 70.58% Mako 2.61% JavaScript 0.91% HTML 25.90%

appointment-reminders-flask's Introduction

Twilio's Appointment Reminders with Flask

Build Status Coverage Status

Use Twilio to send SMS reminders to your customers about upcoming appointments. Learn how appointment reminders help other companies in these Twilio customer stories.

Read the full tutorial here!

Quickstart

Heroku

The easiest way to run this app is by deploying it to Heroku. You can run this app for free in minutes:

Deploy

After your app deploys, you must go to the Heroku dashboard and enable your worker dyno to start the Celery worker:

Enable Heroku worker

Local development

This project is built using the Flask web framework. It runs on Python 2.7+ and Python 3.4+.

To run the app locally, first clone this repository and cd into its directory. Then:

  1. Create a new virtual environment:

  2. Install the requirements:

    pip install -r requirements.txt
    
  3. Start a local PostgreSQL database and create a database called appointments:

    • If on a Mac, we recommend Postgres.app. After install, open psql and run CREATE DATABASE appointments;
    • If Postgres is already installed locally, you can just run createdb appointments from a terminal
  4. Copy the .env_example file to .env, and edit it to include your credentials for the Twilio API (found at https://www.twilio.com/user/account/voice) and your local Postgres database

  5. Run source .env to apply the environment variables (or even better, use autoenv)

  6. Run the migrations with:

    alembic upgrade +1
    
  7. Start a redis server to be our Celery broker. If on a Mac, we recommend installing redis through homebrew

  8. Start the development server:

    python runapp.py
    

You can now access the application at http://localhost:5000. To send any reminders, however, you must also start a separate Celery worker process.

  1. Start a new terminal session, cd into the repository, and active your appointment-reminders virtualenv

  2. Start the Celery worker:

    celery -A reminders.celery worker -l info
    

Celery will now send SMS reminders for any new appointments you create through the web app.

Run the tests

You can run the tests locally through pytest.

Follow the instructions in the Local Development section above, and then run:

py.test --cov

You can then view the results with coverage report or build an HTML report with coverage html.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.