How to access files on a networked smb server with Python on macOS
After discussing in chat the OP was able to solve the issue by creating a mount point.


sudo mkdir /Volumes/test
sudo mount_smbfs //user:pass@url.com/folder /Volumes/Test


This can be done with python by eliminating the sudo but running the script/application as admin.