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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/configs.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:05.090501 | from pydantic import BaseModel, model_validator
from typing import List, Optional, Union, Tuple
from enum import Enum
from imagen_pytorch.imagen_pytorch import Imagen, Unet, Unet3D, NullUnet
from imagen_pytorch.trainer import ImagenTrainer
from imagen_pytorch.elucidated_imagen import ElucidatedImagen
from imagen_pytor... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/test/test_trainer.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:05.124988 | from imagen_pytorch.trainer import ImagenTrainer
from imagen_pytorch.configs import ImagenConfig
from imagen_pytorch.t5 import t5_encode_text
from torch.utils.data import Dataset
import torch
def test_trainer_instantiation():
unet1 = dict(
dim = 8,
dim_mults = (1, 1, 1, 1),
num_resnet_block... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:05.163928 | from imagen_pytorch.imagen_pytorch import Imagen, Unet
from imagen_pytorch.imagen_pytorch import NullUnet
from imagen_pytorch.imagen_pytorch import BaseUnet64, SRUnet256, SRUnet1024
from imagen_pytorch.trainer import ImagenTrainer
from imagen_pytorch.version import __version__
# imagen using the elucidated ddpm from T... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/t5.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:05.164788 | import torch
import transformers
from typing import List
from transformers import T5Tokenizer, T5EncoderModel, T5Config
from einops import rearrange
transformers.logging.set_verbosity_error()
def exists(val):
return val is not None
def default(val, d):
if exists(val):
return val
return d() if cal... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/cli.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:05.201980 | import click
import torch
from pathlib import Path
import pkgutil
from imagen_pytorch import load_imagen_from_checkpoint
from imagen_pytorch.version import __version__
from imagen_pytorch.data import Collator
from imagen_pytorch.utils import safeget
from imagen_pytorch import ImagenTrainer, ElucidatedImagenConfig, Ima... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/elucidated_imagen.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:05.664530 | from math import sqrt
from random import random
from functools import partial
from contextlib import contextmanager, nullcontext
from typing import List, Union
from collections import namedtuple
from tqdm.auto import tqdm
import torch
import torch.nn.functional as F
from torch import nn
from torch.amp import autocast
... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/imagen_video.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:05.907418 | import math
import operator
import functools
from tqdm.auto import tqdm
from functools import partial, wraps
from pathlib import Path
import torch
import torch.nn.functional as F
from torch import nn, einsum
from einops import rearrange, repeat, pack, unpack
from einops.layers.torch import Rearrange
from imagen_pyto... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/trainer.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:06.672194 | import os
from math import ceil
from contextlib import contextmanager, nullcontext
from functools import partial, wraps
from collections.abc import Iterable
import torch
from torch import nn
import torch.nn.functional as F
from torch.utils.data import random_split, DataLoader
from torch.optim import Adam
from torch.op... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:06.702195 | import torch
from torch import nn
from functools import reduce
from pathlib import Path
from imagen_pytorch.configs import ImagenConfig, ElucidatedImagenConfig
from ema_pytorch import EMA
def exists(val):
return val is not None
def safeget(dictionary, keys, default = None):
return reduce(lambda d, key: d.get... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | imagen_pytorch/imagen_pytorch.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:06.703002 | import math
from random import random
from beartype.typing import List, Union, Optional
from beartype import beartype
from tqdm.auto import tqdm
from functools import partial, wraps
from contextlib import contextmanager, nullcontext
from pathlib import Path
import torch
import torch.nn.functional as F
from torch.nn.pa... |
lucidrains/imagen-pytorch | https://github.com/lucidrains/imagen-pytorch | null | null | null | null | 8,407 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:10.888561 | from setuptools import setup, find_packages
exec(open('imagen_pytorch/version.py').read())
setup(
name = 'imagen-pytorch',
packages = find_packages(exclude=[]),
include_package_data = True,
entry_points={
'console_scripts': [
'imagen_pytorch = imagen_pytorch.cli:main',
'imagen = imagen_pytorch.... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/backup_create.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.344002 | #!/usr/bin/env python
import argparse
import subprocess
import sys
from time import sleep
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--datadir", required=True)
parser.add_argument("--dbname", required=True)
parser.add_argument("--walmethod", required=True, choic... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | .github/workflows/mapping.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.348319 | versions = {'etcd': '9.6', 'etcd3': '17', 'consul': '18', 'exhibitor': '12', 'raft': '14', 'kubernetes': '16'}
|
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/backup_restore.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.361088 | #!/usr/bin/env python
import argparse
import shutil
from time import sleep
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--datadir", required=True)
parser.add_argument("--sourcedir", required=True)
parser.add_argument("--test-argument", required=True)
parser.ad... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/environment.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.362370 | import abc
import datetime
import glob
import json
import os
import re
import shutil
import signal
import stat
import subprocess
import sys
import tempfile
import threading
import time
from http.server import BaseHTTPRequestHandler, HTTPServer
import psutil
import yaml
import patroni.psycopg as psycopg
from patroni... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/basic_replication.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.364400 | import json
from time import sleep, time
import parse
from behave import register_type, step, then
import patroni.psycopg as pg
@parse.with_pattern(r'[a-z][a-z0-9_\-]*[a-z0-9]')
def parse_name(text):
return text
register_type(name=parse_name)
@step('I start {name:name}')
def start_patroni(context, name):
... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | .github/workflows/install_deps.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.367249 | import inspect
import os
import shutil
import subprocess
import stat
import sys
import tarfile
import zipfile
def install_requirements(what):
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'pip'])
s = subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'wheel', 'setupt... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/callback2.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.371266 | #!/usr/bin/env python
import sys
with open("data/{0}/{0}_cb.log".format(sys.argv[1]), "a+") as log:
log.write(" ".join(sys.argv[-3:]) + "\n")
|
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/archive-restore.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.372785 | #!/usr/bin/env python
import argparse
import os
import shutil
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--dirname", required=True)
parser.add_argument("--pathname", required=True)
parser.add_argument("--filename", required=True)
parser.add_argument("--mode",... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | .github/workflows/run_tests.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.410465 | import os
import shutil
import subprocess
import sys
import tempfile
def main():
what = os.environ.get('DCS', sys.argv[1] if len(sys.argv) > 1 else 'all')
if what == 'all':
flake8 = subprocess.call([sys.executable, 'setup.py', 'flake8'])
test = subprocess.call([sys.executable, 'setup.py', 'te... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/bootstrap_labels.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.991646 | from behave import step, then
@step('I start {name:name} in a cluster {cluster_name:w} as a long-running clone of {name2:name}')
def start_cluster_clone(context, name, cluster_name, name2):
context.pctl.clone(name2, cluster_name, name, True)
@step('I start {name:name} in cluster {cluster_name:w} using long-runn... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/cascading_replication.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.992890 | import json
import time
from behave import step, then
@step('I configure and start {name:name} with a tag {tag_name:w} {tag_value}')
def start_patroni_with_a_name_value_tag(context, name, tag_name, tag_value):
return context.pctl.start(name, custom_config={'tags': {tag_name: tag_value}})
@then('there is a {lab... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/frozen_patroni.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.994030 | import time
from behave import step, then
def polling_loop(timeout, interval=1):
"""Returns an iterator that returns values until timeout has passed. Timeout is measured from start of iteration."""
start_time = time.time()
iteration = 0
end_time = start_time + timeout
while time.time() < end_time... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/quorum_commit.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.996278 | import json
import re
import time
from behave import step, then
@step('sync key in DCS has {key:w}={value} after {time_limit:d} seconds')
def check_sync(context, key, value, time_limit):
time_limit *= context.timeout_multiplier
max_time = time.time() + int(time_limit)
dcs_value = None
while time.time... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/recovery.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:13.997431 | import os
from behave import step
@step('I ensure {name:name} fails to start after a failure')
def spoil_autoconf(context, name):
with open(os.path.join(context.pctl._processes[name]._data_dir, 'postgresql.auto.conf'), 'w') as f:
f.write('foo=bar')
|
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/dcs_failsafe_mode.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.030256 | from behave import step
@step('DCS is down')
def start_dcs_outage(context):
context.dcs_ctl.start_outage()
@step('DCS is up')
def stop_dcs_outage(context):
context.dcs_ctl.stop_outage()
@step('I start {name:name} in a cluster {cluster_name:w} from backup with no_leader')
def start_cluster_from_backup_no_l... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/citus.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.031221 | import json
import time
from datetime import datetime
from functools import partial
from threading import Event, Thread
from behave import step, then
from dateutil import tz
tzutc = tz.tzutc()
@step('{name:name} is a leader in a group {group:d} after {time_limit:d} seconds')
@then('{name:name} is a leader in a gro... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/patroni_api.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.059844 | import json
import shlex
import subprocess
import sys
import time
from datetime import datetime, timedelta
import parse
import yaml
from behave import register_type, step, then
from dateutil import tz
tzutc = tz.tzutc()
@parse.with_pattern(r'https?://(?:\w|\.|:|/)+')
def parse_url(text):
return text
registe... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/custom_bootstrap.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.061117 | import time
from behave import step, then
@step('I start {name:name} in a cluster {cluster_name:w} as a clone of {name2:name}')
def start_cluster_clone(context, name, cluster_name, name2):
context.pctl.clone(name2, cluster_name, name)
@step('I start {name:name} in a cluster {cluster_name:w} from backup')
def s... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/slots.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.103600 | import json
import time
from behave import step, then
import patroni.psycopg as pg
@step('I create a logical {slot_type} slot {slot_name} on {pg_name:name} with the {plugin:w} plugin')
def create_logical_replication_slot(context, slot_type, slot_name, pg_name, plugin):
failover = ', failover=>true' if slot_type... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.614548 | """Patroni main entry point.
Implement ``patroni`` main daemon and expose its entry point.
"""
import logging
import os
import signal
import sys
import time
from argparse import Namespace
from typing import Any, Dict, List, Optional, TYPE_CHECKING
from patroni import global_config, MIN_PSYCOPG2, MIN_PSYCOPG3, parse... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | features/steps/standby_cluster.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.615836 | import json
import os
import time
from behave import step
from patroni_api import check_response, do_request
def callbacks(context, name):
return {c: '{0} features/callback2.py {1}'.format(context.pctl.PYTHON, name)
for c in ('on_start', 'on_stop', 'on_restart', 'on_role_change')}
@step('I start {n... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.624102 | """Define general variables and functions for :mod:`patroni`.
:var PATRONI_ENV_PREFIX: prefix for Patroni related configuration environment variables.
:var KUBERNETES_ENV_PREFIX: prefix for Kubernetes related configuration environment variables.
:var MIN_PSYCOPG2: minimum version of :mod:`psycopg2` required by Patroni... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/async_executor.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.668409 | """Implement facilities for executing asynchronous tasks."""
import logging
from threading import Event, Lock, RLock
from types import TracebackType
from typing import Any, Callable, Optional, Tuple, Type
from . import thread_pool
from .postgresql.cancellable import CancellableSubprocess
logger = logging.getLogger(_... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/config_generator.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.694471 | """patroni ``--generate-config`` machinery."""
import abc
import logging
import os
import socket
import sys
from contextlib import contextmanager
from getpass import getpass, getuser
from typing import Any, Dict, Iterator, List, Optional, TextIO, Tuple, TYPE_CHECKING, Union
import psutil
import yaml
if TYPE_CHECKING... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/daemon.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.696779 | """Daemon processes abstraction module.
This module implements abstraction classes and functions for creating and managing daemon processes in Patroni.
Currently it is only used for the main "Thread" of ``patroni`` and ``patroni_raft_controller`` commands.
"""
import abc
import argparse
import logging
import os
import... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/api.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.713446 | """Implement Patroni's REST API.
Exposes a REST API of patroni operations functions, such as status, performance and management to web clients.
Much of what can be achieved with the command line tool patronictl can be done via the API. Patroni CLI and daemon
utilises the API to perform these functions.
"""
import ba... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/collections.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.726704 | """Patroni custom object types somewhat like :mod:`collections` module.
Provides a case insensitive :class:`dict` and :class:`set` object types, and `EMPTY_DICT` frozen dictionary object.
"""
from collections import OrderedDict
from copy import deepcopy
from typing import Any, Collection, Dict, Iterator, KeysView, Map... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:14.744264 | """Facilities related to Patroni configuration."""
import json
import logging
import os
import re
import shutil
import tempfile
from collections import defaultdict
from copy import deepcopy
from typing import Any, Callable, cast, Collection, Dict, List, Optional, TYPE_CHECKING, Union
import yaml
from . import PATRON... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dcs/etcd.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:16.153621 | import abc
import json
import logging
import os
import random
import socket
import time
from collections import defaultdict
from copy import deepcopy
from http.client import HTTPException
from queue import Queue
from threading import Thread
from typing import Any, Callable, Collection, Dict, List, Optional, Tuple, Typ... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dcs/etcd3.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:16.188935 | import base64
import functools
import json
import logging
import os
import socket
import sys
import time
from collections import defaultdict
from enum import IntEnum
from threading import Condition, Lock, Thread
from typing import Any, Callable, Collection, Dict, Iterator, List, Optional, Tuple, Type, TYPE_CHECKING, U... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/exceptions.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:16.207235 | """Implement high-level Patroni exceptions.
More specific exceptions can be found in other modules, as subclasses of any exception defined in this module.
"""
from typing import Any
class PatroniException(Exception):
"""Parent class for all kind of Patroni exceptions.
:ivar value: description of the excepti... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dynamic_loader.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:16.223824 | """Helper functions to search for implementations of specific abstract interface in a package."""
import importlib
import inspect
import logging
import os
import pkgutil
import sys
from types import ModuleType
from typing import Any, Dict, Iterator, List, Optional, Set, Tuple, Type, TYPE_CHECKING, TypeVar, Union
if T... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dcs/consul.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:16.244606 | import json
import logging
import os
import re
import socket
import ssl
import time
from collections import defaultdict
from http.client import HTTPException
from typing import Any, Callable, Dict, List, Mapping, NamedTuple, Optional, Tuple, TYPE_CHECKING, Union
from urllib.parse import quote, urlencode, urlparse
imp... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dcs/exhibitor.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:16.301748 | import json
import logging
import random
import time
from typing import Any, Callable, cast, Dict, List, Union
from ..postgresql.mpp import AbstractMPP
from ..request import get as requests_get
from ..utils import uri
from . import Cluster
from .zookeeper import ZooKeeper
logger = logging.getLogger(__name__)
class... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dcs/raft.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:16.819055 | import json
import logging
import os
import threading
import time
from collections import defaultdict
from typing import Any, Callable, Collection, Dict, List, Optional, Set, TYPE_CHECKING, Union
from pysyncobj import FAIL_REASON, replicated, SyncObj, SyncObjConf
from pysyncobj.dns_resolver import globalDnsResolver
f... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dcs/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:16.825789 | """Abstract classes for Distributed Configuration Store."""
import abc
import datetime
import json
import logging
import re
import time
from collections import defaultdict
from copy import deepcopy
from random import randint
from threading import Event, Lock
from typing import Any, Callable, cast, Collection, Dict, It... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dcs/kubernetes.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:17.012190 | import atexit
import base64
import datetime
import functools
import json
import logging
import os
import random
import socket
import tempfile
import time
from collections import defaultdict
from copy import deepcopy
from http.client import HTTPException
from threading import Condition, Lock, Thread
from typing import ... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/file_perm.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:17.067285 | """Helper object that helps with figuring out file and directory permissions based on permissions of PGDATA.
:var logger: logger of this module.
:var pg_perm: instance of the :class:`__FilePermissions` object.
"""
import logging
import os
import stat
logger = logging.getLogger(__name__)
class __FilePermissions:
... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/dcs/zookeeper.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:17.334558 | import json
import logging
import select
import socket
import time
from typing import Any, Callable, cast, Dict, List, Optional, Tuple, TYPE_CHECKING, Union
from kazoo.client import KazooClient, KazooRetry, KazooState
from kazoo.exceptions import ConnectionClosedError, NodeExistsError, NoNodeError, SessionExpiredErro... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/postgresql/callback_executor.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:17.408702 | import logging
import sys
from enum import Enum
from threading import Condition, Thread
from typing import Any, Dict, List
from .. import thread_pool
from .cancellable import CancellableExecutor, CancellableSubprocess
logger = logging.getLogger(__name__)
class CallbackAction(str, Enum):
NOOP = "noop"
ON_ST... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/postgresql/cancellable.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:17.464764 | import logging
import subprocess
from threading import Lock
from typing import Any, Dict, List, Optional
import psutil
from patroni.exceptions import PostgresException
from patroni.utils import polling_loop
logger = logging.getLogger(__name__)
class CancellableExecutor(object):
"""
There must be only one... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/postgresql/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:17.659680 | import logging
import os
import re
import shutil
import socket
import stat
import time
from contextlib import contextmanager
from types import TracebackType
from typing import Any, Callable, Collection, Dict, Iterator, List, Optional, Tuple, Type, TYPE_CHECKING, Union
from urllib.parse import parse_qsl, unquote, urlpa... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/postgresql/connection.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:17.698711 | import logging
from contextlib import contextmanager
from threading import Lock
from typing import Any, Dict, Iterator, List, Optional, Tuple, TYPE_CHECKING, Union
if TYPE_CHECKING: # pragma: no cover
from psycopg import Connection, Cursor
from psycopg2 import connection, cursor
from .. import psycopg
from ... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/global_config.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:21.815118 | """Implements *global_config* facilities.
The :class:`GlobalConfig` object is instantiated on import and replaces
``patroni.global_config`` module in :data:`sys.modules`, what allows to use
its properties and methods like they were module variables and functions.
"""
import sys
import types
from copy import deepcopy
... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/log.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:21.874183 | """Patroni logging facilities.
Daemon processes will use a 2-step logging handler. Whenever a log message is issued it is initially enqueued in-memory
and is later asynchronously flushed by a thread to the final destination.
"""
import logging
import os
import sys
from copy import deepcopy
from io import TextIOWrappe... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/postgresql/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:21.892153 | import logging
import os
import re
import shlex
import shutil
import subprocess
import time
from contextlib import contextmanager
from copy import deepcopy
from datetime import datetime
from enum import IntEnum
from threading import current_thread, Lock
from typing import Any, Callable, Dict, Iterator, List, Optional,... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/postgresql/bootstrap.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:21.939500 | import logging
import os
import shlex
import tempfile
import time
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union
from ..async_executor import CriticalTask
from ..collections import EMPTY_DICT
from ..dcs import Leader, Member, RemoteMember
from ..psycopg import quote_ident, quote_literal
from ..uti... |
patroni/patroni | https://github.com/patroni/patroni | null | null | null | null | 8,399 | null | null | mit | null | null | null | null | null | null | null | patroni/postgresql/available_parameters/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:21.997271 | import logging
import sys
from typing import Iterator
logger = logging.getLogger(__name__)
if sys.version_info < (3, 9): # pragma: no cover
from pathlib import Path
PathLikeObj = Path
conf_dir = Path(__file__).parent
else:
from importlib.resources import files
if sys.version_info < (3, 11): #... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/benchmarks/multihop_bench.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:32.012739 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""MultiHOP RAG benchmark — end-to-end RAG evaluation with multi-hop queries."""
from __future__ import annotations
import logging ... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/benchmarks/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:32.014601 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""Abstract benchmark runner: download -> ingest -> query -> evaluate."""
from __future__ import annotations
import json
import logg... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/k8s-benchmark/openai-mock-server.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:32.015611 | #!/usr/bin/env python3
# Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""
OpenAI-compatible mock server that returns:
- Hardcoded /models response for consistent validation
- Valid ... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/benchmarks/qrecc_bench.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:32.017142 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""QReCC benchmark — conversational QA with scoped corpus per conversation."""
from __future__ import annotations
import json
import... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/k8s-benchmark/scripts/generate_charts.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:32.017879 | #!/usr/bin/env python3
# Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
# /// script
# dependencies = [
# "matplotlib",
# ]
# ///
"""
Script to generate benchmark charts from guidel... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/benchmarks/doc2dial_bench.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:32.019177 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""Doc2Dial benchmark — document-grounded dialogue evaluation."""
from __future__ import annotations
import json
import logging # a... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/benchmarks/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:32.934053 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
|
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/benchmarks/beir_bench.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:32.935723 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""BEIR benchmark adapter — retrieval-only evaluation via Vector Stores Search API."""
from __future__ import annotations
import log... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/lib/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:33.142257 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
|
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/lib/ingest.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:33.691007 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""Corpus upload: Files API -> Vector Stores API (batched, checkpointed)."""
from __future__ import annotations
import io
import log... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/lib/search.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:33.771777 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""Retrieval-only evaluation via Vector Stores Search API."""
from __future__ import annotations
import logging # allow-direct-logg... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/run_benchmark.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:33.978571 | #!/usr/bin/env python3
# Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""CLI entry point for running RAG benchmarks."""
from pathlib import Path
import click
from lib.client impor... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/lib/query.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.058428 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""End-to-end RAG evaluation via Responses API with file_search tool."""
from __future__ import annotations
import json
import loggi... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/lib/client.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.171720 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""OpenAI client wrapper — configurable base_url is the only difference between backends."""
import os
from dotenv import load_doten... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/build_hierarchy.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.357932 | #!/usr/bin/env python3
# Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""
Process OpenAPI spec to extract tag hierarchy and prepare for SDK generation.
This script operates on a St... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/merge_stainless_config.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.440350 | #!/usr/bin/env python3
# Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""
Merge Stainless configuration into OpenAPI spec.
This script takes:
1. client-sdks/stainless/openapi.yml -... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/vertical-scaling/locustfile.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.553501 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import json
from locust import HttpUser, task
class ChatCompletionUser(HttpUser):
"""
Locust user for straightline performa... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/patch_hierarchy.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.605451 | #!/usr/bin/env python3
# Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""
Patch generated API classes to add hierarchical properties.
This is a post-generation step that reads the ... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.664500 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from .tools.mcp_oauth import get_oauth_token_for_mcp_server
__all__ = ["get_oauth_token_for_mcp_server"]
try:
from .agents.agent... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.738328 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import re
def pascal_to_snake_case(name: str) -> str:
"""Convert PascalCase string to snake_case.
Handles sequences like "O... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | benchmarking/rag/compare_results.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.779044 | #!/usr/bin/env python3
# Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""Compare results across backends: OpenAI SaaS vs OGX (vector vs hybrid)."""
import json
from pathlib import ... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:34.967391 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
|
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/agent.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.041890 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import json
import logging
from collections.abc import AsyncIterator, Callable, Iterator
from typing import (
Any,
TypedDict,
)... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/event_logger.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.166546 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""Event logger for agent interactions.
This module provides a simple logger that converts agent stream events
into human-readable pr... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/client_tool.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.185179 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import inspect
import json
from abc import abstractmethod
from collections.abc import Callable
from typing import (
Any,
Union... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/event_synthesizer.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.292663 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""Translate Responses API stream events into structured turn events.
TurnEventSynthesizer keeps just enough state to expose turns an... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/react/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.343110 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
|
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/react/agent.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.410285 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import logging
from collections.abc import Callable, Mapping
from typing import Any
from ...._types import Headers
from ..agent import... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/react/prompts.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.524626 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
DEFAULT_REACT_AGENT_SYSTEM_PROMPT_TEMPLATE = """
You are an expert assistant who can solve any task using tool calls. You will be give... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/react/tool_parser.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.595548 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import json
import uuid
from pydantic import BaseModel, ValidationError
from ..tool_parser import ToolParser
from ..types import Com... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/tool_parser.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.725836 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from abc import abstractmethod
from .types import CompletionMessage, ToolCall
class ToolParser:
"""
Abstract base class for... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/turn_events.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.771852 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""High-level turn and step events for agent interactions.
This module defines the semantic event model that wraps the lower-level
re... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/agents/types.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.883784 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""Lightweight agent-facing types that avoid ogx SDK dependencies."""
from __future__ import annotations
from dataclasses import dat... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/cli/common/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.970861 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
|
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/cli/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:35.976431 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
# Ignore tqdm experimental warning
import warnings
from tqdm import TqdmExperimentalWarning
warnings.filterwarnings("ignore", catego... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/cli/common/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:36.125477 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from functools import wraps
from rich.console import Console
from rich.panel import Panel
from rich.table import Table
def create_ba... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/cli/configure.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:36.146042 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import os
from urllib.parse import urlparse
import click
import yaml
from prompt_toolkit import prompt
from prompt_toolkit.validation... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/cli/constants.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:36.309293 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import os
from pathlib import Path
OGX_CLIENT_CONFIG_DIR = Path(os.path.expanduser("~/.ogx/client"))
def get_config_file_path():
... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/cli/datasets/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:36.369179 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from .datasets import datasets
__all__ = ["datasets"]
|
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/cli/datasets/datasets.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:36.562263 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import click
from .list import list_datasets
from .register import register
from .unregister import unregister
@click.group()
@click... |
ogx-ai/ogx | https://github.com/ogx-ai/ogx | null | null | null | null | 8,363 | null | null | mit | null | null | null | null | null | null | null | client-sdks/openapi/templates/python/lib/cli/datasets/list.py | null | null | null | null | null | null | Python | 2026-05-04T02:11:36.576424 | # Copyright (c) The OGX Contributors.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import click
from rich.console import Console
from rich.table import Table
from ..common.utils import handle_client_errors
@click.c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.