https://github.com/floscha/routine-api
An unofficial Python API for the Routine planner app.
https://github.com/floscha/routine-api
Last synced: 8 months ago
JSON representation
An unofficial Python API for the Routine planner app.
- Host: GitHub
- URL: https://github.com/floscha/routine-api
- Owner: floscha
- License: mit
- Created: 2023-06-13T20:08:40.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-25T12:49:55.000Z (almost 3 years ago)
- Last Synced: 2025-02-22T06:24:55.238Z (over 1 year ago)
- Language: Python
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Routine Python API
An unofficial Python API for the [Routine](https://routine.co) planner app.
## Installation
`pip install routine-api`
## Usage
### Prerequisites
First, you have to obtain your Routine token.
For this, go to https://app.routine.co/ and log into the web application.
Then, open the Chrome DevTools and under the **network** tab, find the `renew` request.
(If it doesn't show, try reloading the page without cache, by typing shift + cmd + r on Mac.)
From the `renew` request, find the **Authorization** header and copy the text after **Basic**.
Finally, store the token (i.e. the copied text), either into an *.env* file or an environment variable using `export ROUTINE_TOKEN=`.
### Python API
```python
import routine
```
**List all tasks:**
```python
for t in routine.get_all_tasks():
print(t.title)
```
**Get a single task by its ID:**
```python
t = Task.from_id("