Skip to content

beautifulsoup4 4.14.3

Version history | Download JSON

  • PyPI https://pypi.org/project/beautifulsoup4/

  • py.typed

  • Coverage


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "Typed" : 870
        "Any" : 21
        "Untyped" : 79
    • 91.9% coverage
    • 89.7% coverage (strict)
    • 970 typable
      • 870 typed
      • 79 untyped
      • 21 Any
  • Typables


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "functions" : 19
        "classes" : 722
        "other" : 8
    • 8 functions (+0 overloads)
      • 11 parameters
    • 52 classes
      • 232 methods (+12 overloads)
        • 456 parameters
      • 32 properties
    • 10 modules
      • 8 attrs

Modules

Module Coverage Coverage (strict) Typables Ignores
bs4 98.9% 96.7% 92 0
bs4._warnings 100.0% 100.0% 6 0
bs4.builder 91.7% 89.0% 109 2
bs4.css 94.0% 80.0% 50 0
bs4.dammit 85.7% 85.7% 119 2
bs4.diagnose 100.0% 97.6% 42 0
bs4.element 90.4% 88.8% 429 1
bs4.exceptions 50.0% 50.0% 2 0
bs4.filter 95.1% 93.8% 81 0
bs4.formatter 92.5% 92.5% 40 0

Incomplete Annotations

bs4 (1 missing, 2 any)

Symbol Typable Typed Any
meth BeautifulSoup.init 9 8 1
meth BeautifulSoup.decode 6 6 1

bs4.builder (9 missing, 3 any)

Symbol Typable Typed Any
meth SAXTreeBuilder.init 3 3 2
meth TreeBuilder.init 8 7 0
attr TreeBuilder.USE_DEFAULT 1 1 1
attr TreeBuilder.soup 1 0 0
attr TreeBuilder.cdata_list_attributes 1 0 0
attr TreeBuilder.preserve_whitespace_tags 1 0 0
attr TreeBuilder.store_line_numbers 1 0 0
attr TreeBuilder.string_containers 1 0 0
attr TreeBuilder.attribute_dict_class 1 0 0
attr TreeBuilder.attribute_value_list_class 1 0 0
attr TreeBuilder.empty_element_tags 1 0 0

bs4.css (3 missing, 7 any)

Symbol Typable Typed Any
meth CSS.init 3 2 0
meth CSS.compile 5 5 1
meth CSS.select_one 5 5 1
meth CSS.select 6 6 1
meth CSS.iselect 6 6 1
meth CSS.closest 5 5 1
meth CSS.match 5 5 1
meth CSS.filter 5 5 1
attr CSS.api 1 0 0
attr CSS.tag 1 0 0

bs4.dammit (17 missing, 0 any)

Symbol Typable Typed Any
meth UnicodeDammit.init 8 7 0
attr UnicodeDammit.smart_quotes_to 1 0 0
attr UnicodeDammit.tried_encodings 1 0 0
attr UnicodeDammit.contains_replacement_characters 1 0 0
attr UnicodeDammit.is_html 1 0 0
attr UnicodeDammit.log 1 0 0
attr UnicodeDammit.detector 1 0 0
attr UnicodeDammit.markup 1 0 0
attr UnicodeDammit.unicode_markup 1 0 0
attr UnicodeDammit.original_encoding 1 0 0
attr EntitySubstitution.ANY_ENTITY_RE 1 0 0
meth EncodingDetector.init 7 6 0
attr EncodingDetector.known_definite_encodings 1 0 0
attr EncodingDetector.user_encodings 1 0 0
attr EncodingDetector.exclude_encodings 1 0 0
attr EncodingDetector.chardet_encoding 1 0 0
attr EncodingDetector.is_html 1 0 0

bs4.diagnose (0 missing, 1 any)

Symbol Typable Typed Any
func lxml_trace 4 4 1

bs4.element (41 missing, 7 any)

Symbol Typable Typed Any
meth Tag.init 17 16 0
meth Tag.contains 2 2 1
meth Tag.eq 2 2 1
meth Tag.ne 2 2 1
meth Tag.select_one 4 4 1
meth Tag.select 5 5 1
attr Tag.name 1 0 0
attr Tag.namespace 1 0 0
attr Tag.prefix 1 0 0
attr Tag.attribute_value_list_class 1 0 0
attr Tag.parser_class 1 0 0
attr Tag.sourceline 1 0 0
attr Tag.sourcepos 1 0 0
attr Tag.attrs 1 0 0
attr Tag.can_be_empty_element 1 0 0
attr Tag.cdata_list_attributes 1 0 0
attr Tag.preserve_whitespace_tags 1 0 0
attr Tag.interesting_string_types 1 0 0
attr Tag.parserClass 1 0 0
attr Tag.strings 1 0 0
attr Tag.START_ELEMENT_EVENT 1 0 0
attr Tag.END_ELEMENT_EVENT 1 0 0
attr Tag.EMPTY_ELEMENT_EVENT 1 0 0
attr Tag.STRING_ELEMENT_EVENT 1 0 0
attr Tag.findChild 1 0 0
attr Tag.findAll 1 0 0
attr Tag.findChildren 1 0 0
meth HTMLAttributeDict.setitem 3 3 1
meth XMLAttributeDict.setitem 3 3 1
attr PageElement.nextSibling 1 0 0
attr PageElement.previousSibling 1 0 0
attr PageElement.text 1 0 0
attr PageElement.replaceWith 1 0 0
attr PageElement._lastRecursiveChild 1 0 0
attr PageElement.findNext 1 0 0
attr PageElement.findAllNext 1 0 0
attr PageElement.findNextSibling 1 0 0
attr PageElement.findNextSiblings 1 0 0
attr PageElement.fetchNextSiblings 1 0 0
attr PageElement.findPrevious 1 0 0
attr PageElement.findAllPrevious 1 0 0
attr PageElement.fetchAllPrevious 1 0 0
attr PageElement.findPreviousSibling 1 0 0
attr PageElement.findPreviousSiblings 1 0 0
attr PageElement.fetchPreviousSiblings 1 0 0
attr PageElement.findParent 1 0 0
attr PageElement.findParents 1 0 0
attr PageElement.fetchParents 1 0 0

bs4.exceptions (1 missing, 0 any)

Symbol Typable Typed Any
meth ParserRejectedMarkup.init 2 1 0

bs4.filter (4 missing, 1 any)

Symbol Typable Typed Any
meth ElementFilter.init 2 1 0
meth SoupStrainer.init 5 4 0
meth MatchRule.init 6 5 0
meth MatchRule.eq 2 2 1
attr MatchRule.function 1 0 0

bs4.formatter (3 missing, 0 any)

Symbol Typable Typed Any
meth XMLFormatter.init 6 5 0
meth HTMLFormatter.init 6 5 0
meth Formatter.init 7 6 0

Type-Ignore Comments

Flavor Count
type: ignore 5