If you'd like to contact me please looked at my ReadMe on how to reach me.
All sections regarding this repository.
Full tutorial: https://www.youtube.com/watch?v=b05p2Rhmn4w
This program allows for users to acquire their To-Do Assignments on Canvas and have a message be sent through SMS as well as giving the weather, and a motivational quote. This program does not run on it's own. I suggest using a crontab on a VM to achieve equivalent output.
For example:
- TextNowAPI
- CanvasAPI
- OpenWeatherAPI
To be able to execute this code you will need these modules:
- PyTextNow
- Datetime
- Time
- CanvasAPI
- Random
- Pandas
from canvasapi import Canvas
from datetime import datetime, timedelta
import pandas as pd
import keys
# Canvas API URL
API_URL = keys.schoolurl
# Canvas API key
API_KEY = keys.accounttoken
canvas = Canvas(API_URL, API_KEY)
def getassignments():
#gets the users todo assignments
pendingAssigments = canvas.get_todo_items()
#list with assignment and due date
lst = []
# for loop getting every upcoming assignment
for assignment in pendingAssigments:
#gets the name of the assignments
name = assignment.assignment["name"]
#gets the time of assignment and subtracts five hours (canvas defaults to GMT I'm EST) - Also assignment is an object
# you can call various things from such as ["description"] and etc.
due = datetime.strptime(assignment.assignment["due_at"], "%Y-%m-%dT%H:%M:%SZ") - timedelta(hours=5)
#gets the \day of the week
temp = pd.Timestamp(due)
#adds the name, time, and day in a list of lists
lst.append([name, temp.day_name(), str(temp)])
return lst
- CanvasAPI Docs
- PyTextNow Docs
- OpenWeatherAPI Docs
MIT License
Copyright (c) [2022] [Carson Fulmer]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- LinkedIn - Carson Fulmer
- Website - Carson Fulmer

