repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fxsjy/jieba | https://github.com/fxsjy/jieba | null | null | null | null | 34,929 | null | null | mit | null | null | null | null | null | null | null | test/test_paddle_postag.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:56.173201 | #encoding=utf-8
import sys
sys.path.append("../")
import jieba.posseg as pseg
import jieba
jieba.enable_paddle()
def cuttest(test_sent):
result = pseg.cut(test_sent, use_paddle=True)
for word, flag in result:
print('%s %s' % (word, flag))
if __name__ == "__main__":
cuttest("这是一个伸手不见五指的黑夜。我叫孙悟空,我爱... |
fxsjy/jieba | https://github.com/fxsjy/jieba | null | null | null | null | 34,929 | null | null | mit | null | null | null | null | null | null | null | test/test_pos_file.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:56.566755 | from __future__ import print_function
import sys
import time
sys.path.append("../")
import jieba
jieba.initialize()
import jieba.posseg as pseg
url = sys.argv[1]
content = open(url,"rb").read()
t1 = time.time()
words = list(pseg.cut(content))
t2 = time.time()
tm_cost = t2-t1
log_f = open("1.log","w")
log_f.write(' /... |
fxsjy/jieba | https://github.com/fxsjy/jieba | null | null | null | null | 34,929 | null | null | mit | null | null | null | null | null | null | null | test/test_pos.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:56.567435 | #encoding=utf-8
from __future__ import print_function
import sys
sys.path.append("../")
import jieba.posseg as pseg
def cuttest(test_sent):
result = pseg.cut(test_sent)
for word, flag in result:
print(word, "/", flag, ", ", end=' ')
print("")
if __name__ == "__main__":
cuttest("这是一个伸手不见五指的黑夜。... |
fxsjy/jieba | https://github.com/fxsjy/jieba | null | null | null | null | 34,929 | null | null | mit | null | null | null | null | null | null | null | test/test_pos_no_hmm.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:56.568288 | #encoding=utf-8
from __future__ import print_function
import sys
sys.path.append("../")
import jieba.posseg as pseg
def cuttest(test_sent):
result = pseg.cut(test_sent, HMM=False)
for word, flag in result:
print(word, "/", flag, ", ", end=' ')
print("")
if __name__ == "__main__":
cuttest("这是一... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/insert_custom_kg.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.437650 | import os
from lightrag import LightRAG
from lightrag.llm.openai import gpt_4o_mini_complete
#########
# Uncomment the below two lines if running in a jupyter notebook to handle the async nature of rag.insert()
# import nest_asyncio
# nest_asyncio.apply()
#########
WORKING_DIR = "./custom_kg"
if not os.path.exists(WO... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_gemini_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.440032 | """
LightRAG Demo with Google Gemini Models
This example demonstrates how to use LightRAG with Google's Gemini 2.0 Flash model
for text generation and the text-embedding-004 model for embeddings.
Prerequisites:
1. Set GEMINI_API_KEY environment variable:
export GEMINI_API_KEY='your-actual-api-key'
2. ... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/graph_visual_with_opensearch.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.441449 | """
Knowledge Graph Visualization with OpenSearch + LightRAG WebUI
This script demonstrates two ways to visualize the knowledge graph
stored in OpenSearch:
1. **WebUI (recommended)**: Opens the LightRAG WebUI in your browser
for interactive graph exploration with search, filtering, and
force-directed layout.
2... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/graph_visual_with_neo4j.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.443145 | import os
import json
import xml.etree.ElementTree as ET
from neo4j import GraphDatabase
# Constants
WORKING_DIR = "./dickens"
BATCH_SIZE_NODES = 500
BATCH_SIZE_EDGES = 100
# Neo4j connection credentials
NEO4J_URI = "bolt://localhost:7687"
NEO4J_USERNAME = "neo4j"
NEO4J_PASSWORD = "your_password"
def xml_to_json(xm... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_gemini_postgres_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.444596 | """
LightRAG Demo with PostgreSQL + Google Gemini
This example demonstrates how to use LightRAG with:
- Google Gemini (LLM + Embeddings)
- PostgreSQL-backed storages for:
- Vector storage
- Graph storage
- KV storage
- Document status storage
Prerequisites:
1. PostgreSQL database running and accessible
2. Req... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_ag2_multiagent_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.445911 | """LightRAG + AG2 Multi-Agent Demo.
Demonstrates how AG2 agents can use LightRAG's knowledge graph retrieval
as a tool. Multiple specialized agents collaborate to answer complex
questions over indexed documents.
Architecture:
User -> AG2 GroupChat (Researcher + Analyst + Writer) -> LightRAG queries
- Research... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_gemini_workspace_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.446775 | """
LightRAG Data Isolation Demo: Workspace Management
This example demonstrates how to maintain multiple isolated knowledge bases
within a single application using LightRAG's 'workspace' feature.
Key Concepts:
- Workspace Isolation: Each RAG instance is assigned a unique workspace name,
which ensures that Knowledg... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/graph_visual_with_html.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.447676 | import pipmaster as pm
if not pm.is_installed("pyvis"):
pm.install("pyvis")
if not pm.is_installed("networkx"):
pm.install("networkx")
import networkx as nx
from pyvis.network import Network
import random
# Load the GraphML file
G = nx.read_graphml("./dickens/graph_chunk_entity_relation.graphml")
# Create a... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/generate_query.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.448758 | from openai import OpenAI
# os.environ["OPENAI_API_KEY"] = ""
def openai_complete_if_cache(
model="gpt-4o-mini", prompt=None, system_prompt=None, history_messages=[], **kwargs
) -> str:
openai_client = OpenAI()
messages = []
if system_prompt:
messages.append({"role": "system", "content": sys... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_azure_openai_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:22:59.449846 | import os
import asyncio
from lightrag import LightRAG, QueryParam
from lightrag.utils import EmbeddingFunc
import numpy as np
from dotenv import load_dotenv
import logging
from openai import AzureOpenAI
logging.basicConfig(level=logging.INFO)
load_dotenv()
AZURE_OPENAI_API_VERSION = os.getenv("AZURE_OPENAI_API_VERS... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/raganything_example.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:01.292809 | #!/usr/bin/env python
"""
Example script demonstrating the integration of MinerU parser with RAGAnything
This example shows how to:
1. Process parsed documents with RAGAnything
2. Perform multimodal queries on the processed documents
3. Handle different types of content (text, images, tables)
"""
import os
import arg... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/rerank_example.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:02.112150 | """
LightRAG Rerank Integration Example
This example demonstrates how to use rerank functionality with LightRAG
to improve retrieval quality across different query modes.
Configuration Required:
1. Set your OpenAI LLM API key and base URL with env vars
LLM_MODEL
LLM_BINDING_HOST
LLM_BINDING_API_KEY
2. Set... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/copy_llm_cache_to_another_storage.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:02.901470 | """
Sometimes you need to switch a storage solution, but you want to save LLM token and time.
This handy script helps you to copy the LLM caches from one storage solution to another.
(Not all the storage impl are supported)
"""
import asyncio
import logging
import os
from dotenv import load_dotenv
from lightrag.kg.po... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_bedrock_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:03.721069 | """
LightRAG meets Amazon Bedrock ⛰️
"""
import os
import logging
from lightrag import LightRAG, QueryParam
from lightrag.llm.bedrock import bedrock_complete, bedrock_embed
from lightrag.utils import EmbeddingFunc
import asyncio
import nest_asyncio
nest_asyncio.apply()
logging.getLogger("aiobotocore").setLevel(log... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_cloudflare_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:04.444505 | import asyncio
import os
import inspect
import logging
import logging.config
from lightrag import LightRAG, QueryParam
from lightrag.utils import EmbeddingFunc, logger, set_verbose_debug
import requests
import numpy as np
from dotenv import load_dotenv
"""This code is a modified version of lightrag_openai_demo.py"""
... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_embedding_prefixes.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.229962 | import os
import asyncio
import inspect
import logging
import logging.config
from functools import partial
from lightrag import LightRAG, QueryParam
from lightrag.llm.openai import openai_complete_if_cache
from lightrag.llm.ollama import ollama_embed
from lightrag.utils import EmbeddingFunc, logger, set_verbose_debug
... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/modalprocessors_example.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.231761 | """
Example of directly using modal processors
This example demonstrates how to use LightRAG's modal processors directly without going through MinerU.
"""
import asyncio
import argparse
from lightrag.llm.openai import openai_complete_if_cache, openai_embed
from lightrag import LightRAG
from lightrag.utils import Embe... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_openai_compatible_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.233407 | import os
import asyncio
import inspect
import logging
import logging.config
from functools import partial
from lightrag import LightRAG, QueryParam
from lightrag.llm.openai import openai_complete_if_cache
from lightrag.llm.ollama import ollama_embed
from lightrag.utils import EmbeddingFunc, logger, set_verbose_debug
... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_vllm_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.241151 | """
LightRAG Demo with vLLM (LLM, Embeddings, and Reranker)
This example demonstrates how to use LightRAG with:
- vLLM-served LLM (OpenAI-compatible API)
- vLLM-served embedding model
- Jina-compatible reranker (also vLLM-served)
Prerequisites:
1. Create a .env file or export environment variables:
- LLM_M... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/opensearch_storage_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.241678 | """
Integration test for OpenSearch Storage in LightRAG.
Tests all 4 storage types against a live OpenSearch cluster:
- KV Storage: CRUD, filter_keys
- DocStatus Storage: CRUD, pagination (PIT + search_after), status counts
- Graph Storage: nodes, edges, BFS traversal, search_labels
- Vector Storage: k-NN upsert, quer... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_openai_opensearch_graph_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.245665 | """
LightRAG Demo with OpenSearch + OpenAI
This example demonstrates how to use LightRAG with:
- OpenAI (LLM + Embeddings)
- OpenSearch-backed storages for:
- KV storage
- Vector storage (k-NN)
- Graph storage (dual-index nodes + edges)
- Document status storage
Prerequisites:
1. OpenSearch cluster running an... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_ollama_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.246177 | import asyncio
import os
import inspect
import logging
import logging.config
from functools import partial
from lightrag import LightRAG, QueryParam
from lightrag.llm.ollama import ollama_model_complete, ollama_embed
from lightrag.utils import EmbeddingFunc, logger, set_verbose_debug
from dotenv import load_dotenv
lo... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_openai_mongodb_graph_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.258811 | import os
import asyncio
from lightrag import LightRAG, QueryParam
from lightrag.llm.openai import gpt_4o_mini_complete, openai_embed
from lightrag.utils import EmbeddingFunc
import numpy as np
#########
# Uncomment the below two lines if running in a jupyter notebook to handle the async nature of rag.insert()
# impor... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/lightrag_openai_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.265749 | import os
import asyncio
import logging
import logging.config
from lightrag import LightRAG, QueryParam
from lightrag.llm.openai import gpt_4o_mini_complete, openai_embed
from lightrag.utils import logger, set_verbose_debug
WORKING_DIR = "./dickens"
def configure_logging():
"""Configure logging for the applicati... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/milvus_kwargs_configuration_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.294070 | """
Example: Configuring Milvus Index Parameters via vector_db_storage_cls_kwargs
This example demonstrates how to configure Milvus indexing parameters through
vector_db_storage_cls_kwargs, which is the recommended approach when using
frameworks that build on top of LightRAG (like RAGAnything).
This approach allows c... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_hf_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.867718 | import os
from lightrag import LightRAG, QueryParam
from lightrag.llm.hf import hf_model_complete, hf_embed
from lightrag.utils import EmbeddingFunc
from transformers import AutoModel, AutoTokenizer
import asyncio
import nest_asyncio
nest_asyncio.apply()
WORKING_DIR = "./dickens"
if not os.path.exists(WORKING_DIR)... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.869185 | from typing import TYPE_CHECKING, Any
from ._version import __version__ as __version__
__all__ = ["LightRAG", "QueryParam", "__version__"]
if TYPE_CHECKING:
from .lightrag import LightRAG as LightRAG, QueryParam as QueryParam
def __getattr__(name: str) -> Any:
if name in {"LightRAG", "QueryParam"}:
... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_llamaindex_direct_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.875448 | import os
from lightrag import LightRAG, QueryParam
from lightrag.llm.llama_index_impl import (
llama_index_complete_if_cache,
llama_index_embed,
)
from lightrag.utils import EmbeddingFunc
from llama_index.llms.openai import OpenAI
from llama_index.embeddings.openai import OpenAIEmbedding
import asyncio
import ... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_llamaindex_litellm_opik_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.876545 | import os
from lightrag import LightRAG, QueryParam
from lightrag.llm.llama_index_impl import (
llama_index_complete_if_cache,
llama_index_embed,
)
from lightrag.utils import EmbeddingFunc
from llama_index.llms.litellm import LiteLLM
from llama_index.embeddings.litellm import LiteLLMEmbedding
import asyncio
imp... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_llamaindex_litellm_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.878603 | import os
from lightrag import LightRAG, QueryParam
from lightrag.llm.llama_index_impl import (
llama_index_complete_if_cache,
llama_index_embed,
)
from lightrag.utils import EmbeddingFunc
from llama_index.llms.litellm import LiteLLM
from llama_index.embeddings.litellm import LiteLLMEmbedding
import asyncio
imp... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_lmdeploy_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.879697 | import os
from lightrag import LightRAG, QueryParam
from lightrag.llm.lmdeploy import lmdeploy_model_if_cache
from lightrag.llm.hf import hf_embed
from lightrag.utils import EmbeddingFunc
from transformers import AutoModel, AutoTokenizer
import asyncio
import nest_asyncio
nest_asyncio.apply()
WORKING_DIR = "./dicke... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_nvidia_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.903559 | import os
import asyncio
import nest_asyncio
from lightrag import LightRAG, QueryParam
from lightrag.llm import (
openai_complete_if_cache,
nvidia_openai_embed,
)
from lightrag.utils import EmbeddingFunc
import numpy as np
# for custom llm_model_func
from lightrag.utils import locate_json_string_body_from_str... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | examples/unofficial-sample/lightrag_openai_neo4j_milvus_redis_demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.942082 | import os
import asyncio
from lightrag import LightRAG, QueryParam
from lightrag.llm.ollama import ollama_embed, openai_complete_if_cache
from lightrag.utils import EmbeddingFunc
# WorkingDir
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
WORKING_DIR = os.path.join(ROOT_DIR, "myKG")
if not os.path.exists(WORKIN... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/_version.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:05.958907 | """Lightweight version definitions shared by packaging and runtime code."""
__version__ = "1.4.16"
__api_version__ = "0290"
|
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:06.892422 | """
Configs for the LightRAG API.
"""
import os
import re
import argparse
import logging
from dotenv import load_dotenv
from lightrag.utils import get_env_value, logger
from lightrag.llm.binding_options import (
GeminiEmbeddingOptions,
GeminiLLMOptions,
OllamaEmbeddingOptions,
OllamaLLMOptions,
Ope... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/routers/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:06.895949 | """
This module contains all the routers for the LightRAG API.
"""
from .document_routes import router as document_router
from .query_routes import router as query_router
from .graph_routes import router as graph_router
from .ollama_api import OllamaAPI
__all__ = ["document_router", "query_router", "graph_router", "O... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/gunicorn_config.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:06.902361 | # gunicorn_config.py
import os
import logging
from lightrag.kg.shared_storage import finalize_share_data
from lightrag.utils import setup_logger, get_env_value
from lightrag.constants import (
DEFAULT_LOG_MAX_BYTES,
DEFAULT_LOG_BACKUP_COUNT,
DEFAULT_LOG_FILENAME,
)
# Get log directory path from environmen... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/lightrag_server.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:06.940891 | """
LightRAG FastAPI Server
"""
from fastapi import FastAPI, Depends, HTTPException, Request
from fastapi.exceptions import RequestValidationError
from fastapi.responses import JSONResponse
from fastapi.openapi.docs import (
get_swagger_ui_html,
get_swagger_ui_oauth2_redirect_html,
)
import os
import re
import... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/auth.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.202606 | from datetime import datetime, timedelta, timezone
import jwt
from dotenv import load_dotenv
from fastapi import HTTPException, status
from pydantic import BaseModel
from ..utils import logger
from .config import DEFAULT_TOKEN_SECRET, global_args
from .passwords import verify_password
# use the .env that is inside t... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/runtime_validation.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.518478 | """Helpers for validating startup runtime expectations from `.env`."""
from __future__ import annotations
import os
from dataclasses import dataclass
from pathlib import Path
from dotenv import dotenv_values
_CONTAINER_RUNTIME_TARGETS = {"compose", "docker"}
@dataclass(frozen=True)
class RuntimeEnvironment:
"... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/utils_api.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.518980 | """
Utility functions for the LightRAG API.
"""
import os
import argparse
from typing import Optional, List, Tuple
import sys
import time
import logging
from ascii_colors import ASCIIColors
from .._version import __api_version__ as api_version
from .._version import __version__ as core_version
from lightrag.constants ... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.531544 | from __future__ import annotations
from abc import ABC, abstractmethod
from enum import Enum
import os
from dotenv import load_dotenv
from dataclasses import dataclass, field
from typing import (
Any,
Literal,
TypedDict,
TypeVar,
Callable,
Optional,
Dict,
List,
AsyncIterator,
)
from... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/routers/graph_routes.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.540217 | """
This module contains all graph-related routes for the LightRAG API.
"""
from typing import Optional, Dict, Any
import traceback
from fastapi import APIRouter, Depends, Query, HTTPException
from pydantic import BaseModel, Field
from lightrag.utils import logger
from ..utils_api import get_combined_auth_dependency
... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/constants.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.601517 | """
Centralized configuration constants for LightRAG.
This module defines default values for configuration constants used across
different parts of the LightRAG system. Centralizing these values ensures
consistency and makes maintenance easier.
"""
# Default values for server settings
DEFAULT_WOKERS = 2
DEFAULT_MAX_G... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/passwords.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.606796 | import bcrypt
BCRYPT_PASSWORD_PREFIX = "{bcrypt}"
def hash_password(password: str) -> str:
"""Return an AUTH_ACCOUNTS-ready bcrypt password value."""
salt = bcrypt.gensalt()
hashed = bcrypt.hashpw(password.encode("utf-8"), salt).decode("utf-8")
return f"{BCRYPT_PASSWORD_PREFIX}{hashed}"
def verify_... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/evaluation/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.919822 | """
LightRAG Evaluation Module
RAGAS-based evaluation framework for assessing RAG system quality.
Usage:
from lightrag.evaluation import RAGEvaluator
evaluator = RAGEvaluator()
results = await evaluator.run()
Note: RAGEvaluator is imported lazily to avoid import errors
when ragas/datasets are not instal... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/routers/ollama_api.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:07.920633 | from fastapi import APIRouter, HTTPException, Request
from pydantic import BaseModel
from typing import List, Dict, Any, Optional, Type
from lightrag.utils import logger
import time
import json
import re
from enum import Enum
from fastapi.responses import StreamingResponse
import asyncio
from lightrag import LightRAG, ... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/run_with_gunicorn.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:11.914589 | #!/usr/bin/env python
"""
Start LightRAG server with Gunicorn
"""
import os
import sys
import platform
import pipmaster as pm
from lightrag.api.utils_api import display_splash_screen, check_env_file
from lightrag.api.config import global_args
from lightrag.utils import get_env_value
from lightrag.kg.shared_storage imp... |
HKUDS/LightRAG | https://github.com/HKUDS/LightRAG | null | null | null | null | 34,699 | null | null | mit | null | null | null | null | null | null | null | lightrag/api/routers/query_routes.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:11.917586 | """
This module contains all query-related routes for the LightRAG API.
"""
import json
from typing import Any, Dict, List, Literal, Optional
from fastapi import APIRouter, Depends, HTTPException
from lightrag.base import QueryParam
from lightrag.api.utils_api import get_combined_auth_dependency
from lightrag.utils im... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/backend-development/skills/api-design-principles/assets/rest-api-template.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:14.567045 | """
Production-ready REST API template using FastAPI.
Includes pagination, filtering, error handling, and best practices.
"""
from fastapi import FastAPI, HTTPException, Query, Path, Depends, status
from fastapi.middleware.cors import CORSMiddleware
from fastapi.middleware.trustedhost import TrustedHostMiddleware
from... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/cli.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:14.582472 | """Typer CLI for plugin-eval."""
from __future__ import annotations
from pathlib import Path
import typer
from rich.console import Console
from plugin_eval.engine import EvalEngine
from plugin_eval.models import Depth, EvalConfig
from plugin_eval.reporter import Reporter
app = typer.Typer(
name="plugin-eval",
... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/engine.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:14.583858 | """Eval Engine — coordinates all layers and produces composite scores."""
from __future__ import annotations
import asyncio
from datetime import UTC, datetime
from pathlib import Path
from plugin_eval.layers.static import StaticAnalyzer, anti_pattern_penalty
from plugin_eval.models import (
Badge,
CompositeR... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/llm-application-dev/skills/prompt-engineering-patterns/scripts/optimize-prompt.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:14.585639 | #!/usr/bin/env python3
"""
Prompt Optimization Script
Automatically test and optimize prompts using A/B testing and metrics tracking.
"""
import json
import time
from typing import List, Dict, Any
from dataclasses import dataclass
from concurrent.futures import ThreadPoolExecutor
import numpy as np
@dataclass
class... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/corpus.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:14.588758 | """Gold standard corpus management for Elo ranking."""
from __future__ import annotations
import json
from dataclasses import dataclass
from pathlib import Path
from plugin_eval.parser import parse_skill
@dataclass
class CorpusEntry:
name: str
path: str
category: str
line_count: int
elo_rating:... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/scripts/eval_all.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:14.611342 | """Batch-evaluate every local plugin and write per-plugin JSON + a summary report.
Runs `plugin-eval score` (via the library, not the CLI subprocess) on every
plugin directory under `plugins/`. External git-subdir plugins are skipped
since their source does not exist locally. Outputs:
reports/<plugin>.json ... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/elo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:14.624693 | """Elo rating system for pairwise skill comparison."""
from __future__ import annotations
import random
class EloCalculator:
def __init__(self, k_factor: int = 32) -> None:
self.k_factor = k_factor
def expected(self, rating_a: float, rating_b: float) -> float:
"""Expected score for player A... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/layers/judge.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:14.625872 | """Layer 2: LLM Judge — semantic evaluation via Claude, model-tiered, async."""
from __future__ import annotations
import asyncio
import json
import re
from dataclasses import dataclass
from pathlib import Path
from plugin_eval.models import LayerResult
from plugin_eval.parser import ParsedSkill, parse_skill
# ----... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/stats.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:15.928510 | """Statistical methods for PluginEval confidence intervals and reliability metrics."""
from __future__ import annotations
import math
import random
from collections import Counter
def wilson_score_ci(
successes: int,
trials: int,
confidence: float = 0.95,
) -> tuple[float, float]:
"""Wilson score in... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/models.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:15.930152 | """Data models for PluginEval evaluation results."""
from __future__ import annotations
from enum import StrEnum
from typing import Any
from pydantic import BaseModel, Field, computed_field, field_validator
class Depth(StrEnum):
QUICK = "quick"
STANDARD = "standard"
DEEP = "deep"
THOROUGH = "thorou... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/parser.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:15.931183 | """Parse Claude Code plugin structure: skills, agents, plugin.json."""
from __future__ import annotations
import json
import re
from dataclasses import dataclass, field
from pathlib import Path
import yaml
@dataclass
class ParsedSkill:
path: Path
name: str
description: str
line_count: int
h2_co... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/reporter.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:15.932971 | """Reporter — formats PluginEvalResult into JSON, Markdown, or HTML."""
from __future__ import annotations
from plugin_eval.models import PluginEvalResult
class Reporter:
"""Converts a PluginEvalResult into various output formats."""
# ------------------------------------------------------------------
... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/layers/monte_carlo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:15.934249 | """Layer 3: Monte Carlo simulation — statistical reliability testing via repeated runs."""
from __future__ import annotations
import asyncio
import statistics
from collections.abc import Callable
from dataclasses import dataclass
from pathlib import Path
from plugin_eval.models import LayerResult
from plugin_eval.pa... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/src/plugin_eval/layers/static.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:15.935671 | """Layer 1: Static analysis — pure Python, no LLM calls, deterministic, <2 seconds."""
from __future__ import annotations
import re
from pathlib import Path
from plugin_eval.models import AntiPattern, LayerResult
from plugin_eval.parser import ParsedAgent, ParsedSkill, parse_plugin, parse_skill
# Weights for skill ... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_cli.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:16.531897 | from pathlib import Path
from typer.testing import CliRunner
from plugin_eval.cli import app
runner = CliRunner()
class TestCLI:
def test_score_quick(self, sample_skill_dir: Path):
result = runner.invoke(app, ["score", str(sample_skill_dir), "--depth", "quick"])
assert result.exit_code == 0
... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_corpus.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:16.548883 | from pathlib import Path
import pytest
from plugin_eval.corpus import Corpus
class TestCorpus:
def test_init_from_plugins(self, sample_plugin_dir: Path, tmp_path: Path):
corpus_dir = tmp_path / "corpus"
corpus = Corpus.init_from_source(sample_plugin_dir.parent, corpus_dir)
assert corpus.... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/conftest.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:16.549442 | from pathlib import Path
import pytest
@pytest.fixture
def fixtures_dir() -> Path:
return Path(__file__).parent / "fixtures"
@pytest.fixture
def sample_skill_dir(tmp_path: Path) -> Path:
"""Create a minimal valid skill directory."""
skill_dir = tmp_path / "test-skill"
skill_dir.mkdir()
skill_md... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_engine.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:16.942160 | from pathlib import Path
import pytest
from plugin_eval.engine import EvalEngine
from plugin_eval.models import Depth, EvalConfig, PluginEvalResult
class TestEvalEngine:
def test_quick_eval_skill(self, sample_skill_dir: Path):
config = EvalConfig(depth=Depth.QUICK)
engine = EvalEngine(config)
... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_e2e.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:16.949394 | """End-to-end tests using real plugins from the claude-agents repo."""
from pathlib import Path
import pytest
from plugin_eval.engine import EvalEngine
from plugin_eval.models import Depth, EvalConfig
REPO_ROOT = Path(__file__).parent.parent.parent.parent # plugins/plugin-eval/tests -> claude-agents
@pytest.mark... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_elo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:17.778772 | import pytest
from plugin_eval.elo import EloCalculator
class TestEloCalculator:
def test_expected_score(self):
calc = EloCalculator(k_factor=32)
assert calc.expected(1500, 1500) == pytest.approx(0.5)
assert calc.expected(1600, 1500) > 0.5
assert calc.expected(1400, 1500) < 0.5
... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_monte_carlo.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:17.971953 | from pathlib import Path
from unittest.mock import AsyncMock, patch
import pytest
from plugin_eval.layers.monte_carlo import MonteCarloAnalyzer, MonteCarloConfig, SimResult
class TestSimResult:
def test_sim_result(self):
sr = SimResult(activated=True, quality_score=0.8, tokens=2500, duration_ms=1200)
... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_judge.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:18.124371 | from pathlib import Path
from unittest.mock import AsyncMock, patch
import pytest
from plugin_eval.layers.judge import JudgeAnalyzer, JudgeConfig
class TestJudgeConfig:
def test_default_config(self):
config = JudgeConfig()
assert config.judges == 1
assert config.auth == "max"
class Tes... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_parser.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:18.149617 | from pathlib import Path
import pytest
from plugin_eval.parser import ParsedSkill, ParsedAgent, ParsedPlugin, parse_skill, parse_agent, parse_plugin
class TestParseSkill:
def test_parse_valid_skill(self, sample_skill_dir: Path):
skill = parse_skill(sample_skill_dir)
assert skill.name == "test-sk... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_reporter.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:18.150404 | import json
from pathlib import Path
from plugin_eval.engine import EvalEngine
from plugin_eval.models import Depth, EvalConfig
from plugin_eval.reporter import Reporter
class TestReporter:
def test_json_output(self, sample_skill_dir: Path):
config = EvalConfig(depth=Depth.QUICK)
engine = EvalEng... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_stats.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:18.150896 | import pytest
from plugin_eval.stats import (
bootstrap_ci,
clopper_pearson_ci,
cohens_kappa,
coefficient_of_variation,
wilson_score_ci,
)
class TestWilsonScore:
def test_perfect_activation(self):
lower, upper = wilson_score_ci(successes=50, trials=50, confidence=0.95)
assert ... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_models.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:18.188449 | import pytest
from pydantic import ValidationError
from plugin_eval.models import (
AntiPattern,
Badge,
CompositeResult,
Depth,
DimensionScore,
EloMatchup,
EloResult,
EvalConfig,
LayerResult,
PluginEvalResult,
StaticSubScore,
)
class TestEvalConfig:
def test_default_co... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | plugins/plugin-eval/tests/test_static.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:18.189039 | from pathlib import Path
import pytest
from plugin_eval.layers.static import StaticAnalyzer
from plugin_eval.models import LayerResult
class TestStaticAnalyzer:
def test_analyze_valid_skill(self, sample_skill_dir: Path):
analyzer = StaticAnalyzer()
result = analyzer.analyze_skill(sample_skill_di... |
wshobson/agents | https://github.com/wshobson/agents | null | null | null | null | 34,690 | null | null | mit | null | null | null | null | null | null | null | tools/yt-design-extractor.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:18.337694 | #!/usr/bin/env python3
"""
YouTube Design Concept Extractor
=================================
Extracts transcript + keyframes from a YouTube video and produces
a structured markdown reference document ready for agent consumption.
Usage:
python3 tools/yt-design-extractor.py <youtube_url> [options]
Examples:
py... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:22.235181 | from __future__ import annotations
import sys
if __name__ == "__main__":
from poetry.console.application import main
sys.exit(main())
|
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/config/config_source.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:22.235776 | from __future__ import annotations
import dataclasses
import json
from abc import ABC
from abc import abstractmethod
from typing import TYPE_CHECKING
from typing import Any
from cleo.io.null_io import NullIO
if TYPE_CHECKING:
from collections.abc import Sequence
from cleo.io.io import IO
UNSET = object(... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/__version__.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:22.277039 | from __future__ import annotations
from importlib import metadata
__version__ = metadata.version("poetry")
|
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/config/file_config_source.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:22.281193 | from __future__ import annotations
from contextlib import contextmanager
from typing import TYPE_CHECKING
from typing import Any
from tomlkit import document
from tomlkit import table
from poetry.config.config_source import ConfigSource
from poetry.config.config_source import PropertyNotFoundError
from poetry.config... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/config/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:22.282317 | from __future__ import annotations
import dataclasses
import json
import logging
import os
import re
from copy import deepcopy
from json import JSONDecodeError
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from packaging.utils import NormalizedName
from ... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/config/dict_config_source.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:22.389154 | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from poetry.config.config_source import ConfigSource
from poetry.config.config_source import PropertyNotFoundError
from poetry.config.config_source import split_key
if TYPE_CHECKING:
from collections.abc import Sequence
... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/build.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:23.655493 | from __future__ import annotations
import dataclasses
from importlib import metadata
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from typing import Literal
from cleo.helpers import option
from poetry.core.constraints.version import Version
from poetry... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/add.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:23.670655 | from __future__ import annotations
import contextlib
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from typing import Literal
from cleo.helpers import argument
from cleo.helpers import option
from packaging.utils import canonicalize_name
from poetry.core.packages.dependency impo... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/cache/clear.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:23.768011 | from __future__ import annotations
import os
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from packaging.utils import canonicalize_name
from poetry.config.config import Config
from poetry.console.commands.command import Command
from p... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/about.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:23.880325 | from __future__ import annotations
from poetry.console.commands.command import Command
class AboutCommand(Command):
name = "about"
description = "Shows information about Poetry."
def handle(self) -> int:
from importlib import metadata
self.line(
f"""\
<info>Poetry - Package... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/command_loader.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:23.935144 | from __future__ import annotations
from typing import TYPE_CHECKING
from cleo.exceptions import CleoLogicError
from cleo.loaders.factory_command_loader import FactoryCommandLoader
if TYPE_CHECKING:
from collections.abc import Callable
from cleo.commands.command import Command
class CommandLoader(FactoryC... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:24.263717 | from __future__ import annotations
import json
import re
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from typing import cast
from cleo.helpers import argument
from cleo.helpers import option
from installer.utils import canonicalize_name
from poetry.co... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/check.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:24.301316 | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from pathlib import Path
from cleo.io.inputs.option import Option
class CheckComman... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/command.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:24.331956 | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from cleo.commands.command import Command as BaseCommand
from cleo.exceptions import CleoValueError
if TYPE_CHECKING:
from poetry.console.application import Application
from poetry.poetry i... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/debug/info.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:24.461416 | from __future__ import annotations
import sys
from pathlib import Path
from poetry.console.commands.command import Command
class DebugInfoCommand(Command):
name = "debug info"
description = "Shows debug information."
def handle(self) -> int:
poetry_python_version = ".".join(str(s) for s in sys... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/debug/tags.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:24.936025 | from __future__ import annotations
from poetry.console.commands.env_command import EnvCommand
class DebugTagsCommand(EnvCommand):
name = "debug tags"
description = "Shows compatible tags for your project's current active environment."
def handle(self) -> int:
for tag in self.env.get_supported_ta... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/debug/resolve.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:25.190756 | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from cleo.io.outputs.output import Verbosity
from poetry.console.commands.init import InitCommand
from poetry.console.commands.show import ShowCommand
if... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/env/info.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:25.290103 | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
from poetry.utils.env import Env
class EnvInfoCommand(Command):
... |
python-poetry/poetry | https://github.com/python-poetry/poetry | null | null | null | null | 34,276 | null | null | mit | null | null | null | null | null | null | null | src/poetry/console/commands/env/list.py | null | null | null | null | null | null | Python | 2026-05-04T02:23:25.320729 | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
class EnvListCommand(Command):
name = "env list"
description =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.