command_line
monz command line interface.
accounts(monzo_api)
Show Monzo accounts.
Source code in monz/command_line.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
authorize(client_id, client_secret, save, redirect_url)
Authorize monz
as an OAuth client.
To get the client ID and secret, create an OAuth client in
Monzo developer tools (with the "Redirect URL"
set to http://localhost:6600/monz
), run the monz authorize
command and follow
its steps. By default, it will save the obtained token on disk, so it can be
automatically refreshed when it expires.
Alternatively, you can pass --no_save
option to just obtain the token.
Source code in monz/command_line.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
balance(monzo_api, account_id)
Show Monzo account balance.
You don't need to specify the account ID if you only have one (active) account.
Source code in monz/command_line.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
cli(ctx, access_token)
Simple command line interface for quickly accessing your Monzo account info.
To use it, you need to first authenticate the app. You can do that with a temporary access token from the Monzo Developer Portal, or go through a one time OAuth setup that will save the token on disk and automatically refresh it when it expires.
To do that, you should first create an OAuth client in Monzo developer tools
(with the "Redirect URL" set to http://localhost:6600/monz
) and run the
monz authorize
command with obtained client ID and client secret.
For more information, please take a look at: https://monz.pawelad.dev/en/latest/getting_started/#authentication
Source code in monz/command_line.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
info(ctx)
Show Monzo account overview.
Source code in monz/command_line.py
112 113 114 115 116 117 118 119 120 121 |
|
pots(monzo_api, account_id, show_deleted)
Show Monzo pots.
Source code in monz/command_line.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
transactions(monzo_api, account_id, num)
Show Monzo account transactions.
You don't need to specify the account ID if you only have one (active) account.
Per Monzo API docs - you can only fetch all transactions within 5 minutes of authentication. After that, you can query your last 90 days.
Source code in monz/command_line.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
|
whoami(monzo_api)
Show Monzo whoami
data.
Source code in monz/command_line.py
124 125 126 127 128 129 130 131 132 133 |
|