Screamshot’s documentation

Screamshot is a python library to capture screenshots of web pages.


It is based on the Pyppeteer library that uses the Asyncio package and therefore asynchronous functions. Thus, you may experience some thread issues.


Screamshot requires Python 3.5 or more.

Install by pip from PyPI:

pip install screamshot


Exemple: a Django view that uses screamshot

# in a Django project
from django.http import HttpResponse

import asyncio

from screamshot import generate_bytes_img_prom

def home(request):
    loop = asyncio.get_event_loop()
    future = asyncio.Future()

        generate_bytes_img_prom('', future))

    return HttpResponse(future.result(), content_type='image')

In this case, if you use, the server must be launched using --nothreading and --noreload as argument.