Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deedy5/ddgs
/ functions
Functions
277 in github.com/deedy5/ddgs
⨍
Functions
277
◇
Types & classes
55
↳
Endpoints
28
↓ 1 callers
Function
safe_entry_point
Run the CLI tool in try-except block to catch all exceptions.
ddgs/cli.py:166
↓ 1 callers
Method
start
Start the DHT service in background thread. Args: timeout: Maximum time to wait for service to start. Returns:
ddgs/api_server/dht_service.py:75
↓ 1 callers
Method
stop
Stop the DHT client. Args: timeout: Maximum time to wait for service to stop.
ddgs/dht/libp2p_client.py:758
↓ 1 callers
Function
unwrap_bing_url
Decode the Bing-wrapped raw_url to extract the original url.
ddgs/engines/bing.py:13
Method
__call__
(cls, *args: Any, **kwargs: Any)
ddgs/__init__.py:35
Method
__contains__
Check if a key may be present.
ddgs/dht/cache.py:47
Method
__dir__
(cls)
ddgs/__init__.py:42
Method
__enter__
Enter the context manager.
ddgs/http_client2.py:121
Method
__enter__
Enter the context manager and return the DDGS instance.
ddgs/ddgs.py:169
Method
__exit__
Exit the context manager.
ddgs/http_client2.py:144
Method
__exit__
Exit the context manager.
ddgs/ddgs.py:173
Method
__getattr__
(cls, name: str)
ddgs/__init__.py:39
Method
__init__
(self, cache_fields: set[str])
ddgs/results.py:109
Method
__init__
(self, status_code: int, content: bytes, text: str)
ddgs/http_client2.py:28
Method
__init__
Initialize the HttpClient object. Args: headers (dict, optional): headers for the HTTP client. proxy (str, optional):
ddgs/http_client2.py:37
Method
__init__
(self, proxy: str | None = None, timeout: int | None = None, *, verify: bool | str = True)
ddgs/base.py:35
Method
__init__
(self, min_token_length: int = 3)
ddgs/similarity.py:21
Method
__init__
( self, proxy: str | None = None, timeout: int | None = 5, *, verify:
ddgs/ddgs.py:147
Method
__init__
(self, resp: Any)
ddgs/http_client.py:18
Method
__init__
Initialize the HttpClient object. Args: proxy (str, optional): proxy for the HTTP client, supports http/https/socks5 protocols.
ddgs/http_client.py:43
Method
__init__
(self, size: int = NEGATIVE_CACHE_SIZE, hash_count: int = 3)
ddgs/dht/cache.py:23
Method
__init__
(self, db_path: str | None = None)
ddgs/dht/cache.py:56
Method
__init__
( self, *, enable_dht: bool = True, listen_port: int = 0, cache_ttl: i
ddgs/dht/__init__.py:63
Method
__init__
( self, *, listen_port: int = 0, bootstrap: bool = True, max_hop_conne
ddgs/dht/libp2p_client.py:119
Method
__init__
( self, *, listen_port: int = 0, cache_ttl: int = DEFAULT_TTL, max_hop
ddgs/api_server/dht_service.py:23
Method
__init__
Temporary, delete when HttpClient is fixed.
ddgs/engines/duckduckgo.py:32
Method
__len__
Return the number of items in the cache.
ddgs/results.py:124
Method
__len__
Get total number of cached entries.
ddgs/dht/cache.py:184
Method
_cache_worker
()
ddgs/ddgs.py:276
Function
_cleanup_api_process
Cleanup any spawned API server process on exit.
ddgs/ddgs.py:42
Method
_connect
()
ddgs/dht/libp2p_client.py:473
Function
_convert_tuple_to_csv
(_ctx: click.Context, _param: click.Parameter, value: tuple[str] | None)
ddgs/cli.py:45
Function
_download_file
(url: str, dir_path: str, filename: str, proxy: str | None, *, verify: bool)
ddgs/cli.py:114
Method
_find_peers
()
ddgs/dht/libp2p_client.py:678
Method
_get
()
ddgs/dht/libp2p_client.py:542
Method
_main
()
ddgs/dht/libp2p_client.py:312
Method
_main
()
ddgs/api_server/dht_service.py:45
Function
_normalize_date
Normalize date from integer to ISO format if applicable.
ddgs/utils.py:63
Function
_normalize_text
Normalize text. Strip HTML tags, unescape HTML entities, normalize Unicode, remove "c" category characters, and collapse whitespace.
ddgs/utils.py:36
Function
_normalize_url
Unquote URL and replace spaces with '+'.
ddgs/utils.py:31
Function
_run_loop
()
ddgs/ddgs.py:112
Method
_run_refresh_task
Background task to refresh DHT records periodically.
ddgs/dht/libp2p_client.py:268
Method
_run_trio
Run Trio event loop in background thread with all DHT operations.
ddgs/dht/libp2p_client.py:309
Method
_run_trio
Run Trio event loop in background thread.
ddgs/api_server/dht_service.py:42
Method
_runner
()
ddgs/dht/libp2p_client.py:508
Method
_send_connection_init
(self: httpcore._sync.http2.HTTP2Connection, request: httpcore.Request)
ddgs/http_client2.py:124
Method
_set
()
ddgs/dht/libp2p_client.py:599
Method
_wrapped
()
ddgs/api_server/dht_service.py:121
Method
age
Get the age of the cached result in seconds.
ddgs/dht/types.py:39
Function
api
Start/stop the DDGS API server. Starts a FastAPI server with REST endpoints for search tools. Supports text, image, news, video, and book sea
ddgs/cli.py:606
Method
average_query_latency_ms
Get average DHT query latency in milliseconds.
ddgs/dht/libp2p_client.py:164
Function
books
CLI function to perform a DDGS books metasearch.
ddgs/cli.py:507
Method
build_payload
Build a payload for the search request.
ddgs/engines/bing_images.py:22
Method
build_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_videos.py:43
Method
build_payload
Build a payload for the search request.
ddgs/engines/yahoo.py:35
Method
build_payload
Build a payload for the search request.
ddgs/engines/yandex.py:30
Method
build_payload
Build a payload for the search request.
ddgs/engines/brave.py:27
Method
build_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_news.py:36
Method
build_payload
Build a payload for the Bing search request.
ddgs/engines/bing_news.py:53
Method
build_payload
Build a payload for the Bing search request.
ddgs/engines/bing.py:50
Method
build_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_images.py:47
Method
build_payload
Build a payload for the Google search request.
ddgs/engines/google.py:51
Method
build_payload
Build a payload for the search request.
ddgs/engines/grokipedia.py:24
Method
build_payload
Build a payload for the search request.
ddgs/engines/annasarchive.py:33
Method
build_payload
Build a payload for the search request.
ddgs/engines/wikipedia.py:25
Method
build_payload
Build a payload for the Startpage search request.
ddgs/engines/startpage.py:39
Method
build_payload
Build a payload for the search request.
ddgs/engines/duckduckgo.py:37
Method
build_payload
Build a payload for the search request.
ddgs/engines/yahoo_news.py:77
Method
build_payload
Build a payload for the search request.
ddgs/engines/mojeek.py:27
Method
cache_count
Get the number of cached entries.
ddgs/dht/__init__.py:265
Method
cache_count
Get number of cached entries.
ddgs/api_server/dht_service.py:247
Function
cache_results
Cache results to DHT.
ddgs/api_server/api.py:489
Method
cache_size
Get the size of the cache in bytes.
ddgs/dht/__init__.py:272
Method
cache_size
Get cache size in bytes.
ddgs/api_server/dht_service.py:252
Method
cleanup_expired
Remove all expired entries.
ddgs/dht/cache.py:169
Method
connect_peer
Connect to a specific peer. Args: peer_addr: The multiaddress of the peer to connect to. Returns: True if co
ddgs/dht/libp2p_client.py:458
Function
dht_map
Get local DHT network map view as graph structure. Each node only sees its own routing table neighborhood. No global crawling, no gos
ddgs/api_server/api.py:534
Function
dht_metrics
Get DHT metrics in Prometheus format.
ddgs/api_server/api.py:593
Function
dht_peers
Get list of connected DHT peers.
ddgs/api_server/api.py:518
Function
dht_peers_detailed
Get detailed information about all connected peers.
ddgs/api_server/api.py:526
Function
dht_status
Get DHT service status.
ddgs/api_server/api.py:509
Function
extract
CLI function to extract content from a URL.
ddgs/cli.py:546
Function
extract_content
Extract content from a URL. Args: url: The URL to fetch and extract content from. fmt: Output format: "text_markdown", "text_plai
ddgs/api_server/mcp.py:230
Function
extract_content
Extract text content from a URL.
ddgs/api_server/api.py:424
Function
extract_content_get
Extract text content from a URL via GET request.
ddgs/api_server/api.py:439
Method
extract_results
Extract search results from html text.
ddgs/engines/bing_images.py:45
Method
extract_results
Extract search results from lxml tree.
ddgs/engines/duckduckgo_videos.py:73
Method
extract_results
Extract search results from lxml tree.
ddgs/engines/duckduckgo_news.py:61
Method
extract_results
Extract search results from html text.
ddgs/engines/duckduckgo_images.py:84
Method
extract_results
Extract search results from html text.
ddgs/engines/grokipedia.py:37
Method
extract_results
Extract search results from html text.
ddgs/engines/wikipedia.py:44
Method
get
Make a GET request to the HTTP client.
ddgs/http_client2.py:77
Function
get_cached
Get cached results from DHT.
ddgs/api_server/api.py:478
Function
get_dht_client
Get a shared DHT client instance. Args: api_url: URL of the ddgs API service. If None, uses direct mode. Returns: A started
ddgs/dht/__init__.py:279
Function
health_check
Health check endpoint.
ddgs/api_server/api.py:143
Function
images
CLI function to perform a DDGS images metasearch.
ddgs/cli.py:319
Function
invalidate_cache
Invalidate cached results.
ddgs/api_server/api.py:498
Method
is_alive
Check if the node has been seen in the last 5 minutes.
ddgs/dht/types.py:19
Method
is_connected
Check if the DHT client is connected.
ddgs/dht/__init__.py:258
Method
is_fresh
Check if the cached result is still valid based on TTL.
ddgs/dht/types.py:34
← previous
next →
101–200 of 277, ranked by callers