Screenshot Zerodha portfolio pages, compile to PDF, and email it
Project description
Zerodha Portfolio Summary Mailer
Logs into Zerodha, screenshots your portfolio pages, compiles them into a PDF, and emails it to you.
Setup
1. Install
pip install .
playwright install chromium
2. Configure
cp config.ini.template config.ini
Edit config.ini with your email addresses and Gmail App Password. See the template for all options.
config.iniis gitignored — never commit it.
3. Run
zerodha-summary
The browser opens for you to log in. Once you press Enter, it takes screenshots, compiles the PDF, and asks for confirmation before sending the email.
Gmail App Password
Gmail requires an App Password (not your regular password):
- Go to Google Account → Security → 2-Step Verification → App passwords
- Create one (e.g. "Zerodha Mailer") and paste it into
config.iniunderpassword
If password is omitted from config.ini, the program will prompt for it securely at runtime.
Advanced
CLI overrides
Any config.ini setting can be passed as a CLI argument:
zerodha-summary --receiver-email other@example.com --subject "March Summary" --output-pdf march.pdf
zerodha-summary --config my_other_config.ini
Pages
- Add one URL per line under
pages =inconfig.ini - The Tradebook page (
/reports/tradebook) is handled specially — the program automatically iterates all segments (Equity, F&O, Currency, etc.) over the last 3 months and captures every pagination page - All other pages are screenshotted as-is
Troubleshooting
| Problem | Fix |
|---|---|
Missing dependency error |
Run pip install . and playwright install chromium |
| Gmail login fails | Use an App Password, not your regular Gmail password |
| PDF not opening | Install a PDF viewer (sudo apt install evince on Ubuntu) |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zerodha_summary-0.2.0.tar.gz.
File metadata
- Download URL: zerodha_summary-0.2.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f511c727171b311894114d218d92945425cdee35716cd5dc9a8430fd2103d043
|
|
| MD5 |
0f0badf56af1a52173b9371b3f36b5e5
|
|
| BLAKE2b-256 |
0ad37e65240feb3a56e8d21315e255ff699ecf0eb74d09ec67c9092560a597f5
|
File details
Details for the file zerodha_summary-0.2.0-py3-none-any.whl.
File metadata
- Download URL: zerodha_summary-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0ec095971ca37ab2d563bf4d844023c7797549ca6f3aba3e15619252e405310
|
|
| MD5 |
8d557594dd964d0f1ec21b73bb4dd9da
|
|
| BLAKE2b-256 |
f7c682c5096de91d242512e623904e917a663a1f1527d07a05cbdaa2b58f6deb
|