types-PySocks
Typing stubs for PySocks
What it is and what it does
types-pysocks is a type stub package that bridges the gap between the PySocks SOCKS proxy library and static type checkers. It provides type annotations for PySocks so that tools like mypy and pyright can understand and validate how you're using the library in your code, catching type errors before runtime.
The stubs are generated and maintained as part of the typeshed project, which is the canonical repository for type information for the Python standard library and popular third-party packages. This package is a thin distribution layer that makes those stubs available via pip. It has no runtime dependencies and is designed purely to support development-time type checking.
Use it for:
- Enable mypy or pyright to type-check code that imports and uses PySocks for SOCKS proxy connections
- Catch type mismatches in proxy configuration or socket operations before running code
- Integrate PySocks into a typed Python project without disabling type checking for that module
- Validate correct usage of PySocks API when refactoring or adding new proxy functionality
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for PySocks, enabling static type checkers like mypy and pyright to validate code using the PySocks SOCKS proxy library.
Yes, if you use PySocks and want static type checking. Install it alongside your type checker (mypy or pyright) to get accurate type validation for PySocks code. It has no runtime cost and is actively maintained. If you don't use a type checker or don't use PySocks, there's no reason to install it.
Install
types-pysocks on PyPI
pip
pip install types-pysocksuv
uv add types-pysockspoetry
poetry add types-pysocksInstalling types-PySocks
Before you install
Low friction installation with no runtime dependencies. Actively maintained as part of typeshed, with recent releases and no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows use in most projects without restriction.
Quickstart
pip install types-pysocks
# Then use with your type checker in your project
# mypy or pyright will automatically discover the stubs when checking code that imports PySocks
Requires Python 3.10 or later. Stubs are only useful when used alongside a type checker (mypy 2.1.0, pyright 1.1.409, or compatible).
Verify before relying
- Whether stubs remain accurate for PySocks versions other than 1.7.1
- Compatibility with type checkers beyond mypy 2.1.0 and pyright 1.1.409
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 583,727/month — #5,891 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_pysocks-1.7.1.20260518-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-mockProvides type stubs for the mock library,…
permissive · top 5,000 on PyPI
types-tomlProvides type hints for the toml package,…
permissive · top 1,000 on PyPI
types-protobufProvides type stubs for the protobuf package,…
permissive · top 1,000 on PyPI
types-assertpyProvides type stubs enabling static type…
permissive · top 15,000 on PyPI
types-python-http-clientProvides type hints for python-http-client,…
permissive · top 15,000 on PyPI
types-cffiProvides type stubs for the cffi package,…
permissive · top 5,000 on PyPI
types-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI
types-pysftpProvides type hints for the pysftp package,…
permissive · top 15,000 on PyPI
types-polibProvides type stubs for the polib package,…
permissive · top 15,000 on PyPI
types-ldap3Provides type stubs for the ldap3 package,…
permissive · top 15,000 on PyPI