MCPcopy Create free account

hub / github.com/deedy5/ddgs / functions

Functions277 in github.com/deedy5/ddgs

↓ 55 callersMethodget
Get cached results if not expired.
ddgs/dht/cache.py:96
↓ 27 callersMethodappend
Add an item to the cache. Register an occurrence of `item`. First time we see its key, we store the item; every time we bump the coun
ddgs/results.py:128
↓ 16 callersFunction_expand_proxy_tb_alias
Expand "tb" to a full proxy URL if applicable.
ddgs/utils.py:68
↓ 12 callersFunction_get_ddgs
Create a DDGS instance with proxy configuration from environment.
ddgs/api_server/api.py:39
↓ 12 callersMethodastart
Async wrapper for start() for backwards compatibility. Args: timeout: Maximum time to wait for service to start. Returns
ddgs/dht/libp2p_client.py:390
↓ 11 callersMethodastop
Async wrapper for stop() for backwards compatibility. Args: timeout: Maximum time to wait for service to stop.
ddgs/dht/libp2p_client.py:783
↓ 9 callersFunctionget_dht_service
Get the global DHT service instance. Returns: DhtService singleton.
ddgs/api_server/dht_service.py:261
↓ 9 callersMethodset
Store results with TTL and enforce max size.
ddgs/dht/cache.py:122
↓ 8 callersFunctioncompute_query_hash
Compute a normalized hash for a query. Normalization: - Strip whitespace - Lowercase - Sort words alphabetically for deterministic ke
ddgs/dht/types.py:44
↓ 8 callersMethodset
Store results in the DHT. Args: key: The cache key (query hash). results: The search results to cache. tt
ddgs/dht/libp2p_client.py:573
↓ 7 callersMethodextract
Fetch a URL and extract its content. Args: url: The URL to fetch and extract content from. fmt: Output format: "text_
ddgs/ddgs.py:476
↓ 7 callersMethodrequest
Make a request to the search engine.
ddgs/base.py:65
↓ 7 callersMethodstart
Start the DHT client. Returns: True if DHT connection successful.
ddgs/dht/__init__.py:90
↓ 7 callersMethodtext
Perform a text search.
ddgs/ddgs.py:456
↓ 6 callersFunction_save_data
(query: str, data: list[dict[str, str]], function_name: str, filename: str | None)
ddgs/cli.py:51
↓ 6 callersMethodimages
Perform an image search.
ddgs/ddgs.py:460
↓ 5 callersFunction_print_data
(data: list[dict[str, str]], *, no_color: bool = False)
ddgs/cli.py:74
↓ 5 callersFunction_sanitize_query
(query: str)
ddgs/cli.py:101
↓ 5 callersMethod_search_sync
Perform a search across engines in the given category. Args: category: The category of search engines (e.g., 'text', 'images', et
ddgs/ddgs.py:351
↓ 5 callersMethodbooks
Perform a book search.
ddgs/ddgs.py:472
↓ 5 callersMethodcount
Get total number of cached entries.
ddgs/dht/cache.py:179
↓ 5 callersMethodget_cached
Get cached results for a query. Checks local cache first, then DHT DHT (or REST API). Args: query: The search query.
ddgs/dht/__init__.py:137
↓ 5 callersMethodnews
Perform a news search.
ddgs/ddgs.py:464
↓ 5 callersFunctionnormalize_query
Normalize query for display/storage. Args: query: The search query. Returns: Normalized query string.
ddgs/dht/types.py:68
↓ 5 callersMethodvideos
Perform a video search.
ddgs/ddgs.py:468
↓ 4 callersMethod__setattr__
Override setattr to apply normalization functions to certain attributes.
ddgs/results.py:30
↓ 4 callersFunction_download_results
( query: str, results: list[dict[str, str]], function_name: str, proxy: str | None = None,
ddgs/cli.py:127
↓ 4 callersMethod_run_in_trio
Run an async function in the Trio event loop from another thread.
ddgs/dht/libp2p_client.py:500
↓ 4 callersMethodaget
Async wrapper for get() for backwards compatibility. Args: key: The cache key (query hash). timeout: Timeout in secon
ddgs/dht/libp2p_client.py:631
↓ 4 callersMethodaset
Async wrapper for set() for backwards compatibility. Args: key: The cache key (query hash). results: The search resul
ddgs/dht/libp2p_client.py:644
↓ 4 callersMethodcache
Cache search results locally and on DHT. Args: query: The search query. results: The search results. cate
ddgs/dht/__init__.py:182
↓ 4 callersMethodget
Get cached results from the DHT. Args: key: The cache key (query hash). timeout: Timeout in seconds for DHT query.
ddgs/dht/libp2p_client.py:522
↓ 3 callersFunction_extract_vqd
Extract vqd from html bytes.
ddgs/utils.py:15
↓ 3 callersMethod_load_real
(cls)
ddgs/__init__.py:27
↓ 3 callersMethod_run_in_trio
Run an async function in the Trio event loop from another thread.
ddgs/api_server/dht_service.py:116
↓ 3 callersMethodaconnect_peer
Async wrapper for connect_peer() for backwards compatibility. Args: peer_addr: The multiaddress of the peer to connect to.
ddgs/dht/libp2p_client.py:488
↓ 3 callersMethodadd_negative
Add an entry to the negative cache (no results found).
ddgs/dht/cache.py:192
↓ 3 callersMethodafind_peers
Async wrapper for find_peers() for backwards compatibility. Returns: List of peer addresses.
ddgs/dht/libp2p_client.py:713
↓ 3 callersMethoddelete
Delete a cached result.
ddgs/dht/cache.py:160
↓ 3 callersMethodextend
Add a list of items to the cache.
ddgs/results.py:141
↓ 3 callersMethodextract_tree
Extract html tree from html text.
ddgs/base.py:77
↓ 3 callersMethodsize_bytes
Get database size in bytes.
ddgs/dht/cache.py:188
↓ 3 callersMethodstop
Stop the DHT client.
ddgs/dht/__init__.py:250
↓ 2 callersFunction_get_async_loop
Get or create shared async loop running in dedicated thread.
ddgs/ddgs.py:104
↓ 2 callersFunction_get_http_client
Get or create the shared primp HTTP client.
ddgs/ddgs.py:96
↓ 2 callersMethod_get_network_client
Get the network client for caching. Returns: DhtClient instance if available, None otherwise.
ddgs/ddgs.py:256
↓ 2 callersMethod_has_any_token
Check if any token is a substring of the lower-cased text.
ddgs/similarity.py:28
↓ 2 callersMethod_hashes
Generate hash positions for a key using SHA-256 for consistency.
ddgs/dht/cache.py:29
↓ 2 callersFunction_save_csv
(csvfile: str | Path, data: list[dict[str, str]])
ddgs/cli.py:65
↓ 2 callersFunction_save_json
(jsonfile: str | Path, data: list[dict[str, str]])
ddgs/cli.py:60
↓ 2 callersMethodadd
Add a key to the filter.
ddgs/dht/cache.py:41
↓ 2 callersMethodget_neighbors
Get all peers from routing table with complete metadata. Returns: List of peer dictionaries with metadata.
ddgs/dht/libp2p_client.py:689
↓ 2 callersMethodget_status
Get DHT service status. Returns: Dict with status information.
ddgs/api_server/dht_service.py:187
↓ 2 callersMethodrequest
Make a request to the HTTP client.
ddgs/http_client2.py:64
↓ 2 callersMethodrequest
Make a request to the HTTP client.
ddgs/http_client.py:62
↓ 2 callersMethodsearch
Search the engine.
ddgs/base.py:103
↓ 1 callersMethod_cache_results_async
Cache search results asynchronously.
ddgs/ddgs.py:265
↓ 1 callersMethod_connect_bootstrap
Connect to bootstrap nodes.
ddgs/dht/libp2p_client.py:437
↓ 1 callersMethod_create_host
Create a host with Mplex muxer (default security includes Noise).
ddgs/dht/libp2p_client.py:184
↓ 1 callersMethod_ensure_network_running
Ensure the network service is running. If not running, spawn a new ddgs api process only if spawn_api is True.
ddgs/ddgs.py:181
↓ 1 callersMethod_extract_tokens
Split on non-word characters & filter out short tokens.
ddgs/similarity.py:24
↓ 1 callersFunction_get_cache_executor
Get shared thread pool executor for background cache operations.
ddgs/ddgs.py:87
↓ 1 callersMethod_get_engines
Retrieve a list of search engine instances for a given category and backend. Args: category: The category of search engines (e.g.
ddgs/ddgs.py:288
↓ 1 callersMethod_get_from_api
Get cached results from API.
ddgs/dht/__init__.py:116
↓ 1 callersMethod_get_key
(self, item: T)
ddgs/results.py:117
↓ 1 callersFunction_get_random_ssl_context
(*, verify: bool | str)
ddgs/http_client2.py:102
↓ 1 callersMethod_get_vqd
Get vqd value for a search query using DuckDuckGo.
ddgs/engines/duckduckgo_videos.py:38
↓ 1 callersMethod_get_vqd
Get vqd value for a search query using DuckDuckGo.
ddgs/engines/duckduckgo_news.py:31
↓ 1 callersMethod_get_vqd
Get vqd value for a search query using DuckDuckGo.
ddgs/engines/duckduckgo_images.py:42
↓ 1 callersMethod_init_db
(self, conn: sqlite3.Connection)
ddgs/dht/cache.py:72
↓ 1 callersMethod_parse_results
Parse JSON results safely.
ddgs/dht/cache.py:89
↓ 1 callersFunction_resolve_dnsaddr
Resolve /dnsaddr/ multiaddrs into concrete addresses using DNS TXT records. Follows libp2p dnsaddr specification: - Queries TXT records at _d
ddgs/dht/libp2p_client.py:39
↓ 1 callersMethod_run_main_loop
Run main DHT event loop.
ddgs/dht/libp2p_client.py:287
↓ 1 callersMethod_setup_dht
Set up DHT instance with validator.
ddgs/dht/libp2p_client.py:250
↓ 1 callersMethod_setup_relay
Set up Circuit Relay v2 for NAT traversal.
ddgs/dht/libp2p_client.py:402
↓ 1 callersMethodbuild_payload
Build a payload for the search request.
ddgs/base.py:53
↓ 1 callersMethodcache
Cache search results synchronously (for use from FastAPI). Args: query: The search query. results: The search results
ddgs/api_server/dht_service.py:163
↓ 1 callersFunctioncli
DDGS CLI tool.
ddgs/cli.py:162
↓ 1 callersFunctionextract_date
Extract date from string.
ddgs/engines/bing_news.py:15
↓ 1 callersFunctionextract_date
Extract date from string.
ddgs/engines/yahoo_news.py:26
↓ 1 callersMethodextract_dicts
Return a list of items, sorted by descending frequency. Each item is returned as a dict.
ddgs/results.py:146
↓ 1 callersFunctionextract_image
Sanitize image url.
ddgs/engines/yahoo_news.py:46
↓ 1 callersMethodextract_results
Extract search results from html text.
ddgs/base.py:85
↓ 1 callersFunctionextract_source
Remove ' via Yahoo' from string.
ddgs/engines/yahoo_news.py:52
↓ 1 callersFunctionextract_url
Sanitize url.
ddgs/engines/yahoo.py:12
↓ 1 callersFunctionextract_url
Sanitize url.
ddgs/engines/yahoo_news.py:40
↓ 1 callersMethodfind_peers
Find other peers in the network. Returns: List of peer addresses.
ddgs/dht/libp2p_client.py:666
↓ 1 callersMethodget
Make a GET request to the HTTP client.
ddgs/http_client.py:73
↓ 1 callersMethodget_cached
Get cached results synchronously (for use from FastAPI). Args: query: The search query. category: The search category
ddgs/api_server/dht_service.py:127
↓ 1 callersMethodget_peers
Get list of connected peers. Returns: List of peer IDs.
ddgs/api_server/dht_service.py:223
↓ 1 callersMethodget_sc
Get sc param.
ddgs/engines/startpage.py:31
↓ 1 callersFunctionget_ua
Return one random Android Google App User-Agent string.
ddgs/engines/google.py:13
↓ 1 callersMethodinvalidate
Invalidate cached results for a query. Args: query: The search query. category: The search category.
ddgs/dht/__init__.py:224
↓ 1 callersMethodis_running
Check if the client is running.
ddgs/dht/libp2p_client.py:723
↓ 1 callersMethodpost
Make a POST request to the HTTP client.
ddgs/http_client.py:77
↓ 1 callersMethodpost_extract_results
Post-process search results.
ddgs/base.py:99
↓ 1 callersMethodpre_process_html
Pre-process html_text before extracting results.
ddgs/base.py:81
↓ 1 callersMethodpre_process_html
Pre-process the HTML text before parsing it.
ddgs/engines/annasarchive.py:45
↓ 1 callersMethodrank
Rank a list of docs based on a query string.
ddgs/similarity.py:33
↓ 1 callersMethodresult_type
Get result type based on category.
ddgs/base.py:41
next →1–100 of 277, ranked by callers