METADATA 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. Metadata-Version: 2.4
  2. Name: soupsieve
  3. Version: 2.8.3
  4. Summary: A modern CSS selector implementation for Beautiful Soup.
  5. Project-URL: Homepage, https://github.com/facelessuser/soupsieve
  6. Author-email: Isaac Muse <Isaac.Muse@gmail.com>
  7. License-Expression: MIT
  8. License-File: LICENSE.md
  9. Keywords: CSS,HTML,XML,filter,query,selector,soup
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Environment :: Console
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: MIT License
  14. Classifier: Operating System :: OS Independent
  15. Classifier: Programming Language :: Python :: 3
  16. Classifier: Programming Language :: Python :: 3.9
  17. Classifier: Programming Language :: Python :: 3.10
  18. Classifier: Programming Language :: Python :: 3.11
  19. Classifier: Programming Language :: Python :: 3.12
  20. Classifier: Programming Language :: Python :: 3.13
  21. Classifier: Programming Language :: Python :: 3.14
  22. Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
  23. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  24. Classifier: Typing :: Typed
  25. Requires-Python: >=3.9
  26. Description-Content-Type: text/markdown
  27. [![Donate via PayPal][donate-image]][donate-link]
  28. [![Build][github-ci-image]][github-ci-link]
  29. [![Coverage Status][codecov-image]][codecov-link]
  30. [![PyPI Version][pypi-image]][pypi-link]
  31. [![PyPI Downloads][pypi-down]][pypi-link]
  32. [![PyPI - Python Version][python-image]][pypi-link]
  33. [![License][license-image-mit]][license-link]
  34. # Soup Sieve
  35. ## Overview
  36. Soup Sieve is a CSS selector library designed to be used with [Beautiful Soup 4][bs4]. It aims to provide selecting,
  37. matching, and filtering using modern CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
  38. specifications up through the latest CSS level 4 drafts and beyond (though some are not yet implemented).
  39. Soup Sieve was written with the intent to replace Beautiful Soup's builtin select feature, and as of Beautiful Soup
  40. version 4.7.0, it now is :confetti_ball:. Soup Sieve can also be imported in order to use its API directly for
  41. more controlled, specialized parsing.
  42. Soup Sieve has implemented most of the CSS selectors up through the latest CSS draft specifications, though there are a
  43. number that don't make sense in a non-browser environment. Selectors that cannot provide meaningful functionality simply
  44. do not match anything. Some of the supported selectors are:
  45. - `.classes`
  46. - `#ids`
  47. - `[attributes=value]`
  48. - `parent child`
  49. - `parent > child`
  50. - `sibling ~ sibling`
  51. - `sibling + sibling`
  52. - `:not(element.class, element2.class)`
  53. - `:is(element.class, element2.class)`
  54. - `parent:has(> child)`
  55. - and [many more](https://facelessuser.github.io/soupsieve/selectors/)
  56. ## Installation
  57. You must have Beautiful Soup already installed:
  58. ```
  59. pip install beautifulsoup4
  60. ```
  61. In most cases, assuming you've installed version 4.7.0, that should be all you need to do, but if you've installed via
  62. some alternative method, and Soup Sieve is not automatically installed, you can install it directly:
  63. ```
  64. pip install soupsieve
  65. ```
  66. If you want to manually install it from source, first ensure that [`build`](https://pypi.org/project/build/) is
  67. installed:
  68. ```
  69. pip install build
  70. ```
  71. Then navigate to the root of the project and build the wheel and install (replacing `<ver>` with the current version):
  72. ```
  73. python -m build -w
  74. pip install dist/soupsieve-<ver>-py3-none-any.whl
  75. ```
  76. ## Documentation
  77. Documentation is found here: https://facelessuser.github.io/soupsieve/.
  78. ## License
  79. MIT
  80. [bs4]: https://beautiful-soup-4.readthedocs.io/en/latest/#
  81. [github-ci-image]: https://github.com/facelessuser/soupsieve/workflows/build/badge.svg
  82. [github-ci-link]: https://github.com/facelessuser/soupsieve/actions?query=workflow%3Abuild+branch%3Amain
  83. [codecov-image]: https://img.shields.io/codecov/c/github/facelessuser/soupsieve/master.svg?logo=codecov&logoColor=aaaaaa&labelColor=333333
  84. [codecov-link]: https://codecov.io/github/facelessuser/soupsieve
  85. [pypi-image]: https://img.shields.io/pypi/v/soupsieve.svg?logo=pypi&logoColor=aaaaaa&labelColor=333333
  86. [pypi-down]: https://img.shields.io/pypi/dm/soupsieve.svg?logo=pypi&logoColor=aaaaaa&labelColor=333333
  87. [pypi-link]: https://pypi.python.org/pypi/soupsieve
  88. [python-image]: https://img.shields.io/pypi/pyversions/soupsieve?logo=python&logoColor=aaaaaa&labelColor=333333
  89. [license-image-mit]: https://img.shields.io/badge/license-MIT-blue.svg?labelColor=333333
  90. [license-link]: https://github.com/facelessuser/soupsieve/blob/main/LICENSE.md
  91. [donate-image]: https://img.shields.io/badge/Donate-PayPal-3fabd1?logo=paypal
  92. [donate-link]: https://www.paypal.me/facelessuser