Examples on how to use Tor in python with requests or aiohttp (via aiosocks).
Assumes Tor will run on 127.0.0.1:9050.
Requires Python 3.6+
pipenv install
pipenv run python tor_with_aiohttp.py
pipenv run python tor_with_requests.py
brew install python3
pip3 install --upgrade pipenv
brew install tor
brew services start tor
- Debian/Ubuntu: https://www.torproject.org/docs/debian.html.en
- Fedora/Centos: https://www.torproject.org/docs/rpms.html.en
- Source: https://www.torproject.org/docs/tor-doc-unix.html.en