Doc-search
A simple package for searching documentation
Features
- Both async and sync support
- utilizes a cache to limit the number of requests being made
- works for any documentation that is built with sphinx
Example
asyncio
import asyncio
from doc_search import AsyncScraper
scraper = AsyncScraper()
async def main(query):
results = await scraper.search(query, page="https://docs.python.org/3/")
#returns a list of tuples in the format of [(item, url), (item, url)...]
if not results:
print("no results were found")
else:
for item, url in results: #loop through the list of results
print(f"{item} | {url}") #print out each result
asyncio.run(main("str.split"))
# to view the cache
# print(scraper.cache)
sync
from doc_search import SyncScraper
scraper = SyncScraper()
results = scraper.search("resize", page="https://pillow.readthedocs.io/en/stable/")
if not results:
print("no results were found")
else:
for item, url in results: #loop through the list of results
print(f"{item} | {url}") #print out each result
Beta
- Offers searches for C and C++ docs using the
scraper.search_candscraper.search_cppmethods EX:scraper = SyncScraper() results = scraper.search_c("printf")
Metadata
Release files for doc-search 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| doc_search-1.0.7-py3-none-any.whl | Python 3 | none | any | Details for doc_search-1.0.7-py3-none-any.whl |
Release files / doc_search-1.0.7-py3-none-any.whl
| Download URL | doc_search-1.0.7-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd4459f1982f2b750e1304360f1e321b414b8e4cd78635d8c1bda9069f7cd572
|
|
BLAKE2b-256 checksum How to use checksums |
ad079462227bcc0bddd8e50b1d215df8ab44ac5038a4332f4639e96edd40f207
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.10
|
Security for doc-search 1.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.