This is an unofficial library providing a Python interface for Substack. I am in no way affiliated with Substack. It works with Python versions from 3.7+.
You can install python-substack using:
$ pip install python-substack
Set the following environment variables by creating a .env file:
PUBLICATION_URL=https://ma2za.substack.com
EMAIL=
PASSWORD=
USER_ID=
To discover the USER_ID go to your public profile page, in the URL bar of the browser you find the substack address followed by your USER_ID and your username: https://substack.com/profile/[USER_ID]-[username]
The .env file will be ignored by git but always be careful.