port linux.py and osrc.py to requests