webscout 8.2.6__py3-none-any.whl → 8.2.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of webscout might be problematic. Click here for more details.
- webscout/AIutel.py +97 -87
- webscout/version.py +1 -1
- {webscout-8.2.6.dist-info → webscout-8.2.7.dist-info}/METADATA +2 -15
- webscout-8.2.7.dist-info/RECORD +26 -0
- {webscout-8.2.6.dist-info → webscout-8.2.7.dist-info}/WHEEL +1 -1
- webscout-8.2.7.dist-info/entry_points.txt +3 -0
- webscout-8.2.7.dist-info/top_level.txt +1 -0
- webscout/Extra/GitToolkit/__init__.py +0 -10
- webscout/Extra/GitToolkit/gitapi/__init__.py +0 -12
- webscout/Extra/GitToolkit/gitapi/repository.py +0 -195
- webscout/Extra/GitToolkit/gitapi/user.py +0 -96
- webscout/Extra/GitToolkit/gitapi/utils.py +0 -62
- webscout/Extra/YTToolkit/YTdownloader.py +0 -957
- webscout/Extra/YTToolkit/__init__.py +0 -3
- webscout/Extra/YTToolkit/transcriber.py +0 -476
- webscout/Extra/YTToolkit/ytapi/__init__.py +0 -6
- webscout/Extra/YTToolkit/ytapi/channel.py +0 -307
- webscout/Extra/YTToolkit/ytapi/errors.py +0 -13
- webscout/Extra/YTToolkit/ytapi/extras.py +0 -45
- webscout/Extra/YTToolkit/ytapi/https.py +0 -88
- webscout/Extra/YTToolkit/ytapi/patterns.py +0 -61
- webscout/Extra/YTToolkit/ytapi/playlist.py +0 -59
- webscout/Extra/YTToolkit/ytapi/pool.py +0 -8
- webscout/Extra/YTToolkit/ytapi/query.py +0 -40
- webscout/Extra/YTToolkit/ytapi/stream.py +0 -63
- webscout/Extra/YTToolkit/ytapi/utils.py +0 -62
- webscout/Extra/YTToolkit/ytapi/video.py +0 -232
- webscout/Extra/__init__.py +0 -7
- webscout/Extra/autocoder/__init__.py +0 -9
- webscout/Extra/autocoder/autocoder.py +0 -910
- webscout/Extra/autocoder/autocoder_utiles.py +0 -332
- webscout/Extra/gguf.py +0 -684
- webscout/Extra/tempmail/__init__.py +0 -28
- webscout/Extra/tempmail/async_utils.py +0 -141
- webscout/Extra/tempmail/base.py +0 -161
- webscout/Extra/tempmail/cli.py +0 -187
- webscout/Extra/tempmail/emailnator.py +0 -84
- webscout/Extra/tempmail/mail_tm.py +0 -361
- webscout/Extra/tempmail/temp_mail_io.py +0 -292
- webscout/Extra/weather.py +0 -194
- webscout/Extra/weather_ascii.py +0 -76
- webscout/Litlogger/__init__.py +0 -67
- webscout/Litlogger/core/__init__.py +0 -6
- webscout/Litlogger/core/level.py +0 -23
- webscout/Litlogger/core/logger.py +0 -165
- webscout/Litlogger/handlers/__init__.py +0 -12
- webscout/Litlogger/handlers/console.py +0 -33
- webscout/Litlogger/handlers/file.py +0 -143
- webscout/Litlogger/handlers/network.py +0 -173
- webscout/Litlogger/styles/__init__.py +0 -7
- webscout/Litlogger/styles/colors.py +0 -249
- webscout/Litlogger/styles/formats.py +0 -458
- webscout/Litlogger/styles/text.py +0 -87
- webscout/Litlogger/utils/__init__.py +0 -6
- webscout/Litlogger/utils/detectors.py +0 -153
- webscout/Litlogger/utils/formatters.py +0 -200
- webscout/Provider/AI21.py +0 -177
- webscout/Provider/AISEARCH/DeepFind.py +0 -250
- webscout/Provider/AISEARCH/ISou.py +0 -256
- webscout/Provider/AISEARCH/Perplexity.py +0 -359
- webscout/Provider/AISEARCH/__init__.py +0 -10
- webscout/Provider/AISEARCH/felo_search.py +0 -228
- webscout/Provider/AISEARCH/genspark_search.py +0 -208
- webscout/Provider/AISEARCH/hika_search.py +0 -198
- webscout/Provider/AISEARCH/iask_search.py +0 -436
- webscout/Provider/AISEARCH/monica_search.py +0 -246
- webscout/Provider/AISEARCH/scira_search.py +0 -322
- webscout/Provider/AISEARCH/webpilotai_search.py +0 -281
- webscout/Provider/Aitopia.py +0 -316
- webscout/Provider/AllenAI.py +0 -447
- webscout/Provider/Andi.py +0 -228
- webscout/Provider/Blackboxai.py +0 -229
- webscout/Provider/ChatGPTClone.py +0 -237
- webscout/Provider/ChatGPTGratis.py +0 -194
- webscout/Provider/ChatSandbox.py +0 -342
- webscout/Provider/Cloudflare.py +0 -325
- webscout/Provider/Cohere.py +0 -208
- webscout/Provider/Deepinfra.py +0 -338
- webscout/Provider/ElectronHub.py +0 -773
- webscout/Provider/ExaAI.py +0 -261
- webscout/Provider/ExaChat.py +0 -358
- webscout/Provider/Free2GPT.py +0 -241
- webscout/Provider/GPTWeb.py +0 -249
- webscout/Provider/Gemini.py +0 -169
- webscout/Provider/GithubChat.py +0 -370
- webscout/Provider/GizAI.py +0 -285
- webscout/Provider/Glider.py +0 -222
- webscout/Provider/Groq.py +0 -801
- webscout/Provider/HF_space/__init__.py +0 -0
- webscout/Provider/HF_space/qwen_qwen2.py +0 -206
- webscout/Provider/HeckAI.py +0 -257
- webscout/Provider/HuggingFaceChat.py +0 -469
- webscout/Provider/Hunyuan.py +0 -283
- webscout/Provider/Jadve.py +0 -291
- webscout/Provider/Koboldai.py +0 -381
- webscout/Provider/LambdaChat.py +0 -411
- webscout/Provider/Llama3.py +0 -259
- webscout/Provider/MCPCore.py +0 -315
- webscout/Provider/Marcus.py +0 -206
- webscout/Provider/Nemotron.py +0 -218
- webscout/Provider/Netwrck.py +0 -270
- webscout/Provider/OLLAMA.py +0 -396
- webscout/Provider/OPENAI/__init__.py +0 -28
- webscout/Provider/OPENAI/ai4chat.py +0 -286
- webscout/Provider/OPENAI/base.py +0 -46
- webscout/Provider/OPENAI/c4ai.py +0 -367
- webscout/Provider/OPENAI/chatgpt.py +0 -549
- webscout/Provider/OPENAI/chatgptclone.py +0 -481
- webscout/Provider/OPENAI/deepinfra.py +0 -309
- webscout/Provider/OPENAI/e2b.py +0 -1350
- webscout/Provider/OPENAI/exaai.py +0 -404
- webscout/Provider/OPENAI/exachat.py +0 -437
- webscout/Provider/OPENAI/freeaichat.py +0 -352
- webscout/Provider/OPENAI/glider.py +0 -316
- webscout/Provider/OPENAI/groq.py +0 -354
- webscout/Provider/OPENAI/heckai.py +0 -341
- webscout/Provider/OPENAI/llmchatco.py +0 -327
- webscout/Provider/OPENAI/mcpcore.py +0 -376
- webscout/Provider/OPENAI/multichat.py +0 -368
- webscout/Provider/OPENAI/netwrck.py +0 -350
- webscout/Provider/OPENAI/opkfc.py +0 -488
- webscout/Provider/OPENAI/scirachat.py +0 -462
- webscout/Provider/OPENAI/sonus.py +0 -294
- webscout/Provider/OPENAI/standardinput.py +0 -425
- webscout/Provider/OPENAI/textpollinations.py +0 -329
- webscout/Provider/OPENAI/toolbaz.py +0 -406
- webscout/Provider/OPENAI/typegpt.py +0 -346
- webscout/Provider/OPENAI/uncovrAI.py +0 -455
- webscout/Provider/OPENAI/utils.py +0 -211
- webscout/Provider/OPENAI/venice.py +0 -413
- webscout/Provider/OPENAI/wisecat.py +0 -381
- webscout/Provider/OPENAI/writecream.py +0 -156
- webscout/Provider/OPENAI/x0gpt.py +0 -371
- webscout/Provider/OPENAI/yep.py +0 -327
- webscout/Provider/OpenGPT.py +0 -209
- webscout/Provider/Openai.py +0 -496
- webscout/Provider/PI.py +0 -429
- webscout/Provider/Perplexitylabs.py +0 -415
- webscout/Provider/QwenLM.py +0 -254
- webscout/Provider/Reka.py +0 -214
- webscout/Provider/StandardInput.py +0 -290
- webscout/Provider/TTI/AiForce/__init__.py +0 -22
- webscout/Provider/TTI/AiForce/async_aiforce.py +0 -224
- webscout/Provider/TTI/AiForce/sync_aiforce.py +0 -245
- webscout/Provider/TTI/FreeAIPlayground/__init__.py +0 -9
- webscout/Provider/TTI/FreeAIPlayground/async_freeaiplayground.py +0 -181
- webscout/Provider/TTI/FreeAIPlayground/sync_freeaiplayground.py +0 -180
- webscout/Provider/TTI/ImgSys/__init__.py +0 -23
- webscout/Provider/TTI/ImgSys/async_imgsys.py +0 -202
- webscout/Provider/TTI/ImgSys/sync_imgsys.py +0 -195
- webscout/Provider/TTI/MagicStudio/__init__.py +0 -2
- webscout/Provider/TTI/MagicStudio/async_magicstudio.py +0 -111
- webscout/Provider/TTI/MagicStudio/sync_magicstudio.py +0 -109
- webscout/Provider/TTI/Nexra/__init__.py +0 -22
- webscout/Provider/TTI/Nexra/async_nexra.py +0 -286
- webscout/Provider/TTI/Nexra/sync_nexra.py +0 -258
- webscout/Provider/TTI/PollinationsAI/__init__.py +0 -23
- webscout/Provider/TTI/PollinationsAI/async_pollinations.py +0 -311
- webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +0 -265
- webscout/Provider/TTI/__init__.py +0 -12
- webscout/Provider/TTI/aiarta/__init__.py +0 -2
- webscout/Provider/TTI/aiarta/async_aiarta.py +0 -482
- webscout/Provider/TTI/aiarta/sync_aiarta.py +0 -440
- webscout/Provider/TTI/artbit/__init__.py +0 -22
- webscout/Provider/TTI/artbit/async_artbit.py +0 -155
- webscout/Provider/TTI/artbit/sync_artbit.py +0 -148
- webscout/Provider/TTI/fastflux/__init__.py +0 -22
- webscout/Provider/TTI/fastflux/async_fastflux.py +0 -261
- webscout/Provider/TTI/fastflux/sync_fastflux.py +0 -252
- webscout/Provider/TTI/huggingface/__init__.py +0 -22
- webscout/Provider/TTI/huggingface/async_huggingface.py +0 -199
- webscout/Provider/TTI/huggingface/sync_huggingface.py +0 -195
- webscout/Provider/TTI/piclumen/__init__.py +0 -23
- webscout/Provider/TTI/piclumen/async_piclumen.py +0 -268
- webscout/Provider/TTI/piclumen/sync_piclumen.py +0 -233
- webscout/Provider/TTI/pixelmuse/__init__.py +0 -4
- webscout/Provider/TTI/pixelmuse/async_pixelmuse.py +0 -249
- webscout/Provider/TTI/pixelmuse/sync_pixelmuse.py +0 -182
- webscout/Provider/TTI/talkai/__init__.py +0 -4
- webscout/Provider/TTI/talkai/async_talkai.py +0 -229
- webscout/Provider/TTI/talkai/sync_talkai.py +0 -207
- webscout/Provider/TTS/__init__.py +0 -8
- webscout/Provider/TTS/base.py +0 -159
- webscout/Provider/TTS/deepgram.py +0 -156
- webscout/Provider/TTS/elevenlabs.py +0 -111
- webscout/Provider/TTS/gesserit.py +0 -128
- webscout/Provider/TTS/murfai.py +0 -113
- webscout/Provider/TTS/parler.py +0 -111
- webscout/Provider/TTS/speechma.py +0 -180
- webscout/Provider/TTS/streamElements.py +0 -333
- webscout/Provider/TTS/utils.py +0 -280
- webscout/Provider/TeachAnything.py +0 -233
- webscout/Provider/TextPollinationsAI.py +0 -306
- webscout/Provider/TwoAI.py +0 -280
- webscout/Provider/TypliAI.py +0 -305
- webscout/Provider/Venice.py +0 -258
- webscout/Provider/VercelAI.py +0 -253
- webscout/Provider/WiseCat.py +0 -233
- webscout/Provider/WrDoChat.py +0 -370
- webscout/Provider/Writecream.py +0 -237
- webscout/Provider/WritingMate.py +0 -269
- webscout/Provider/Youchat.py +0 -330
- webscout/Provider/__init__.py +0 -178
- webscout/Provider/ai4chat.py +0 -203
- webscout/Provider/aimathgpt.py +0 -189
- webscout/Provider/akashgpt.py +0 -335
- webscout/Provider/asksteve.py +0 -212
- webscout/Provider/bagoodex.py +0 -145
- webscout/Provider/cerebras.py +0 -288
- webscout/Provider/chatglm.py +0 -215
- webscout/Provider/cleeai.py +0 -213
- webscout/Provider/copilot.py +0 -425
- webscout/Provider/elmo.py +0 -283
- webscout/Provider/freeaichat.py +0 -285
- webscout/Provider/geminiapi.py +0 -208
- webscout/Provider/geminiprorealtime.py +0 -160
- webscout/Provider/granite.py +0 -235
- webscout/Provider/hermes.py +0 -266
- webscout/Provider/julius.py +0 -223
- webscout/Provider/koala.py +0 -268
- webscout/Provider/learnfastai.py +0 -325
- webscout/Provider/llama3mitril.py +0 -215
- webscout/Provider/llmchat.py +0 -255
- webscout/Provider/llmchatco.py +0 -306
- webscout/Provider/meta.py +0 -798
- webscout/Provider/multichat.py +0 -364
- webscout/Provider/scira_chat.py +0 -297
- webscout/Provider/scnet.py +0 -243
- webscout/Provider/searchchat.py +0 -292
- webscout/Provider/sonus.py +0 -258
- webscout/Provider/talkai.py +0 -194
- webscout/Provider/toolbaz.py +0 -353
- webscout/Provider/turboseek.py +0 -266
- webscout/Provider/typefully.py +0 -330
- webscout/Provider/typegpt.py +0 -289
- webscout/Provider/uncovr.py +0 -368
- webscout/Provider/x0gpt.py +0 -299
- webscout/Provider/yep.py +0 -389
- webscout/litagent/__init__.py +0 -29
- webscout/litagent/agent.py +0 -455
- webscout/litagent/constants.py +0 -60
- webscout/litprinter/__init__.py +0 -59
- webscout/scout/__init__.py +0 -8
- webscout/scout/core/__init__.py +0 -7
- webscout/scout/core/crawler.py +0 -140
- webscout/scout/core/scout.py +0 -568
- webscout/scout/core/search_result.py +0 -96
- webscout/scout/core/text_analyzer.py +0 -63
- webscout/scout/core/text_utils.py +0 -277
- webscout/scout/core/web_analyzer.py +0 -52
- webscout/scout/core.py +0 -881
- webscout/scout/element.py +0 -460
- webscout/scout/parsers/__init__.py +0 -69
- webscout/scout/parsers/html5lib_parser.py +0 -172
- webscout/scout/parsers/html_parser.py +0 -236
- webscout/scout/parsers/lxml_parser.py +0 -178
- webscout/scout/utils.py +0 -37
- webscout/swiftcli/__init__.py +0 -95
- webscout/swiftcli/core/__init__.py +0 -7
- webscout/swiftcli/core/cli.py +0 -297
- webscout/swiftcli/core/context.py +0 -104
- webscout/swiftcli/core/group.py +0 -241
- webscout/swiftcli/decorators/__init__.py +0 -28
- webscout/swiftcli/decorators/command.py +0 -221
- webscout/swiftcli/decorators/options.py +0 -220
- webscout/swiftcli/decorators/output.py +0 -252
- webscout/swiftcli/exceptions.py +0 -21
- webscout/swiftcli/plugins/__init__.py +0 -9
- webscout/swiftcli/plugins/base.py +0 -135
- webscout/swiftcli/plugins/manager.py +0 -262
- webscout/swiftcli/utils/__init__.py +0 -59
- webscout/swiftcli/utils/formatting.py +0 -252
- webscout/swiftcli/utils/parsing.py +0 -267
- webscout/zeroart/__init__.py +0 -55
- webscout/zeroart/base.py +0 -60
- webscout/zeroart/effects.py +0 -99
- webscout/zeroart/fonts.py +0 -816
- webscout-8.2.6.dist-info/RECORD +0 -307
- webscout-8.2.6.dist-info/entry_points.txt +0 -3
- webscout-8.2.6.dist-info/top_level.txt +0 -2
- webstoken/__init__.py +0 -30
- webstoken/classifier.py +0 -189
- webstoken/keywords.py +0 -216
- webstoken/language.py +0 -128
- webstoken/ner.py +0 -164
- webstoken/normalizer.py +0 -35
- webstoken/processor.py +0 -77
- webstoken/sentiment.py +0 -206
- webstoken/stemmer.py +0 -73
- webstoken/tagger.py +0 -60
- webstoken/tokenizer.py +0 -158
- {webscout-8.2.6.dist-info → webscout-8.2.7.dist-info}/licenses/LICENSE.md +0 -0
webscout/AIutel.py
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
-
import
|
|
3
|
-
import subprocess
|
|
4
|
-
from typing import Union, Optional, Dict, Any, Iterable, Generator, List, Callable, Literal, Tuple
|
|
5
|
-
import io
|
|
6
|
-
from collections import deque
|
|
2
|
+
from typing import Union, Optional, Dict, Any, Iterable, Generator, List, Callable, Literal
|
|
7
3
|
import codecs
|
|
8
4
|
|
|
9
5
|
# Expanded encoding types
|
|
@@ -23,34 +19,34 @@ def _process_chunk(
|
|
|
23
19
|
if not isinstance(chunk, str):
|
|
24
20
|
return None
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if intro_value and skip_markers:
|
|
30
|
-
for marker in skip_markers:
|
|
31
|
-
combined_marker = f"{intro_value}{marker}"
|
|
32
|
-
if sanitized_chunk.startswith(combined_marker):
|
|
33
|
-
return None
|
|
22
|
+
# Fast path for empty chunks
|
|
23
|
+
if not chunk:
|
|
24
|
+
return None
|
|
34
25
|
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
# Use slicing for prefix removal (faster than startswith+slicing)
|
|
27
|
+
sanitized_chunk = chunk
|
|
28
|
+
if intro_value and len(chunk) >= len(intro_value) and chunk[:len(intro_value)] == intro_value:
|
|
29
|
+
sanitized_chunk = chunk[len(intro_value):]
|
|
37
30
|
|
|
31
|
+
# Optimize string stripping operations
|
|
38
32
|
if strip_chars is not None:
|
|
39
33
|
sanitized_chunk = sanitized_chunk.strip(strip_chars)
|
|
40
34
|
else:
|
|
35
|
+
# lstrip() is faster than strip() when we only need leading whitespace removed
|
|
41
36
|
sanitized_chunk = sanitized_chunk.lstrip()
|
|
42
37
|
|
|
43
|
-
#
|
|
44
|
-
if not sanitized_chunk or any(
|
|
45
|
-
marker in sanitized_chunk or sanitized_chunk == marker
|
|
46
|
-
for marker in skip_markers
|
|
47
|
-
):
|
|
38
|
+
# Skip empty chunks and markers
|
|
39
|
+
if not sanitized_chunk or any(marker == sanitized_chunk for marker in skip_markers):
|
|
48
40
|
return None
|
|
49
41
|
|
|
42
|
+
# JSON parsing with optimized error handling
|
|
50
43
|
if to_json:
|
|
51
44
|
try:
|
|
45
|
+
# Only strip before JSON parsing if needed
|
|
46
|
+
if sanitized_chunk[0] not in '{[' or sanitized_chunk[-1] not in '}]':
|
|
47
|
+
sanitized_chunk = sanitized_chunk.strip()
|
|
52
48
|
return json.loads(sanitized_chunk)
|
|
53
|
-
except (json.JSONDecodeError, Exception)
|
|
49
|
+
except (json.JSONDecodeError, Exception):
|
|
54
50
|
return sanitized_chunk if yield_raw_on_error else None
|
|
55
51
|
|
|
56
52
|
return sanitized_chunk
|
|
@@ -58,7 +54,8 @@ def _process_chunk(
|
|
|
58
54
|
def _decode_byte_stream(
|
|
59
55
|
byte_iterator: Iterable[bytes],
|
|
60
56
|
encoding: EncodingType = 'utf-8',
|
|
61
|
-
errors: str = 'replace'
|
|
57
|
+
errors: str = 'replace',
|
|
58
|
+
buffer_size: int = 8192
|
|
62
59
|
) -> Generator[str, None, None]:
|
|
63
60
|
"""
|
|
64
61
|
Realtime byte stream decoder with flexible encoding support.
|
|
@@ -67,6 +64,7 @@ def _decode_byte_stream(
|
|
|
67
64
|
byte_iterator: Iterator yielding bytes
|
|
68
65
|
encoding: Character encoding to use
|
|
69
66
|
errors: How to handle encoding errors ('strict', 'ignore', 'replace')
|
|
67
|
+
buffer_size: Size of internal buffer for performance tuning
|
|
70
68
|
"""
|
|
71
69
|
# Initialize decoder with the specified encoding
|
|
72
70
|
try:
|
|
@@ -76,13 +74,21 @@ def _decode_byte_stream(
|
|
|
76
74
|
decoder = codecs.getincrementaldecoder('utf-8')(errors=errors)
|
|
77
75
|
|
|
78
76
|
# Process byte stream in realtime
|
|
77
|
+
buffer = bytearray(buffer_size)
|
|
78
|
+
buffer_view = memoryview(buffer)
|
|
79
|
+
|
|
79
80
|
for chunk_bytes in byte_iterator:
|
|
80
81
|
if not chunk_bytes:
|
|
81
82
|
continue
|
|
82
83
|
|
|
83
84
|
try:
|
|
84
|
-
#
|
|
85
|
-
|
|
85
|
+
# Use buffer for processing if chunk size is appropriate
|
|
86
|
+
if len(chunk_bytes) <= buffer_size:
|
|
87
|
+
buffer[:len(chunk_bytes)] = chunk_bytes
|
|
88
|
+
text = decoder.decode(buffer_view[:len(chunk_bytes)], final=False)
|
|
89
|
+
else:
|
|
90
|
+
text = decoder.decode(chunk_bytes, final=False)
|
|
91
|
+
|
|
86
92
|
if text:
|
|
87
93
|
yield text
|
|
88
94
|
except UnicodeDecodeError:
|
|
@@ -95,8 +101,9 @@ def _decode_byte_stream(
|
|
|
95
101
|
yield final_text
|
|
96
102
|
except UnicodeDecodeError:
|
|
97
103
|
yield f"[Encoding Error: Could not decode final bytes with {encoding}]\n"
|
|
104
|
+
|
|
98
105
|
def sanitize_stream(
|
|
99
|
-
data: Union[str,
|
|
106
|
+
data: Union[str, Iterable[str], Iterable[bytes]],
|
|
100
107
|
intro_value: str = "data:",
|
|
101
108
|
to_json: bool = True,
|
|
102
109
|
skip_markers: Optional[List[str]] = None,
|
|
@@ -107,17 +114,17 @@ def sanitize_stream(
|
|
|
107
114
|
yield_raw_on_error: bool = True,
|
|
108
115
|
encoding: EncodingType = 'utf-8',
|
|
109
116
|
encoding_errors: str = 'replace',
|
|
110
|
-
|
|
117
|
+
buffer_size: int = 8192,
|
|
111
118
|
) -> Generator[Any, None, None]:
|
|
112
119
|
"""
|
|
113
|
-
|
|
120
|
+
Optimized realtime stream processor that handles string/byte streams with minimal latency.
|
|
114
121
|
|
|
115
122
|
Features:
|
|
116
123
|
- Direct realtime processing of byte streams
|
|
117
124
|
- Optimized string handling and JSON parsing
|
|
118
125
|
- Robust error handling and validation
|
|
119
|
-
- Flexible encoding support
|
|
120
|
-
-
|
|
126
|
+
- Flexible encoding support with memory-efficient buffering
|
|
127
|
+
- High performance for large streams
|
|
121
128
|
|
|
122
129
|
Args:
|
|
123
130
|
data: Input data (string, string iterator, or bytes iterator)
|
|
@@ -129,93 +136,91 @@ def sanitize_stream(
|
|
|
129
136
|
end_marker: Processing end marker
|
|
130
137
|
content_extractor: Function to extract content
|
|
131
138
|
yield_raw_on_error: Yield raw content on JSON errors
|
|
132
|
-
encoding: Character encoding for byte streams
|
|
133
|
-
encoding_errors: How to handle encoding errors
|
|
134
|
-
|
|
139
|
+
encoding: Character encoding for byte streams
|
|
140
|
+
encoding_errors: How to handle encoding errors
|
|
141
|
+
buffer_size: Size of internal processing buffer
|
|
135
142
|
|
|
136
143
|
Yields:
|
|
137
144
|
Processed chunks (string or dictionary)
|
|
138
|
-
|
|
139
|
-
Example:
|
|
140
|
-
>>> # Process response content
|
|
141
|
-
>>> for chunk in sanitize_stream(response.iter_content()):
|
|
142
|
-
... process_chunk(chunk)
|
|
143
|
-
|
|
144
|
-
>>> # Process a stream with specific encoding
|
|
145
|
-
>>> for text in sanitize_stream(byte_stream, encoding='latin1', to_json=False):
|
|
146
|
-
... process_text(text)
|
|
147
145
|
"""
|
|
148
146
|
effective_skip_markers = skip_markers or []
|
|
149
147
|
processing_active = start_marker is None
|
|
150
148
|
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
# Fast path for single string processing
|
|
150
|
+
if isinstance(data, str):
|
|
153
151
|
processed_item = None
|
|
154
|
-
if
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
elif processing_active and end_marker is not None and data == end_marker:
|
|
166
|
-
processing_active = False
|
|
167
|
-
|
|
168
|
-
if processing_active:
|
|
152
|
+
if processing_active:
|
|
153
|
+
# Optimize JSON parsing for large strings
|
|
154
|
+
if to_json:
|
|
155
|
+
try:
|
|
156
|
+
# Use faster JSON parser for large strings
|
|
157
|
+
data = data.strip()
|
|
158
|
+
if data:
|
|
159
|
+
processed_item = json.loads(data)
|
|
160
|
+
except json.JSONDecodeError:
|
|
161
|
+
processed_item = data if yield_raw_on_error else None
|
|
162
|
+
else:
|
|
169
163
|
processed_item = _process_chunk(
|
|
170
|
-
data, intro_value,
|
|
164
|
+
data, intro_value, False, effective_skip_markers,
|
|
171
165
|
strip_chars, yield_raw_on_error
|
|
172
166
|
)
|
|
173
167
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
168
|
+
if processed_item is not None:
|
|
169
|
+
if content_extractor:
|
|
170
|
+
try:
|
|
171
|
+
final_content = content_extractor(processed_item)
|
|
172
|
+
if final_content is not None:
|
|
173
|
+
yield final_content
|
|
174
|
+
except Exception:
|
|
175
|
+
pass
|
|
176
|
+
else:
|
|
177
|
+
yield processed_item
|
|
178
|
+
return
|
|
179
|
+
|
|
180
|
+
# Stream processing path
|
|
181
|
+
if not hasattr(data, '__iter__'):
|
|
182
|
+
raise TypeError(f"Input must be a string or an iterable, not {type(data).__name__}")
|
|
183
|
+
|
|
184
|
+
try:
|
|
185
|
+
iterator = iter(data)
|
|
186
|
+
first_item = next(iterator, None)
|
|
187
|
+
if first_item is None:
|
|
192
188
|
return
|
|
193
|
-
|
|
189
|
+
|
|
190
|
+
# Efficient streaming with itertools
|
|
194
191
|
from itertools import chain
|
|
195
|
-
stream = chain([first_item],
|
|
192
|
+
stream = chain([first_item], iterator)
|
|
196
193
|
|
|
197
|
-
#
|
|
194
|
+
# Determine if we're dealing with bytes or strings
|
|
198
195
|
if isinstance(first_item, bytes):
|
|
199
196
|
line_iterator = _decode_byte_stream(
|
|
200
197
|
stream,
|
|
201
198
|
encoding=encoding,
|
|
202
|
-
errors=encoding_errors
|
|
199
|
+
errors=encoding_errors,
|
|
200
|
+
buffer_size=buffer_size
|
|
203
201
|
)
|
|
204
202
|
elif isinstance(first_item, str):
|
|
205
203
|
line_iterator = stream
|
|
206
204
|
else:
|
|
207
205
|
raise TypeError(f"Stream must yield strings or bytes, not {type(first_item).__name__}")
|
|
208
206
|
|
|
209
|
-
# Process stream
|
|
207
|
+
# Process stream with minimal allocations
|
|
210
208
|
for line in line_iterator:
|
|
211
|
-
if not
|
|
212
|
-
|
|
209
|
+
if not line:
|
|
210
|
+
continue
|
|
211
|
+
|
|
212
|
+
# Handle markers efficiently
|
|
213
|
+
if not processing_active and start_marker is not None:
|
|
214
|
+
if line.strip() == start_marker:
|
|
215
|
+
processing_active = True
|
|
213
216
|
continue
|
|
214
|
-
|
|
217
|
+
|
|
218
|
+
if processing_active and end_marker is not None and line.strip() == end_marker:
|
|
215
219
|
processing_active = False
|
|
216
220
|
continue
|
|
217
221
|
|
|
218
222
|
if processing_active:
|
|
223
|
+
# Process chunk with optimized function
|
|
219
224
|
processed = _process_chunk(
|
|
220
225
|
line, intro_value, to_json, effective_skip_markers,
|
|
221
226
|
strip_chars, yield_raw_on_error
|
|
@@ -228,11 +233,16 @@ def sanitize_stream(
|
|
|
228
233
|
if final_content is not None:
|
|
229
234
|
yield final_content
|
|
230
235
|
except Exception:
|
|
236
|
+
# Continue on extraction errors
|
|
231
237
|
pass
|
|
232
238
|
else:
|
|
233
239
|
yield processed
|
|
234
|
-
|
|
235
|
-
|
|
240
|
+
|
|
241
|
+
except Exception as e:
|
|
242
|
+
# Log error but don't crash on stream processing exceptions
|
|
243
|
+
import sys
|
|
244
|
+
print(f"Stream processing error: {str(e)}", file=sys.stderr)
|
|
245
|
+
|
|
236
246
|
|
|
237
247
|
from .conversation import Conversation
|
|
238
248
|
from .optimizers import Optimizers
|
webscout/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "8.2.
|
|
1
|
+
__version__ = "8.2.7"
|
|
2
2
|
__prog__ = "webscout"
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version: 8.2.
|
|
3
|
+
Version: 8.2.7
|
|
4
4
|
Summary: Search for anything using Google, DuckDuckGo, phind.com, Contains AI models, can transcribe yt videos, temporary email and phone number generation, has TTS support, webai (terminal gpt and open interpreter) and offline LLMs and more
|
|
5
|
-
Author: OEvortex
|
|
6
|
-
Author-email: helpingai5@gmail.com
|
|
5
|
+
Author-email: OEvortex <helpingai5@gmail.com>
|
|
7
6
|
License: HelpingAI
|
|
8
7
|
Project-URL: Source, https://github.com/OE-LUCIFER/Webscout
|
|
9
8
|
Project-URL: Tracker, https://github.com/OE-LUCIFER/Webscout/issues
|
|
@@ -68,19 +67,7 @@ Requires-Dist: aiohttp
|
|
|
68
67
|
Provides-Extra: dev
|
|
69
68
|
Requires-Dist: ruff>=0.1.6; extra == "dev"
|
|
70
69
|
Requires-Dist: pytest>=7.4.2; extra == "dev"
|
|
71
|
-
Dynamic: author
|
|
72
|
-
Dynamic: author-email
|
|
73
|
-
Dynamic: classifier
|
|
74
|
-
Dynamic: description
|
|
75
|
-
Dynamic: description-content-type
|
|
76
|
-
Dynamic: keywords
|
|
77
|
-
Dynamic: license
|
|
78
70
|
Dynamic: license-file
|
|
79
|
-
Dynamic: project-url
|
|
80
|
-
Dynamic: provides-extra
|
|
81
|
-
Dynamic: requires-dist
|
|
82
|
-
Dynamic: requires-python
|
|
83
|
-
Dynamic: summary
|
|
84
71
|
|
|
85
72
|
<div align="center">
|
|
86
73
|
<a href="https://github.com/OEvortex/Webscout">
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
webscout/AIauto.py,sha256=SvOhkz1irK67s-SHKUnGp6NHirejr51xV4qg5ZNdQMY,9276
|
|
2
|
+
webscout/AIbase.py,sha256=ejzsyXAK82eo-2Cg8epljxlxrcHnQeeLt6SKurePOVY,9272
|
|
3
|
+
webscout/AIutel.py,sha256=qbvLy52BhrF0G2TPT4oPkYR7tW-CqOxlUnqZ21Zcq5A,9339
|
|
4
|
+
webscout/Bard.py,sha256=T4X1aQczWU8XyvWqVLvp_JxnHHz5GTbdrM9RRK9Bq5Y,41046
|
|
5
|
+
webscout/DWEBS.py,sha256=OnoKtIkrlNtYlGL_CCPsLet8cj2wKxqquFB8RdBxXfk,18621
|
|
6
|
+
webscout/__init__.py,sha256=vOmNYCYC0bJ2mSMCIqrFl3E7gwMudGj0kELPcTwZz7M,1033
|
|
7
|
+
webscout/__main__.py,sha256=qtkMZK5jzQ79ZkFAuZBxMgayuhmw3aRDj1F8Pt06NW4,108
|
|
8
|
+
webscout/cli.py,sha256=kn-HoPlgzyWns0cCCMXncB1UsqChE0DYSQgWcJPysHw,21300
|
|
9
|
+
webscout/conversation.py,sha256=8pKCbU5bObVrzGCFhSnFnFOpNFzyjeD-oWk4ON3621A,16881
|
|
10
|
+
webscout/exceptions.py,sha256=cj0BDCZhB46g_vJ0r2PH0U_T35dqZro-rWu6tvtIZ3c,12833
|
|
11
|
+
webscout/models.py,sha256=C7QY-KDkqFCI698t9pvTHQ27rYadPIvwaYHJ3-AOCJI,6566
|
|
12
|
+
webscout/optimizers.py,sha256=NlnxWCav7cTyjfeLHuq2pUCgqgW1pljWbMTklHYMGwo,9954
|
|
13
|
+
webscout/prompt_manager.py,sha256=j4MLYx3SpeeTxzsbgUGAHWLtJ1HAF6eaWOzJCAiGND4,10090
|
|
14
|
+
webscout/tempid.py,sha256=lqTTOjVSwDMmC0UoThdyshFyIAxTikVaN613-6K3g_s,4968
|
|
15
|
+
webscout/update_checker.py,sha256=5FCr6p1zLVASXcXkxKEgR7bFvICbpzJdgRTr3teKFCs,4217
|
|
16
|
+
webscout/utils.py,sha256=o2hU3qaVPk25sog3e4cyVZO3l8xwaZpYRziZPotEzNo,3075
|
|
17
|
+
webscout/version.py,sha256=UCzUXtD1UABNyj0mB_wplcbyHX8vDgyo3Gz8ZXpiZUM,46
|
|
18
|
+
webscout/webscout_search.py,sha256=aEv6_wcwFWomfUGUm-udHdMKULcMbv6SR3Gxhx8ycdQ,56691
|
|
19
|
+
webscout/webscout_search_async.py,sha256=SS6hLvlMRQT_KNuqZUfSuL7Tz-KTEDIXCn97yXSsNeI,35870
|
|
20
|
+
webscout/yep_search.py,sha256=gCXleUK_1Gy6B6fMPZ8MurwboPiMmbft3bhk1qISCdQ,12295
|
|
21
|
+
webscout-8.2.7.dist-info/licenses/LICENSE.md,sha256=hyfFlVn7pWcrvuvs-piB8k4J8DlXdOsYje9RyPxc6Ik,7543
|
|
22
|
+
webscout-8.2.7.dist-info/METADATA,sha256=CNFfzkf_Ckt1GW6WLALOfxKxX1xIRA200OEOEZxywUc,29334
|
|
23
|
+
webscout-8.2.7.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
24
|
+
webscout-8.2.7.dist-info/entry_points.txt,sha256=O_97lvOdImKPfdf3k_pT63sRXGyqooR8DytlD03ZCY4,72
|
|
25
|
+
webscout-8.2.7.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
|
|
26
|
+
webscout-8.2.7.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
webscout
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
from typing import List, Dict, Any, Optional
|
|
2
|
-
from .utils import request
|
|
3
|
-
from urllib.parse import quote
|
|
4
|
-
|
|
5
|
-
class Repository:
|
|
6
|
-
"""Class for interacting with GitHub repositories"""
|
|
7
|
-
|
|
8
|
-
def __init__(self, owner: str, repo: str):
|
|
9
|
-
"""
|
|
10
|
-
Initialize repository client
|
|
11
|
-
|
|
12
|
-
Args:
|
|
13
|
-
owner: Repository owner
|
|
14
|
-
repo: Repository name
|
|
15
|
-
"""
|
|
16
|
-
self.owner = owner
|
|
17
|
-
self.repo = repo
|
|
18
|
-
self.base_url = f"https://api.github.com/repos/{owner}/{repo}"
|
|
19
|
-
|
|
20
|
-
def get_info(self) -> Dict[str, Any]:
|
|
21
|
-
"""Get basic repository information"""
|
|
22
|
-
return request(self.base_url)
|
|
23
|
-
|
|
24
|
-
def get_commits(self, page: int = 1, per_page: int = 30, sha: str = None) -> List[Dict[str, Any]]:
|
|
25
|
-
"""
|
|
26
|
-
Get repository commits
|
|
27
|
-
|
|
28
|
-
Args:
|
|
29
|
-
page: Page number
|
|
30
|
-
per_page: Items per page
|
|
31
|
-
sha: SHA or branch name to start listing commits from
|
|
32
|
-
"""
|
|
33
|
-
url = f"{self.base_url}/commits?page={page}&per_page={per_page}"
|
|
34
|
-
if sha:
|
|
35
|
-
url += f"&sha={sha}"
|
|
36
|
-
return request(url)
|
|
37
|
-
|
|
38
|
-
def get_commit(self, sha: str) -> Dict[str, Any]:
|
|
39
|
-
"""Get a specific commit details"""
|
|
40
|
-
url = f"{self.base_url}/commits/{sha}"
|
|
41
|
-
return request(url)
|
|
42
|
-
|
|
43
|
-
def get_pull_requests(self, state: str = "all", page: int = 1, per_page: int = 30) -> List[Dict[str, Any]]:
|
|
44
|
-
"""
|
|
45
|
-
Get repository pull requests
|
|
46
|
-
|
|
47
|
-
Args:
|
|
48
|
-
state: State of PRs to return (open/closed/all)
|
|
49
|
-
page: Page number
|
|
50
|
-
per_page: Items per page
|
|
51
|
-
"""
|
|
52
|
-
url = f"{self.base_url}/pulls?state={state}&page={page}&per_page={per_page}"
|
|
53
|
-
return request(url)
|
|
54
|
-
|
|
55
|
-
def get_pull_request(self, pr_number: int) -> Dict[str, Any]:
|
|
56
|
-
"""Get specific pull request details"""
|
|
57
|
-
url = f"{self.base_url}/pulls/{pr_number}"
|
|
58
|
-
return request(url)
|
|
59
|
-
|
|
60
|
-
def get_pull_request_commits(self, pr_number: int) -> List[Dict[str, Any]]:
|
|
61
|
-
"""Get commits in a specific pull request"""
|
|
62
|
-
url = f"{self.base_url}/pulls/{pr_number}/commits"
|
|
63
|
-
return request(url)
|
|
64
|
-
|
|
65
|
-
def get_pull_request_files(self, pr_number: int) -> List[Dict[str, Any]]:
|
|
66
|
-
"""Get files changed in a specific pull request"""
|
|
67
|
-
url = f"{self.base_url}/pulls/{pr_number}/files"
|
|
68
|
-
return request(url)
|
|
69
|
-
|
|
70
|
-
def get_issues(self, state: str = "all", page: int = 1, per_page: int = 30, labels: str = None) -> List[Dict[str, Any]]:
|
|
71
|
-
"""
|
|
72
|
-
Get repository issues
|
|
73
|
-
|
|
74
|
-
Args:
|
|
75
|
-
state: State of issues to return (open/closed/all)
|
|
76
|
-
page: Page number
|
|
77
|
-
per_page: Items per page
|
|
78
|
-
labels: Comma-separated list of label names
|
|
79
|
-
"""
|
|
80
|
-
url = f"{self.base_url}/issues?state={state}&page={page}&per_page={per_page}"
|
|
81
|
-
if labels:
|
|
82
|
-
url += f"&labels={labels}"
|
|
83
|
-
return request(url)
|
|
84
|
-
|
|
85
|
-
def get_issue(self, issue_number: int) -> Dict[str, Any]:
|
|
86
|
-
"""Get specific issue details"""
|
|
87
|
-
url = f"{self.base_url}/issues/{issue_number}"
|
|
88
|
-
return request(url)
|
|
89
|
-
|
|
90
|
-
def get_issue_comments(self, issue_number: int) -> List[Dict[str, Any]]:
|
|
91
|
-
"""Get comments on a specific issue"""
|
|
92
|
-
url = f"{self.base_url}/issues/{issue_number}/comments"
|
|
93
|
-
return request(url)
|
|
94
|
-
|
|
95
|
-
def get_labels(self) -> List[Dict[str, Any]]:
|
|
96
|
-
"""Get repository labels"""
|
|
97
|
-
url = f"{self.base_url}/labels"
|
|
98
|
-
return request(url)
|
|
99
|
-
|
|
100
|
-
def get_milestones(self, state: str = "all") -> List[Dict[str, Any]]:
|
|
101
|
-
"""Get repository milestones"""
|
|
102
|
-
url = f"{self.base_url}/milestones?state={state}"
|
|
103
|
-
return request(url)
|
|
104
|
-
|
|
105
|
-
def get_contributors(self, page: int = 1, per_page: int = 30) -> List[Dict[str, Any]]:
|
|
106
|
-
"""Get repository contributors"""
|
|
107
|
-
url = f"{self.base_url}/contributors?page={page}&per_page={per_page}"
|
|
108
|
-
return request(url)
|
|
109
|
-
|
|
110
|
-
def get_languages(self) -> Dict[str, int]:
|
|
111
|
-
"""Get repository language breakdown"""
|
|
112
|
-
url = f"{self.base_url}/languages"
|
|
113
|
-
return request(url)
|
|
114
|
-
|
|
115
|
-
def get_teams(self) -> List[Dict[str, Any]]:
|
|
116
|
-
"""Get teams with access to repository"""
|
|
117
|
-
url = f"{self.base_url}/teams"
|
|
118
|
-
return request(url)
|
|
119
|
-
|
|
120
|
-
def get_tags(self) -> List[Dict[str, Any]]:
|
|
121
|
-
"""Get repository tags"""
|
|
122
|
-
url = f"{self.base_url}/tags"
|
|
123
|
-
return request(url)
|
|
124
|
-
|
|
125
|
-
def get_releases(self, page: int = 1, per_page: int = 30) -> List[Dict[str, Any]]:
|
|
126
|
-
"""Get repository releases"""
|
|
127
|
-
url = f"{self.base_url}/releases?page={page}&per_page={per_page}"
|
|
128
|
-
return request(url)
|
|
129
|
-
|
|
130
|
-
def get_release(self, release_id: str) -> Dict[str, Any]:
|
|
131
|
-
"""Get specific release details"""
|
|
132
|
-
url = f"{self.base_url}/releases/{release_id}"
|
|
133
|
-
return request(url)
|
|
134
|
-
|
|
135
|
-
def get_latest_release(self) -> Dict[str, Any]:
|
|
136
|
-
"""Get latest release"""
|
|
137
|
-
url = f"{self.base_url}/releases/latest"
|
|
138
|
-
return request(url)
|
|
139
|
-
|
|
140
|
-
def get_branches(self, page: int = 1, per_page: int = 30) -> List[Dict[str, Any]]:
|
|
141
|
-
"""Get repository branches"""
|
|
142
|
-
url = f"{self.base_url}/branches?page={page}&per_page={per_page}"
|
|
143
|
-
return request(url)
|
|
144
|
-
|
|
145
|
-
def get_branch(self, branch: str) -> Dict[str, Any]:
|
|
146
|
-
"""Get specific branch details"""
|
|
147
|
-
url = f"{self.base_url}/branches/{branch}"
|
|
148
|
-
return request(url)
|
|
149
|
-
|
|
150
|
-
def get_contents(self, path: str = "", ref: Optional[str] = None) -> Dict[str, Any]:
|
|
151
|
-
"""Get contents of file or directory"""
|
|
152
|
-
url = f"{self.base_url}/contents/{quote(path)}"
|
|
153
|
-
if ref:
|
|
154
|
-
url += f"?ref={ref}"
|
|
155
|
-
return request(url)
|
|
156
|
-
|
|
157
|
-
def get_collaborators(self) -> List[Dict[str, Any]]:
|
|
158
|
-
"""Get repository collaborators"""
|
|
159
|
-
url = f"{self.base_url}/collaborators"
|
|
160
|
-
return request(url)
|
|
161
|
-
|
|
162
|
-
def get_workflows(self) -> List[Dict[str, Any]]:
|
|
163
|
-
"""Get repository GitHub Actions workflows"""
|
|
164
|
-
url = f"{self.base_url}/actions/workflows"
|
|
165
|
-
return request(url)
|
|
166
|
-
|
|
167
|
-
def get_workflow_runs(self, workflow_id: str) -> List[Dict[str, Any]]:
|
|
168
|
-
"""Get workflow runs for a specific workflow"""
|
|
169
|
-
url = f"{self.base_url}/actions/workflows/{workflow_id}/runs"
|
|
170
|
-
return request(url)
|
|
171
|
-
|
|
172
|
-
def get_deployments(self) -> List[Dict[str, Any]]:
|
|
173
|
-
"""Get repository deployments"""
|
|
174
|
-
url = f"{self.base_url}/deployments"
|
|
175
|
-
return request(url)
|
|
176
|
-
|
|
177
|
-
def get_traffic(self) -> Dict[str, Any]:
|
|
178
|
-
"""Get repository traffic data"""
|
|
179
|
-
url = f"{self.base_url}/traffic/views"
|
|
180
|
-
return request(url)
|
|
181
|
-
|
|
182
|
-
def get_code_frequency(self) -> List[List[int]]:
|
|
183
|
-
"""Get weekly commit activity"""
|
|
184
|
-
url = f"{self.base_url}/stats/code_frequency"
|
|
185
|
-
return request(url)
|
|
186
|
-
|
|
187
|
-
def get_commit_activity(self) -> List[Dict[str, Any]]:
|
|
188
|
-
"""Get last year of commit activity"""
|
|
189
|
-
url = f"{self.base_url}/stats/commit_activity"
|
|
190
|
-
return request(url)
|
|
191
|
-
|
|
192
|
-
def get_community_profile(self) -> Dict[str, Any]:
|
|
193
|
-
"""Get community profile metrics"""
|
|
194
|
-
url = f"{self.base_url}/community/profile"
|
|
195
|
-
return request(url)
|