No need to use an oauth 2.0 connection on HubSpot to get server-to-server data via a Python script.
Creating a private app is enough – especially since deprecation of API key.
Methodology is detailed here:
https://developers.hubspot.com/docs/api/migrate-an-api-key-integration-to-a-private-app
- Create a private app
- Set the scopes and auth
- Use the headers when connections using the Request lib
- Build the business data logic