Type annotations for lxml
Project description
This repository contains external type annotations for lxml
. It can be used by type-checking tools (currently supporting mypy
and pyright
) to check code that uses lxml
, or used within IDEs like VSCode or PyCharm to facilitate development.
Installation
From PyPI
This is the normal choice for most people:
pip install -U types-lxml
From downloaded wheel file
Head over to release page and get wheel file (with extension .whl
). Wheel files can be installed in the same way as PyPI package:
pip install -U types-lxml*.whl
Bleeding edge from GitHub
pip install -U git+https://github.com/abelcheung/types-lxml.git
Special notes
There are two special stub-only classes that do not exist as concrete class in lxml
:
lxml.etree.ParserTarget
lxml.etree.SmartStr
They are intended as helpers when writing code, wrapped under
if TYPE_CHECKING: ...
. Please consult their docstring in stub files for detail,
or if you are using IDEs, the docstring might have been formatted nicely for reference.
History
Type annotations for lxml
were initially included in typeshed, but as it was still incomplete, it was decided to be ripped out as a separate project.
The code was extracted by Jelle Zijlstra and moved to lxml-stubs
repository using git filter-branch
.
types-lxml
is a fork of lxml-stubs
that strives for completeness, so that most people would at least find it usable; while the the original lxml-stubs
aims to be stable.
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
Hashes for types_lxml-2022.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e65869e2c0a1706cbd2e05d726efbfc213a18fe8ddd4988378969697ee41c7b3 |
|
MD5 | a44bc9e2c5e7d4eb5a1c90625416c248 |
|
BLAKE2b-256 | 775ee692090895c1fea6a14b66473972b06aa372171abc4d18b86d2d5988d694 |