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
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/git/git_add.py
null
null
null
null
null
null
Python
2026-05-04T02:14:29.770444
"""usage: git add [options] [--] [<filepattern>...] -h, --help -n, --dry-run dry run -v, --verbose be verbose -i, --interactive interactive picking -p, --patch select hunks interactively -e, --edit edit current diff and apply -f, --force allow a...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/git/git_checkout.py
null
null
null
null
null
null
Python
2026-05-04T02:14:29.814762
"""usage: git checkout [options] <branch> git checkout [options] <branch> -- <file>... -q, --quiet suppress progress reporting -b <branch> create and checkout a new branch -B <branch> create/reset and checkout a branch -l create reflog for new bra...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/git/git_branch.py
null
null
null
null
null
null
Python
2026-05-04T02:14:29.850315
""" usage: git branch [options] [-r | -a] [--merged=<commit> | --no-merged=<commit>] git branch [options] [-l] [-f] <branchname> [<start-point>] git branch [options] [-r] (-d | -D) <branchname> git branch [options] (-m | -M) [<oldbranch>] <newbranch> Generic options -h, --help -v, --verbos...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/git/git_clone.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.323882
"""usage: git clone [options] [--] <repo> [<dir>] -v, --verbose be more verbose -q, --quiet be more quiet --progress force progress reporting -n, --no-checkout don't create a checkout --bare create a bare repository --mirror create a ...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/git/git_commit.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.338231
"""usage: git commit [options] [--] [<filepattern>...] -h, --help -q, --quiet suppress summary after successful commit -v, --verbose show diff in commit message template Commit message options -F, --file <file> read message from file --author <author> override author for ...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/odd_even_example.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.389538
"""Usage: odd_even_example.py [-h | --help] (ODD EVEN)... Example, try: odd_even_example.py 1 2 3 4 Options: -h, --help """ from docopt import docopt if __name__ == '__main__': arguments = docopt(__doc__) print(arguments)
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/interactive_example.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.394250
#!/usr/bin/env python """ This example uses docopt with the built in cmd module to demonstrate an interactive command application. Usage: my_program tcp <host> <port> [--timeout=<seconds>] my_program serial <port> [--baud=<n>] [--timeout=<seconds>] my_program (-i | --interactive) my_program (-h | --hel...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/git/git_remote.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.410383
""" usage: git remote [-v | --verbose] git remote add [-t <branch>] [-m <master>] [-f] [--mirror] <name> <url> git remote rename <old> <new> git remote rm <name> git remote set-head <name> (-a | -d | <branch>) git remote [-v | --verbose] show [-n] <name> git remote prune [-n | ...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/git/git_push.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.410832
"""usage: git push [options] [<repository> [<refspec>...]] -h, --help -v, --verbose be more verbose -q, --quiet be more quiet --repo <repository> repository --all push all refs --mirror mirror all refs --delete delete refs --...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/options_example.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.420801
"""Example of program with many options using docopt. Usage: options_example.py [-hvqrf NAME] [--exclude=PATTERNS] [--select=ERRORS | --ignore=ERRORS] [--show-source] [--statistics] [--count] [--benchmark] PATH... options_example.py (--doctest | --testsuite=DIR) options_...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/naval_fate.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.422063
"""Naval Fate. Usage: naval_fate.py ship new <name>... naval_fate.py ship <name> move <x> <y> [--speed=<kn>] naval_fate.py ship shoot <x> <y> naval_fate.py mine (set|remove) <x> <y> [--moored|--drifting] naval_fate.py -h | --help naval_fate.py --version Options: -h --help Show this screen. --versi...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/options_shortcut_example.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.422677
"""Example of program which uses [options] shortcut in pattern. Usage: options_shortcut_example.py [options] <port> Options: -h --help show this help message and exit --version show version and exit -n, --number N use N as a number -t, --timeout TIMEOUT set timeout...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/quick_example.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.468424
"""Usage: quick_example.py tcp <host> <port> [--timeout=<seconds>] quick_example.py serial <port> [--baud=9600] [--timeout=<seconds>] quick_example.py -h | --help | --version """ from docopt import docopt if __name__ == '__main__': arguments = docopt(__doc__, version='0.1.1rc') print(arguments)
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/validation_example.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.908051
"""Usage: prog.py [--count=N] PATH FILE... Arguments: FILE input file PATH out directory Options: --count=N number of operations """ import os from docopt import docopt try: from schema import Schema, And, Or, Use, SchemaError except ImportError: exit('This example requires that `schema` dat...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
setup.py
null
null
null
null
null
null
Python
2026-05-04T02:14:30.908682
import sys from setuptools import setup from setuptools.command.test import test as TestCommand from docopt import __version__ class PyTestCommand(TestCommand): """ Command to run unit py.test unit tests """ def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [...
docopt/docopt
https://github.com/docopt/docopt
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
test_docopt.py
null
null
null
null
null
null
Python
2026-05-04T02:14:31.019551
from __future__ import with_statement from docopt import (docopt, DocoptExit, DocoptLanguageError, Option, Argument, Command, OptionsShortcut, Required, Optional, Either, OneOrMore, parse_argv, parse_pattern, parse_section, parse_defaults, ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
docs/bootcamp/streamlit/gptcache-streamlit-image/imagen.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.715566
import streamlit as st from PIL import Image import os import io import base64 from io import BytesIO import requests from gptcache import cache from gptcache.manager import get_data_manager, CacheBase, VectorBase, ObjectBase from gptcache.adapter import openai from gptcache.processor.pre import get_prompt from gptcac...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/adapter/openai_chatgpt.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.739079
from gptcache import cache from gptcache.adapter import openai cache.init() cache.set_openai_key() question = 'what is github' answer = openai.ChatCompletion.create( model='gpt-3.5-turbo', messages=[ { 'role': 'user', 'content': question } ], ) print(answe...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
docs/bootcamp/streamlit/gptcache-streamlit-audio/audio.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.752150
import streamlit as st import os import uuid from gptcache import cache from gptcache.manager import get_data_manager, CacheBase, VectorBase, ObjectBase from gptcache.adapter import openai from gptcache.processor.pre import get_file_name from gptcache.embedding import Data2VecAudio from gptcache.similarity_evaluation....
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
docs/_exts/index_con.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.753129
from m2r2 import convert import os class IndexCon: def __init__(self, source, output): self.source = source self.output = output self.preprocess() def preprocess(self): with open(self.source, 'r') as f: # remove the CI link from the file lines = f.readlines() lines = ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
docs/_exts/docgen2.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.764944
import os import sys from jinja2 import Environment, FileSystemLoader, select_autoescape _default_skip_file_list = ["__init__.py"] _default_skip_dir_list = ["__pycache__"] _conflict_name_dict = { "manager": ["eviction", "object_data", "scalar_data", "vector_data"] } class DocGen: def __init_...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
docs/conf.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.785414
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/benchmark/benchmark_sqlite_faiss_onnx.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.786511
import json import os import time from gptcache.adapter import openai from gptcache import cache, Config from gptcache.manager import get_data_manager, CacheBase, VectorBase from gptcache.similarity_evaluation.onnx import OnnxModelEvaluation from gptcache.embedding import Onnx as EmbeddingOnnx from gptcache.similarity...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/adapter/langchain_llms.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.847030
import os from langchain import Cohere from langchain.llms import OpenAI from langchain.chat_models import ChatOpenAI from langchain.schema import HumanMessage from gptcache.adapter.langchain_models import LangChainLLMs from gptcache import cache from gptcache.processor.pre import get_prompt from gptcache.adapter.la...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/context_process/selective_context.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.848483
import os import time from gptcache import cache from gptcache.adapter import openai from gptcache.embedding import Onnx from gptcache.manager import manager_factory from gptcache.processor.context import SelectiveContextProcess from gptcache.similarity_evaluation import SearchDistanceEvaluation from gptcache.utils im...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/adapter/api.py
null
null
null
null
null
null
Python
2026-05-04T02:14:33.865794
from gptcache import cache, Config, Cache from gptcache.adapter.api import put, get, init_similar_cache from gptcache.processor.post import nop from gptcache.processor.pre import get_prompt def run_basic(): cache.init(pre_embedding_func=get_prompt) put("hello", "foo") print(get("hello")) # output: foo...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/context_process/summarization_context.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.303554
import os import time from gptcache import cache from gptcache.adapter import openai from gptcache.embedding import Onnx from gptcache.manager import manager_factory from gptcache.processor.context import SummarizationContextProcess from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation def res...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/data_manager/map_manager.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.321884
import os from gptcache.manager import get_data_manager from gptcache.adapter import openai from gptcache import cache def run(): dir_name, _ = os.path.split(os.path.abspath(__file__)) data_file = dir_name + '/data_map.txt' data_manager = get_data_manager(data_path=data_file, max_size=10) cache.init(...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/data_manager/scalar_store.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.336618
import os import numpy as np from gptcache import cache from gptcache.adapter import openai from gptcache.manager import get_data_manager, CacheBase, VectorBase from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation d = 8 # Change the embdding function to your own def mock_embeddings(data, **k...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/data_manager/vector_store.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.360420
import numpy as np from gptcache import cache from gptcache.adapter import openai from gptcache.manager import CacheBase, VectorBase, get_data_manager from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation d = 8 def mock_embeddings(data, **kwargs): return np.random.random((d, )).astype('fl...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/embedding/onnx.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.361538
from gptcache.adapter import openai from gptcache import cache from gptcache.manager.factory import get_data_manager from gptcache.manager import get_data_manager, CacheBase, VectorBase from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation from gptcache.embedding import Onnx def run(): onnx...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/embedding/paddlenlp.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.396262
from gptcache.adapter import openai from gptcache import cache from gptcache.manager.factory import get_data_manager from gptcache.manager import get_data_manager, CacheBase, VectorBase from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation from gptcache.embedding import PaddleNLP def run(): ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/embedding/random.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.443526
from gptcache.adapter import openai from gptcache import cache from gptcache.manager import get_data_manager, CacheBase, VectorBase from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation import numpy as np d = 8 def mock_embeddings(data, **kwargs): return np.random.random((d, )).astype('fl...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/eviction/distributed_eviction.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.444814
from gptcache import Cache from gptcache.embedding import Onnx from gptcache.manager.eviction import EvictionBase from gptcache.manager import get_data_manager, CacheBase, VectorBase, manager_factory def get_data_manager_example(): """ This example shows how to create a data manager with a mongo as a scalar...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/embedding/default.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.448730
from gptcache.adapter import openai from gptcache import cache from gptcache.embedding.string import to_embeddings as string_embedding def run(): cache.init(embedding_func=string_embedding) cache.set_openai_key() answer = openai.ChatCompletion.create( model='gpt-3.5-turbo', messages=[ ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/diffusers/stable_diffusion.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.572189
import time import torch from PIL import ImageChops from diffusers import DPMSolverMultistepScheduler from gptcache.adapter.diffusers import StableDiffusionPipeline from gptcache.processor.pre import get_prompt from gptcache import cache from gptcache.embedding import Onnx from gptcache.similarity_evaluation.distanc...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/dolly/basic_usage.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.863236
import time import torch from transformers import pipeline from gptcache.processor.pre import get_inputs from gptcache.manager import manager_factory from gptcache import Cache from gptcache.embedding import Onnx from gptcache.adapter.dolly import Dolly def dolly_base_usage(): onnx = Onnx() m = manager_factor...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/langchain/langchain_prompt_openai.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.916779
import os import openai import time from langchain.llms import OpenAI from langchain import PromptTemplate, LLMChain from gptcache.adapter.langchain_models import LangChainLLMs from gptcache import Cache from gptcache.processor.pre import get_prompt openai.api_key = os.getenv("OPENAI_API_KEY") template = """Questio...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/langchain/langchain_llms_mock.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.948589
import os from langchain import Cohere from langchain.llms import OpenAI from gptcache.adapter.langchain_models import LangChainLLMs from gptcache import cache, Cache from gptcache.processor.pre import get_prompt OpenAI.api_key = os.getenv("OPENAI_API_KEY") Cohere.cohere_api_key = os.getenv("COHERE_API_KEY") def r...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/langchain/langchain_qa_chain.py
null
null
null
null
null
null
Python
2026-05-04T02:14:34.993352
import time from langchain import OpenAI from langchain.chains.question_answering import load_qa_chain from langchain.schema import Document from gptcache import cache from gptcache.adapter.api import init_similar_cache from gptcache.adapter.langchain_models import LangChainLLMs def get_content_func(data, **_): ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/langchain/langchain_similaritycache_openai.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.024090
import os import time import openai from langchain import PromptTemplate from langchain.llms import OpenAI from gptcache import Cache from gptcache.adapter.api import init_similar_cache from gptcache.adapter.langchain_models import LangChainLLMs from gptcache.processor.pre import get_prompt openai.api_key = os.geten...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/openai/create_image.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.047630
import time import base64 from io import BytesIO from PIL import Image from gptcache.adapter import openai from gptcache.processor.pre import get_prompt from gptcache import cache from gptcache.embedding import Onnx from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation from gptcache.manager imp...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/llama_cpp/basic_usage.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.048889
import time from gptcache.adapter.llama_cpp import Llama from gptcache.manager import manager_factory from gptcache import Cache from gptcache.embedding import Onnx from gptcache.processor.pre import get_prompt def llama_cpp_base_usage(): onnx = Onnx() m = manager_factory("sqlite,faiss,local", data_dir="./ll...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/openai/basic_usage.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.123714
import os import time from gptcache.manager import get_data_manager, VectorBase from gptcache import cache, Cache from gptcache.embedding import Onnx from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation from gptcache.adapter import openai def response_text(openai_resp): return openai_resp...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/openai/qa.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.124944
import os import openai import time openai.api_key = os.getenv('OPENAI_API_KEY') before = time.time() response = openai.ChatCompletion.create( model='gpt-3.5-turbo', messages=[ {'role': 'user', 'content': 'I am a highly intelligent question answering bot. If you ask me a question that is rooted in truth,...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/openai/readme.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.179602
import os import time import openai def response_text(openai_resp): return openai_resp['choices'][0]['message']['content'] # Before running this case, make sure the OPENAI_API_KEY environment variable is set question = 'what‘s chatgpt' # OpenAI API original usage openai.api_key = os.getenv('OPENAI_API_KEY') ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/replicate/vqa.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.498076
import time from gptcache import cache from gptcache.adapter import replicate from gptcache.embedding import Timm, Onnx from gptcache.manager import get_data_manager, CacheBase, VectorBase, ObjectBase from gptcache.processor.pre import get_input_image_file_name from gptcache.similarity_evaluation.np import NumpyNormEv...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/openai/summarize.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.508409
import os import openai import time openai.api_key = os.getenv('OPENAI_API_KEY') before = time.time() response = openai.ChatCompletion.create( model='gpt-3.5-turbo', messages=[ {'role': 'user', 'content': 'Summarize this for a second-grade student:\n\nJupiter is the fifth planet from the Sun and the larg...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/integrate/stability/text_to_image.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.554811
import io import os import time from PIL import Image from gptcache import cache from gptcache.adapter.stability_sdk import StabilityInference, generation from gptcache.embedding import Onnx from gptcache.manager.factory import manager_factory from gptcache.processor.pre import get_prompt from gptcache.similarity_eva...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/processor/llm_verifier_example.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.556177
import time import os from gptcache import cache from gptcache.adapter import openai from gptcache.embedding import Onnx from gptcache.manager import manager_factory from gptcache.processor.post import LlmVerifier from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation print("This example demonst...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/similarity_evaluation/exact_match.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.613185
from gptcache.adapter import openai from gptcache import cache from gptcache.similarity_evaluation.exact_match import ExactMatchEvaluation def run(): cache.init(similarity_evaluation=ExactMatchEvaluation()) cache.set_openai_key() answer = openai.ChatCompletion.create( model='gpt-3.5-turbo', ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/processor/temperature_example.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.638502
import time from gptcache import cache from gptcache.adapter import openai from gptcache.embedding import Onnx from gptcache.manager import manager_factory from gptcache.processor.post import temperature_softmax from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation cache.set_openai_key() # Ini...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/session/session.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.667327
from gptcache import cache from gptcache.session import Session from gptcache.adapter import openai # init gptcache cache.init() cache.set_openai_key() def run_session(): session = Session() response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[ ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/similarity_evaluation/onnx.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.740420
from gptcache.adapter import openai from gptcache import cache from gptcache.manager import get_data_manager, CacheBase, VectorBase from gptcache.embedding import Onnx as EmbeddingOnnx from gptcache.similarity_evaluation import OnnxModelEvaluation def run(): onnx = EmbeddingOnnx() evaluation_onnx = OnnxModelE...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/similarity_evaluation/sequence_match.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.798216
from gptcache.adapter import openai from gptcache import cache from gptcache.manager import get_data_manager, VectorBase from gptcache.similarity_evaluation import SequenceMatchEvaluation from gptcache.processor.pre import concat_all_queries from gptcache.embedding import Onnx from gptcache import Config def run(): ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/similarity_evaluation/search_distance.py
null
null
null
null
null
null
Python
2026-05-04T02:14:35.852645
from gptcache.adapter import openai from gptcache import cache from gptcache.manager import get_data_manager, VectorBase from gptcache.similarity_evaluation.distance import SearchDistanceEvaluation from gptcache.embedding import Onnx def run(): onnx = Onnx() vector_base = VectorBase('faiss', dimension=onnx.d...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
examples/vqa_demo.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.097039
# ================================================================================ # This demo comes from [minigpt4](https://github.com/Vision-CAIR/MiniGPT-4) # and is integrated with [gptcahe](https://github.com/zilliztech/GPTCache) # for image Question Answering. # Please make sure you have successfully setup minigpt...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
gptcache/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.114911
"""gptcache version""" __version__ = "0.1.44" from gptcache.config import Config from gptcache.core import Cache from gptcache.core import cache
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
gptcache/adapter/adapter.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.134364
import time import numpy as np from gptcache import cache from gptcache.processor.post import temperature_softmax, LlmVerifier from gptcache.utils.error import NotInitError from gptcache.utils.log import gptcache_log from gptcache.utils.time import time_cal def adapt(llm_handler, cache_data_convert, update_cache_ca...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
gptcache/adapter/base.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.226952
from abc import ABCMeta from typing import Any, Dict, Callable, Optional class BaseCacheLLM(metaclass=ABCMeta): """Base LLM, When you have enhanced llm without using the original llm api, you can use this class as a proxy to use the ability of the cache. NOTE: Please make sure that the custom llm returns...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
gptcache/adapter/api.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.309733
# pylint: disable=wrong-import-position from typing import Any, Optional, Callable import gptcache.processor.post import gptcache.processor.pre from gptcache import Cache, cache, Config from gptcache.adapter.adapter import adapt from gptcache.embedding import ( Onnx, Huggingface, SBERT, FastText, D...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
gptcache/adapter/dolly.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.339637
from typing import Any from gptcache.adapter.adapter import adapt from gptcache.manager.scalar_data.base import Answer, DataType from gptcache.utils import import_huggingface, import_torch import_torch() import_huggingface() from transformers import pipeline # pylint: disable=wrong-import-position class Dolly: ...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
gptcache/adapter/langchain_models.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.363125
from typing import Optional, List, Any, Mapping from gptcache.adapter.adapter import adapt, aadapt from gptcache.core import cache from gptcache.manager.scalar_data.base import Answer, DataType from gptcache.session import Session from gptcache.utils import import_langchain import_langchain() # pylint: disable=C0413...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
gptcache/adapter/diffusers.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.391486
import base64 from io import BytesIO from gptcache.adapter.adapter import adapt from gptcache.manager.scalar_data.base import Answer, DataType from gptcache.utils import ( import_pillow, import_diffusers, import_huggingface ) from gptcache.utils.error import CacheError import_pillow() import_huggingface() import_...
zilliztech/GPTCache
https://github.com/zilliztech/GPTCache
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
gptcache/adapter/llama_cpp.py
null
null
null
null
null
null
Python
2026-05-04T02:14:36.576211
import time from typing import Iterator from gptcache.adapter.adapter import adapt from gptcache.manager.scalar_data.base import DataType, Answer from gptcache.utils import import_llama_cpp_python import_llama_cpp_python() import llama_cpp # pylint: disable=wrong-import-position class Llama(llama_cpp.Llama): "...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/ab_decorator/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.159300
import asyncio import functools import logging import httpx from .timeout import timeout logger = logging.getLogger(__name__) _lock = asyncio.Lock() _RETRY_DELAYS = [5, 15, 45, 120, 300] def qb_connect_failed_wait(func): @functools.wraps(func) async def wrapper(*args, **kwargs): times = 0 ...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/dev_server.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.177481
"""Minimal dev server that skips downloader check for UI testing.""" import uvicorn from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi import APIRouter from module.database.combine import Database from module.database.engine import engine # Initialize DB + migrations + default...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/config.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.178828
import logging from fastapi import APIRouter, Depends from fastapi.responses import JSONResponse from module.conf import settings from module.models import APIResponse, Config from module.security.api import UNAUTHORIZED, get_current_user router = APIRouter(prefix="/config", tags=["config"]) logger = logging.getLogg...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/ab_decorator/timeout.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.200729
import signal def timeout(seconds): def decorator(func): def handler(signum, frame): raise TimeoutError("Function timed out.") def wrapper(*args, **kwargs): # 设置信号处理程序,当超时时触发TimeoutError异常 signal.signal(signal.SIGALRM, handler) signal.alarm(seconds)...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/auth.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.203094
from datetime import datetime, timedelta from fastapi import APIRouter, Cookie, Depends, HTTPException, status from fastapi.responses import JSONResponse, Response from fastapi.security import OAuth2PasswordRequestForm from module.models import APIResponse from module.models.user import User, UserUpdate from module.s...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/bangumi.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.204505
from typing import Literal, Optional from fastapi import APIRouter, Depends from fastapi.responses import JSONResponse from pydantic import BaseModel from module.conf import settings from module.database import Database from module.manager import TorrentManager from module.models import APIResponse, Bangumi, BangumiU...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/downloader.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.205681
import logging from fastapi import APIRouter, Depends from pydantic import BaseModel from module.database import Database from module.downloader import DownloadClient from module.security.api import get_current_user logger = logging.getLogger(__name__) router = APIRouter(prefix="/downloader", tags=["downloader"]) ...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.206586
from fastapi import APIRouter from .auth import router as auth_router from .bangumi import router as bangumi_router from .config import router as config_router from .downloader import router as downloader_router from .log import router as log_router from .passkey import router as passkey_router from .program import ro...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/main.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.233035
import logging import os from contextlib import asynccontextmanager from pathlib import Path import uvicorn from fastapi import FastAPI, Request from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import FileResponse, HTMLResponse, RedirectResponse from fastapi.staticfiles import StaticFiles from...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/log.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.751656
from fastapi import APIRouter, Depends, HTTPException, Response, status from fastapi.responses import JSONResponse from module.conf import LOG_PATH from module.models import APIResponse from module.security.api import UNAUTHORIZED, get_current_user router = APIRouter(prefix="/log", tags=["log"]) _TAIL_BYTES = 512 *...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/response.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.808779
from fastapi.exceptions import HTTPException from fastapi.responses import JSONResponse from module.models.response import ResponseModel def u_response(response_model: ResponseModel): return JSONResponse( status_code=response_model.status_code, content={ "msg_en": response_model.msg_e...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/passkey.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.828166
""" Passkey 管理 API 用于注册、列表、删除 Passkey 凭证 """ import logging from datetime import datetime, timedelta from fastapi import APIRouter, Depends, HTTPException, Request from fastapi.responses import JSONResponse, Response from sqlmodel import select from module.database.engine import async_session_factory from module.dat...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/setup.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.836978
import ipaddress import logging import socket from pathlib import Path from urllib.parse import urlparse import httpx from fastapi import APIRouter, HTTPException from pydantic import BaseModel, Field from module.conf import VERSION, settings from module.models import Config, ResponseModel from module.models.config i...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/notification.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.853324
"""Notification API endpoints.""" import logging from typing import Optional from fastapi import APIRouter, Depends from pydantic import BaseModel, Field from module.models.config import NotificationProvider as ProviderConfig from module.notification import NotificationManager from module.security.api import get_cur...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/program.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.853839
import logging import os import signal from fastapi import APIRouter, Depends, HTTPException from fastapi.responses import JSONResponse from module.conf import VERSION from module.core import Program from module.models import APIResponse from module.security.api import UNAUTHORIZED, get_current_user from .response i...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/rss.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.865224
from fastapi import APIRouter, Depends from fastapi.responses import JSONResponse from module.downloader import DownloadClient from module.manager import SeasonCollector from module.models import APIResponse, Bangumi, RSSItem, RSSUpdate, Torrent from module.rss import RSSAnalyser, RSSEngine from module.security.api im...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/api/search.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.881873
from fastapi import APIRouter, Depends, Query from sse_starlette.sse import EventSourceResponse from module.conf.search_provider import get_provider, save_provider from module.models import Bangumi from module.searcher import SEARCH_CONFIG, SearchTorrent from module.security.api import UNAUTHORIZED, get_current_user ...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/checker/checker.py
null
null
null
null
null
null
Python
2026-05-04T02:14:39.912354
import logging from pathlib import Path import httpx from module.conf import VERSION, settings from module.models import Config from module.update import version_check logger = logging.getLogger(__name__) _default_config_dict: dict | None = None def _get_default_config_dict() -> dict: global _default_config_...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/conf/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.324716
import sys from pathlib import Path from .config import VERSION, settings from .log import LOG_PATH, setup_logger from .search_provider import SEARCH_CONFIG TMDB_API = "32b19d6a05b512190a056fa4e747cbbc" DATA_PATH = "sqlite:///data/data.db" LEGACY_DATA_PATH = Path("data/data.json") VERSION_PATH = Path("config/version....
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/conf/config.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.401300
import json import logging import os from pathlib import Path from dotenv import load_dotenv from module.models.config import Config from .const import DEFAULT_SETTINGS, ENV_TO_ATTR logger = logging.getLogger(__name__) CONFIG_ROOT = Path("config") try: from module.__version__ import VERSION except ImportError...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/conf/const.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.455934
# -*- encoding: utf-8 -*- # DEFAULT_SETTINGS: factory defaults written to config.json on first run. # ENV_TO_ATTR: maps AB_* environment variables to Config model attribute paths. # Values are either a string attr name, a (attr_name, converter) tuple, or a # list of such tuples when a single env var sets multiple a...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/conf/parse.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.462026
import argparse def parse(): parser = argparse.ArgumentParser( prog="Auto Bangumi", description=""" 本项目是基于 Mikan Project、qBittorrent 的全自动追番整理下载工具。 只需要在 Mikan Project 上订阅番剧,就可以全自动追番。 并且整理完成的名称和目录可以直接被 Plex、Jellyfin 等媒体库软件识别, 无需二次刮削。""", ) parser.add_argument...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/conf/search_provider.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.482822
from pathlib import Path from module.utils import json_config DEFAULT_PROVIDER = { "mikan": "https://mikanani.me/RSS/Search?searchstr=%s", "nyaa": "https://nyaa.si/?page=rss&q=%s&c=0_0&f=0", "dmhy": "http://dmhy.org/topics/rss/rss.xml?keyword=%s", } PROVIDER_PATH = Path("config/search_provider.json") d...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/conf/log.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.483853
import atexit import logging from logging.handlers import QueueHandler, QueueListener, RotatingFileHandler from pathlib import Path from queue import SimpleQueue from .config import settings LOG_ROOT = Path("data") LOG_PATH = LOG_ROOT / "log.txt" _listener: QueueListener | None = None def setup_logger(level: int =...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/core/offset_scanner.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.511389
"""Background scanner for detecting season/episode offset mismatches.""" import logging from module.conf import settings from module.database import Database from module.models import Bangumi from module.parser.analyser.offset_detector import detect_offset_mismatch from module.parser.analyser.tmdb_parser import tmdb_...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/conf/uvicorn_logging.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.512310
from .log import LOG_PATH logging_config = { "version": 1, "disable_existing_loggers": False, "formatters": { "default": { "format": "[%(asctime)s] %(levelname)-8s %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", } }, "handlers": { "file": { ...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/core/program.py
null
null
null
null
null
null
Python
2026-05-04T02:14:40.513903
import asyncio import logging from module.conf import VERSION, settings from module.models import ResponseModel from module.update import ( cache_image, data_migration, first_run, from_30_to_31, from_31_to_32, run_migrations, start_up, ) from .sub_thread import CalendarRefreshThread, Offse...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/core/status.py
null
null
null
null
null
null
Python
2026-05-04T02:14:41.379663
import asyncio import time from module.checker import Checker from module.conf import LEGACY_DATA_PATH DOWNLOADER_STATUS_TTL = 60 class ProgramStatus(Checker): def __init__(self): super().__init__() self.stop_event = asyncio.Event() self.lock = asyncio.Lock() self._downloader_sta...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/database/torrent.py
null
null
null
null
null
null
Python
2026-05-04T02:14:41.555605
import logging from sqlmodel import Session, select from module.models import Torrent logger = logging.getLogger(__name__) class TorrentDatabase: def __init__(self, session: Session): self.session = session def add(self, data: Torrent): self.session.add(data) self.session.commit() ...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/database/combine.py
null
null
null
null
null
null
Python
2026-05-04T02:14:41.557179
import logging from typing import Any, get_args, get_origin from pydantic.fields import FieldInfo from pydantic_core import PydanticUndefined from sqlalchemy import inspect, text from sqlmodel import Session, SQLModel from module.models import Bangumi, User from module.models.passkey import Passkey from module.models...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/database/bangumi.py
null
null
null
null
null
null
Python
2026-05-04T02:14:41.621686
import json import logging import re import time from typing import Optional from sqlalchemy.sql import func from sqlmodel import Session, and_, delete, false, or_, select from module.models import Bangumi, BangumiUpdate logger = logging.getLogger(__name__) def _normalize_group_name(group: str | None) -> str: ...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/database/engine.py
null
null
null
null
null
null
Python
2026-05-04T02:14:41.698538
from sqlalchemy import event from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine from sqlalchemy.orm import sessionmaker from sqlmodel import create_engine from module.conf import DATA_PATH # Sync engine (used by Database which extends Session) engine = create_engine(DATA_PATH) # Async engine (for p...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/database/rss.py
null
null
null
null
null
null
Python
2026-05-04T02:14:41.701958
import logging from sqlmodel import Session, and_, delete, select from module.models import RSSItem, RSSUpdate logger = logging.getLogger(__name__) class RSSDatabase: def __init__(self, session: Session): self.session = session def add(self, data: RSSItem) -> bool: statement = select(RSSIt...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/core/sub_thread.py
null
null
null
null
null
null
Python
2026-05-04T02:14:41.843367
import asyncio import logging from module.conf import settings from module.downloader import DownloadClient from module.manager import Renamer, TorrentManager, eps_complete from module.notification import NotificationManager from module.rss import RSSAnalyser, RSSEngine from .offset_scanner import OffsetScanner from ...
EstrellaXD/Auto_Bangumi
https://github.com/EstrellaXD/Auto_Bangumi
null
null
null
null
8,011
null
null
mit
null
null
null
null
null
null
null
backend/src/module/downloader/client/aria2_downloader.py
null
null
null
null
null
null
Python
2026-05-04T02:14:42.255182
import asyncio import logging import httpx from module.conf import settings logger = logging.getLogger(__name__) class Aria2Downloader: def __init__(self, host: str, username: str, password: str): self.host = host self.secret = password self._client: httpx.AsyncClient | None = None ...