Vim has a system for dealing with similar things called file plugins or ftplugins.
In your ~/.vim (or something else standard for your OS), go to the ftplugins directory (create if it does not exist) and create a python directory in it. Any .vim file in this directory will automatically load when the .py file is downloaded.
Note that you need to have filetype plugin on .
Alternatively, you can do this with auto-commands, although this is a bit cumbersome:
autocmd BufNewFile,BufRead *.py source python.vimrc
Put this in your regular vimrc and it will do what you want.
source share