Search code examples
pythonpyramid

Getting the request IP address with Pyramid


I'm using Pyramid framework and I want to access the IP address from which the request originated. I assume it's in the request object (passed to every view function) somewhere, but I can't find documentation which tells me where it is.


Solution

  • It's in request.remote_addr.

    You can find it in the pyramid.request documentation.