MCPcopy Create free account

hub / github.com/deedy5/ddgs / functions

Functions277 in github.com/deedy5/ddgs

↓ 1 callersFunctionsafe_entry_point
Run the CLI tool in try-except block to catch all exceptions.
ddgs/cli.py:166
↓ 1 callersMethodstart
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 callersMethodstop
Stop the DHT client. Args: timeout: Maximum time to wait for service to stop.
ddgs/dht/libp2p_client.py:758
↓ 1 callersFunctionunwrap_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
Methodage
Get the age of the cached result in seconds.
ddgs/dht/types.py:39
Functionapi
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
Methodaverage_query_latency_ms
Get average DHT query latency in milliseconds.
ddgs/dht/libp2p_client.py:164
Functionbooks
CLI function to perform a DDGS books metasearch.
ddgs/cli.py:507
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/bing_images.py:22
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_videos.py:43
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/yahoo.py:35
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/yandex.py:30
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/brave.py:27
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_news.py:36
Methodbuild_payload
Build a payload for the Bing search request.
ddgs/engines/bing_news.py:53
Methodbuild_payload
Build a payload for the Bing search request.
ddgs/engines/bing.py:50
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_images.py:47
Methodbuild_payload
Build a payload for the Google search request.
ddgs/engines/google.py:51
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/grokipedia.py:24
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/annasarchive.py:33
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/wikipedia.py:25
Methodbuild_payload
Build a payload for the Startpage search request.
ddgs/engines/startpage.py:39
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/duckduckgo.py:37
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/yahoo_news.py:77
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/mojeek.py:27
Methodcache_count
Get the number of cached entries.
ddgs/dht/__init__.py:265
Methodcache_count
Get number of cached entries.
ddgs/api_server/dht_service.py:247
Functioncache_results
Cache results to DHT.
ddgs/api_server/api.py:489
Methodcache_size
Get the size of the cache in bytes.
ddgs/dht/__init__.py:272
Methodcache_size
Get cache size in bytes.
ddgs/api_server/dht_service.py:252
Methodcleanup_expired
Remove all expired entries.
ddgs/dht/cache.py:169
Methodconnect_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
Functiondht_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
Functiondht_metrics
Get DHT metrics in Prometheus format.
ddgs/api_server/api.py:593
Functiondht_peers
Get list of connected DHT peers.
ddgs/api_server/api.py:518
Functiondht_peers_detailed
Get detailed information about all connected peers.
ddgs/api_server/api.py:526
Functiondht_status
Get DHT service status.
ddgs/api_server/api.py:509
Functionextract
CLI function to extract content from a URL.
ddgs/cli.py:546
Functionextract_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
Functionextract_content
Extract text content from a URL.
ddgs/api_server/api.py:424
Functionextract_content_get
Extract text content from a URL via GET request.
ddgs/api_server/api.py:439
Methodextract_results
Extract search results from html text.
ddgs/engines/bing_images.py:45
Methodextract_results
Extract search results from lxml tree.
ddgs/engines/duckduckgo_videos.py:73
Methodextract_results
Extract search results from lxml tree.
ddgs/engines/duckduckgo_news.py:61
Methodextract_results
Extract search results from html text.
ddgs/engines/duckduckgo_images.py:84
Methodextract_results
Extract search results from html text.
ddgs/engines/grokipedia.py:37
Methodextract_results
Extract search results from html text.
ddgs/engines/wikipedia.py:44
Methodget
Make a GET request to the HTTP client.
ddgs/http_client2.py:77
Functionget_cached
Get cached results from DHT.
ddgs/api_server/api.py:478
Functionget_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
Functionhealth_check
Health check endpoint.
ddgs/api_server/api.py:143
Functionimages
CLI function to perform a DDGS images metasearch.
ddgs/cli.py:319
Functioninvalidate_cache
Invalidate cached results.
ddgs/api_server/api.py:498
Methodis_alive
Check if the node has been seen in the last 5 minutes.
ddgs/dht/types.py:19
Methodis_connected
Check if the DHT client is connected.
ddgs/dht/__init__.py:258
Methodis_fresh
Check if the cached result is still valid based on TTL.
ddgs/dht/types.py:34
← previousnext →101–200 of 277, ranked by callers