PEP 561 type stubs for the mss screen capture library
Project description
mss-stubs
PEP 561 type stubs for mss, the cross-platform screenshot library.
mss ships without type annotations. Running Pyright or Pylance in strict mode will flag every mss call as unknown. This package fixes that.
Install
pip install mss-stubs
Or with uv:
uv pip install mss-stubs
Usage
Install alongside mss and your type checker picks it up automatically. No configuration needed.
import mss
with mss.MSS() as sct:
monitor = sct.monitors[1] # dict[str, int]
shot = sct.grab(monitor) # ScreenShot
print(shot.size) # tuple[int, int]
print(len(shot.bgra)) # bytes
Covered API
| Symbol | Type |
|---|---|
mss.MSS() |
MSSBase |
MSSBase.monitors |
list[dict[str, int]] |
MSSBase.grab(monitor) |
ScreenShot |
MSSBase.__enter__ / __exit__ |
context manager |
ScreenShot.size |
tuple[int, int] |
ScreenShot.bgra |
bytes |
License
Apache 2.0. See LICENSE.
© 2026 paredez.dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mss_stubs-0.1.0.tar.gz.
File metadata
- Download URL: mss_stubs-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eeb1b9e535195ab31ed2193f600cd03c2b0a2040e2a8eb0be76795c047f7430
|
|
| MD5 |
b2304e25933865222928cd5072d8b082
|
|
| BLAKE2b-256 |
b8f72501d63607b51bd6759e01615209428c48f70cad56f3ecb6e0bc8b3f3921
|
File details
Details for the file mss_stubs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mss_stubs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4c54916de02f19c7a33ff1441ba629c3e7344080d3d799f199444f8b0ab8c63
|
|
| MD5 |
c10a164a543166b0afc46102423e5d83
|
|
| BLAKE2b-256 |
f2e498c1e085ba4869717b298b044228193eb553730e9efb739bb6e4906c48be
|