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
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/github_review.py
null
null
null
null
null
null
Python
2026-05-04T02:04:11.480747
import asyncio from typing import Any import httpx from langgraph.config import get_config from ..utils.github_app import get_github_app_installation_token GITHUB_API_BASE = "https://api.github.com" def _get_repo_config() -> dict[str, str]: config = get_config() return config.get("configurable", {}).get("r...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/github_ci.py
null
null
null
null
null
null
Python
2026-05-04T02:04:11.481738
import asyncio from typing import Any import httpx from langgraph.config import get_config from ..utils.github_app import get_github_app_installation_token GITHUB_API_BASE = "https://api.github.com" PER_PAGE = 100 HTTP_TIMEOUT_SECONDS = 30.0 FAILED_CONCLUSIONS = ("failure", "timed_out", "cancelled", "action_require...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/authorship.py
null
null
null
null
null
null
Python
2026-05-04T02:04:12.289184
"""Helpers for collaborative commit and PR attribution.""" from __future__ import annotations import logging from dataclasses import dataclass from typing import Any import httpx from .github_user_email_map import GITHUB_USER_EMAIL_MAP logger = logging.getLogger(__name__) OPEN_SWE_BOT_NAME = "open-swe[bot]" OPEN_...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/comments.py
null
null
null
null
null
null
Python
2026-05-04T02:04:13.007186
"""Helpers for Linear comment processing.""" from __future__ import annotations from collections.abc import Sequence from typing import Any def get_recent_comments( comments: Sequence[dict[str, Any]], bot_message_prefixes: Sequence[str] ) -> list[dict[str, Any]] | None: """Return user comments since the las...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/github.py
null
null
null
null
null
null
Python
2026-05-04T02:04:14.149223
"""GitHub API and git utilities.""" from __future__ import annotations import logging import shlex import httpx from deepagents.backends.protocol import ExecuteResponse, SandboxBackendProtocol logger = logging.getLogger(__name__) # HTTP status codes HTTP_CREATED = 201 HTTP_UNPROCESSABLE_ENTITY = 422 def is_perma...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/github_app.py
null
null
null
null
null
null
Python
2026-05-04T02:04:14.948565
"""GitHub App installation token generation.""" from __future__ import annotations import logging import os import time import httpx import jwt logger = logging.getLogger(__name__) GITHUB_APP_ID = os.environ.get("GITHUB_APP_ID", "") GITHUB_APP_PRIVATE_KEY = os.environ.get("GITHUB_APP_PRIVATE_KEY", "") GITHUB_APP_I...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/linear_get_issue.py
null
null
null
null
null
null
Python
2026-05-04T02:04:15.560639
import asyncio from typing import Any from ..utils.linear import get_issue def linear_get_issue(issue_id: str) -> dict[str, Any]: """Get a Linear issue by its ID. Args: issue_id: The Linear issue UUID. Returns: Dictionary with 'issue' containing full issue details. """ return as...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/github_comments.py
null
null
null
null
null
null
Python
2026-05-04T02:04:15.825627
"""GitHub webhook comment utilities.""" from __future__ import annotations import asyncio import hashlib import hmac import logging import re from typing import Any import httpx from .github_user_email_map import GITHUB_USER_EMAIL_MAP logger = logging.getLogger(__name__) OPEN_SWE_TAGS = ("@openswe", "@open-swe", ...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/github_token.py
null
null
null
null
null
null
Python
2026-05-04T02:04:16.372605
"""GitHub token lookup utilities.""" from __future__ import annotations import logging from collections.abc import Mapping from typing import Any from langgraph.config import get_config from langgraph_sdk import get_client from langgraph_sdk.errors import NotFoundError from ..encryption import decrypt_token logger...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/github_user_email_map.py
null
null
null
null
null
null
Python
2026-05-04T02:04:16.562643
"""Mapping of GitHub usernames to LangSmith email addresses. Add entries here as: "github-username": "user@example.com", """ GITHUB_USER_EMAIL_MAP: dict[str, str] = { "aran-yogesh": "yogesh.mahendran@langchain.dev", "AaryanPotdar": "aaryan.potdar@langchain.dev", "agola11": "ankush@langchain.dev", ...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/langsmith.py
null
null
null
null
null
null
Python
2026-05-04T02:04:16.951213
"""LangSmith trace URL utilities.""" from __future__ import annotations import logging import os logger = logging.getLogger(__name__) def _compose_langsmith_project_url() -> str: """Build the LangSmith project URL base from environment variables.""" host_url = os.environ.get("LANGSMITH_URL_PROD", "https://...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/linear_get_issue_comments.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.059740
import asyncio from typing import Any from ..utils.linear import get_issue_comments def linear_get_issue_comments(issue_id: str) -> dict[str, Any]: """Get all comments on a Linear issue. Args: issue_id: The Linear issue UUID. Returns: Dictionary with 'comments' list, each containing id,...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/slack_thread_reply.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.087869
import asyncio from typing import Any from langgraph.config import get_config from ..utils.slack import convert_mentions_to_slack_format, post_slack_thread_reply def slack_thread_reply(message: str) -> dict[str, Any]: """Post a message to the current Slack thread. Format messages using Slack's mrkdwn forma...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/auth.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.096303
"""GitHub OAuth and LangSmith authentication utilities.""" from __future__ import annotations import logging import os from datetime import UTC, datetime, timedelta from typing import Any, Literal import httpx import jwt from langgraph.config import get_config from langgraph.graph.state import RunnableConfig from la...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/linear_update_issue.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.097441
import asyncio from typing import Any from ..utils.linear import update_issue def linear_update_issue( issue_id: str, title: str | None = None, description: str | None = None, assignee_id: str | None = None, priority: int | None = None, state_id: str | None = None, label_ids: list[str] | ...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/web_search.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.102229
import asyncio import logging import os from typing import Any from exa_py import Exa logger = logging.getLogger(__name__) def web_search( query: str, num_results: int = 5, include_contents: bool = True, ) -> dict[str, Any]: """Search the web using Exa to find relevant information. Use this too...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/linear_list_teams.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.113838
import asyncio from typing import Any from ..utils.linear import list_teams def linear_list_teams() -> dict[str, Any]: """List all teams in the Linear workspace. Returns: Dictionary with 'teams' list, each containing id, name, key, and description. """ return asyncio.run(list_teams())
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/linear.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.127198
"""Linear API utilities.""" from __future__ import annotations import logging import os from typing import Any import httpx from agent.utils.langsmith import get_langsmith_trace_url logger = logging.getLogger(__name__) LINEAR_API_KEY = os.environ.get("LINEAR_API_KEY", "") LINEAR_API_URL = "https://api.linear.app/...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/list_repos.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.215023
import logging from typing import Any import httpx from ..utils.github_app import get_github_app_installation_token logger = logging.getLogger(__name__) async def list_repos( organization_name: str, is_organization: bool = True, page: int = 1, per_page: int = 100, sort: str = "updated", nam...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/tools/slack_read_thread_messages.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.222947
import asyncio from typing import Any from ..utils.slack import ( fetch_slack_thread_messages, format_slack_messages_for_prompt, get_slack_user_names, ) async def _fetch_and_format(channel_id: str, message_ts: str) -> dict[str, Any]: """Fetch thread messages and resolve author names.""" messages ...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/linear_team_repo_map.py
null
null
null
null
null
null
Python
2026-05-04T02:04:17.505055
from typing import Any LINEAR_TEAM_TO_REPO: dict[str, dict[str, Any] | dict[str, str]] = { "Brace's test workspace": {"owner": "langchain-ai", "name": "open-swe"}, "Yogesh-dev": { "projects": { "open-swe-v3-test": {"owner": "aran-yogesh", "name": "nimedge"}, "open-swe-dev-test":...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/model.py
null
null
null
null
null
null
Python
2026-05-04T02:04:18.358825
from typing import Literal, TypedDict, Unpack from langchain.chat_models import init_chat_model OPENAI_RESPONSES_WS_BASE_URL = "wss://api.openai.com/v1" OpenAIReasoningEffort = Literal["none", "low", "medium", "high", "xhigh"] class OpenAIReasoning(TypedDict, total=False): effort: OpenAIReasoningEffort clas...
langchain-ai/open-swe
https://github.com/langchain-ai/open-swe
null
null
null
null
9,710
null
null
mit
null
null
null
null
null
null
null
agent/utils/messages.py
null
null
null
null
null
null
Python
2026-05-04T02:04:18.359334
"""Helpers for normalizing message content across model providers.""" from __future__ import annotations from langchain_core.messages import ContentBlock def extract_text_content(content: str | list[ContentBlock]) -> str: """Extract human-readable text from model message content. Supports: - Plain stri...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
docs/source/_ext/sqlfluff_domain.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.363917
"""The sqlfluff domain for documenting rules.""" from sphinx import addnodes from sphinx.directives import ObjectDescription from sphinx.domains import Domain, ObjType from sphinx.roles import XRefRole from sphinx.util.nodes import make_refnode class SQLFluffRule(ObjectDescription): """SQLFluff rule directive fo...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
examples/02_timing_api_steps.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.374487
"""Performance testing on parsing and lexing.""" import timeit from sqlfluff.core import Lexer, Linter, Parser # Set up and output the query sql = "SeLEct *, 1, blah as fOO from myTable" print("Query: ", repr(sql)) def time_function(func, name, iterations=20): """A basic timing function.""" # Do the tim...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
docs/generate-auto-docs.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.435483
"""Generate some documentation automatically. This script generates partial documentation sections (i.e. the content of `/docs/source/_partials/`) by importing SQLFluff and extracting data about rules and dialects. It should run before every docs generation so that those partial .rst files can then be correctly refer...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
docsv/scripts/generate-all-docs.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.437829
#!/usr/bin/env python3 """Master script to generate all VitePress documentation. This script orchestrates the entire documentation generation process: 1. Rule documentation (generate-rules-docs.py) 2. Dialect documentation (generate-dialects-docs.py) 3. CLI documentation (generate-cli-docs.py) 4. API documentation (ge...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
docsv/scripts/generate-dialects-docs.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.438905
#!/usr/bin/env python3 """Generate dialect documentation in Markdown format for VitePress. This script: 1. Extracts all SQLFluff dialects using the dialect system 2. Converts RST docstrings to Markdown 3. Generates markdown files for each dialect 4. Creates VitePress sidebar configuration """ import inspect import js...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
examples/01_basic_api_usage.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.441288
"""This is an example of how to use the simple sqlfluff api.""" from typing import Any, Iterator, Union import sqlfluff # -------- LINTING ---------- my_bad_query = "SeLEct *, 1, blah as fOO from mySchema.myTable" # Lint the given string and return an array of violations in JSON representation. lint_result = s...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
docsv/scripts/generate-cli-docs.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.442426
#!/usr/bin/env python3 """Generate CLI documentation in Markdown format for VitePress. This script: 1. Extracts all SQLFluff CLI commands from Click application 2. Introspects command options including inherited ones from decorators 3. Converts epilog examples to Markdown 4. Generates markdown files for each command 5...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
docs/source/conf.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.473295
"""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 """ import json import os import sys # tomllib is only in the stdlib from 3.11+ if sys.versi...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
docsv/scripts/generate-rules-docs.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.500103
#!/usr/bin/env python3 """Generate rule documentation in Markdown format for VitePress. This script: 1. Extracts all SQLFluff rules using the plugin system 2. Groups rules by bundle (layout, capitalisation, etc.) 3. Converts RST docstrings to Markdown using pandoc 4. Generates bundle-based markdown files 5. Creates Vi...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
docsv/scripts/generate-api-docs.py
null
null
null
null
null
null
Python
2026-05-04T02:04:22.553938
#!/usr/bin/env python3 """Generate API documentation in Markdown format for VitePress. This script: 1. Extracts public API functions from sqlfluff.api modules 2. Introspects function signatures and type hints 3. Parses Google-style docstrings 4. Generates markdown files for each module 5. Creates VitePress sidebar con...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
examples/06_full_parse_api.py
null
null
null
null
null
null
Python
2026-05-04T02:04:23.339238
"""Showing how to use the python API to filter SQL files. This example shows how to use the Linter class to parse, and then process, SQL scripts. The methods shown can be very powerful for searching and filtering SQL scripts. """ from sqlfluff.core import Linter # Let's make a SQL script with a few statements in it ...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-plugin-example/test/rules/rule_test_cases_test.py
null
null
null
null
null
null
Python
2026-05-04T02:04:23.340979
"""Runs the rule test cases.""" import os import pytest from sqlfluff.utils.testing.rules import ( RuleTestCase, load_test_cases, ) ids, test_cases = load_test_cases( test_cases_path=os.path.join( os.path.abspath(os.path.dirname(__file__)), "test_cases", "*.yml" ) ) @pytest.mark.parametriz...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
examples/05_simple_api_config.py
null
null
null
null
null
null
Python
2026-05-04T02:04:23.346498
"""An example to show a few ways of configuring the API.""" import sqlfluff from sqlfluff.core import FluffConfig, Linter # ####################################### # The simple API can be configured in three ways. # 1. Limited keyword arguments sqlfluff.fix("SELECT 1", dialect="bigquery") # 2. Providing the path t...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-plugin-example/src/sqlfluff_plugin_example/rules.py
null
null
null
null
null
null
Python
2026-05-04T02:04:23.354215
"""An example of a custom rule implemented through the plugin system. This uses the rules API supported from 0.4.0 onwards. """ from sqlfluff.core.rules import ( BaseRule, LintResult, RuleContext, ) from sqlfluff.core.rules.crawlers import SegmentSeekerCrawler # These two decorators allow plugins # to b...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-plugin-example/src/sqlfluff_plugin_example/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:23.384235
"""An example of a custom rule implemented through the plugin system. This uses the rules API supported from 0.4.0 onwards. """ from typing import Any from sqlfluff.core.config import load_config_resource from sqlfluff.core.plugin import hookimpl from sqlfluff.core.rules import BaseRule, ConfigInfo # For backward c...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
examples/03_getting_rules_and_dialects.py
null
null
null
null
null
null
Python
2026-05-04T02:04:23.829426
"""This is an example of how get basic options from sqlfluff.""" import sqlfluff # -------- DIALECTS ---------- dialects = sqlfluff.list_dialects() # dialects = [DialectTuple(label='ansi', name='ansi', inherits_from='nothing'), ...] dialect_names = [dialect.label for dialect in dialects] # dialect_names = ["ansi", ...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
examples/04_config_overrides.py
null
null
null
null
null
null
Python
2026-05-04T02:04:23.860238
"""This is an example of providing config overrides.""" from sqlfluff.core import FluffConfig, Linter sql = "SELECT 1\n" config = FluffConfig( overrides={ "dialect": "snowflake", # NOTE: We explicitly set the string "none" here rather # than a None literal so that it overrides any config...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-templater-dbt/test/linter_test.py
null
null
null
null
null
null
Python
2026-05-04T02:04:24.140502
"""The Test file for the linter class.""" import os import os.path import shutil import pytest from sqlfluff.cli.commands import lint from sqlfluff.core import FluffConfig, Linter from sqlfluff.core.linter import runner from sqlfluff.core.linter.common import DeferredRenderTask from sqlfluff.utils.testing.cli import...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:24.176330
"""Defines the hook endpoints for the dbt templater plugin.""" from sqlfluff.core.plugin import hookimpl from sqlfluff_templater_dbt.templater import DbtTemplater @hookimpl def get_templaters(): """Get templaters.""" return [DbtTemplater]
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/api/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:24.397272
"""Elements which wrap the sqlfluff core library for public use.""" # Expose the simple api from sqlfluff.api.info import list_dialects, list_rules from sqlfluff.api.simple import APIParsingError, fix, lint, parse __all__ = ( "lint", "fix", "parse", "APIParsingError", "list_rules", "list_diale...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
null
null
null
null
null
null
Python
2026-05-04T02:04:24.427354
"""Defines the dbt templater. NOTE: The dbt python package adds a significant overhead to import. This module is also loaded on every run of SQLFluff regardless of whether the dbt templater is selected in the configuration. The templater is however only _instantiated_ when selected, and as such, all imports of the db...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/api/info.py
null
null
null
null
null
null
Python
2026-05-04T02:04:24.480060
"""Information API.""" from sqlfluff.core import Linter, dialect_readout from sqlfluff.core.dialects import DialectTuple from sqlfluff.core.linter import RuleTuple def list_rules() -> list[RuleTuple]: """Return a list of available rule tuples.""" linter = Linter() return linter.rule_tuples() def list_d...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/api/simple.py
null
null
null
null
null
null
Python
2026-05-04T02:04:24.781937
"""The simple public API methods.""" from typing import Any, Optional from sqlfluff.core import ( FluffConfig, Linter, SQLBaseError, SQLFluffUserError, dialect_selector, ) from sqlfluff.core.types import ConfigMappingType def get_simple_config( dialect: Optional[str] = None, rules: Optio...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/cli/autocomplete.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.256891
"""autocompletion commands.""" from sqlfluff import list_dialects # Older versions of click don't have shell completion # so handle for now, as version 8 still fairly recent # See: https://github.com/sqlfluff/sqlfluff/issues/2543 shell_completion_enabled = True try: from click.shell_completion import CompletionIt...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/cli/formatters.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.304451
"""Defines the formatters for the CLI.""" import os import sys from io import StringIO from typing import Callable, Optional, Union import click from colorama import Style from sqlfluff.cli import EXIT_FAIL, EXIT_SUCCESS from sqlfluff.cli.helpers import ( get_package_version, get_python_implementation, g...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-templater-dbt/test/templater_test.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.364579
"""Tests for the dbt templater.""" import glob import json import logging import os import pickle import shutil import subprocess from copy import deepcopy from pathlib import Path from unittest import mock import pytest from sqlfluff.cli.commands import lint from sqlfluff.core import FluffConfig, Lexer, Linter from...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/cli/commands.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.443327
"""Contains the CLI.""" # Standard library imports import json import logging import os import sys import time from itertools import chain from logging import LogRecord from typing import Any, Callable, Dict, List, Optional, Union, cast # Third-party imports import click import colorama import yaml from tqdm import t...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-templater-dbt/test/conftest.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.519242
"""pytest fixtures.""" import os import shutil import subprocess from importlib import metadata from pathlib import Path import pytest from sqlfluff.core import FluffConfig from sqlfluff_templater_dbt.templater import DbtTemplater def pytest_report_header() -> list[str]: """Return a list of strings to be displ...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
plugins/sqlfluff-templater-dbt/test/rules_test.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.624126
"""Tests for the standard set of rules.""" import os import os.path from pathlib import Path import pytest from sqlfluff.core import Linter from sqlfluff.core.config import FluffConfig from sqlfluff.utils.testing.rules import assert_rule_raises_violations_in_file @pytest.mark.parametrize( "rule,path,violations...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/cli/outputstream.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.722767
"""Classes for managing linter output, used with OutputStreamFormatter.""" import abc import os from typing import Any, Optional import click from tqdm import tqdm from sqlfluff.core import FluffConfig from sqlfluff.core.types import FormatType class OutputStream(abc.ABC): """Base class for linter output strea...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.854130
"""The core elements of sqlfluff.""" import tblib.pickling_support # Config objects from sqlfluff.core.config import FluffConfig # Dialect introspection from sqlfluff.core.dialects import dialect_readout, dialect_selector # All of the errors. from sqlfluff.core.errors import ( SQLBaseError, SQLFluffUserErro...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/config/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.868678
"""Init file for the config module. This holds all the methods and classes for configuration. """ from typing import Optional from sqlfluff.core.config.file import ( load_config_file_as_dict, load_config_string_as_dict, ) from sqlfluff.core.config.fluffconfig import FluffConfig from sqlfluff.core.config.load...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/config/file.py
null
null
null
null
null
null
Python
2026-05-04T02:04:25.937338
"""Lower level routines for config file loading and caching. Functions in this module load config from *individual* files and resources. While some are cached, they are cached on the basis of not processing individual files more than once. For the cached functions it is VERY recommended to make sure they are copied b...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/config/fluffconfig.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.008590
"""Module for loading config.""" from __future__ import annotations import logging from collections.abc import Iterable from copy import copy, deepcopy from itertools import chain from typing import TYPE_CHECKING, Any, Optional import pluggy from sqlfluff.core.config.ini import coerce_value from sqlfluff.core.confi...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/config/ini.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.138964
"""Methods for loading config files with an ini-style format. This includes `.sqlfluff` and `tox.ini` files. """ import configparser from sqlfluff.core.helpers.dict import NestedDictRecord, records_to_nested_dict from sqlfluff.core.types import ConfigMappingType, ConfigValueType def coerce_value(val: str) -> Confi...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/config/removed.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.322447
"""Records of deprecated and removed config variables.""" import logging from dataclasses import dataclass from typing import Callable, Optional, Union from sqlfluff.core.errors import SQLFluffUserError from sqlfluff.core.helpers.dict import ( NestedStringDict, nested_dict_get, nested_dict_set, record...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/config/loader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.323533
"""Config loading methods and helpers. This is designed to house the main functions which are exposed by the overall config module. There is some caching in this module, which is designed around caching the configuration loaded at *specific paths* rather than the individual file caching in the `file` module. """ from...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/cli/helpers.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.413261
"""CLI helper utilities.""" import sys import textwrap from collections import abc from functools import cached_property from typing import Any, Callable from sqlfluff import __version__ as pkg_version def get_python_version() -> str: """Get the current python version as a string.""" return "{0[0]}.{0[1]}.{...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/config/toml.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.435632
"""Methods for loading config from pyproject.toml files.""" import re import sys from typing import Any, TypeVar if sys.version_info >= (3, 11): import tomllib else: # pragma: no cover import tomli as tomllib from sqlfluff.core.errors import SQLFluffUserError from sqlfluff.core.helpers.dict import ( Nes...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/config/validate.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.493174
"""Methods for validating config dicts.""" from sqlfluff.core.config.removed import validate_config_dict_for_removed from sqlfluff.core.errors import SQLFluffUserError from sqlfluff.core.types import ConfigMappingType ALLOWABLE_LAYOUT_CONFIG_KEYS = ( "spacing_before", "spacing_after", "spacing_within", ...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/dialects/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.526130
"""Contains SQL Dialects. Note that individual dialects are only imported as needed at runtime. This avoids circular references. To enable this, any modules outside of .dialects cannot import dialects directly. They should import `dialect_selector` and use that to fetch dialects. Within .dialects, each dialect is fr...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/dialects/base.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.661175
"""Defines the base dialect class.""" import sys from typing import Any, Optional, Union, cast from sqlfluff.core.parser import ( BaseSegment, KeywordSegment, SegmentGenerator, StringParser, ) from sqlfluff.core.parser.grammar.base import BaseGrammar, Nothing from sqlfluff.core.parser.lexer import Lex...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/dialects/common.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.750272
"""Common classes for dialects to use.""" from typing import NamedTuple, Optional from sqlfluff.core.parser import BaseSegment class AliasInfo(NamedTuple): """Details about a table alias.""" ref_str: str # Name given to the alias segment: Optional[BaseSegment] # Identifier segment containing the name...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/formatter.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.889427
"""Defines the formatter interface which can be used by the CLI. The linter module provides an optional formatter input which effectively allows callbacks at various points of the linting process. This is primarily to allow printed output at various points by the CLI, but could also be used for logging our other proce...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/errors.py
null
null
null
null
null
null
Python
2026-05-04T02:04:26.927221
"""Errors - these are closely linked to what used to be called violations. NOTE: The BaseException class, which ValueError inherits from, defines a custom __reduce__() method for picking and unpickling exceptions. For the SQLBaseError, and it's dependent classes, we define properties of these exceptions which don't wo...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/core/helpers/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:27.002274
"""Helper methods for other classes. This module should have no dependencies on other parts of the SQLFluff package and each should also be free of dependencies on each other. This is to ensure each of these methods can be used anywhere within the project without fear of dependency issues. Methods are organised by th...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:29.696101
"""Sqlfluff is a SQL linter for humans.""" import sys from importlib import metadata try: import pytest # isort: skip except ImportError: # pragma: no cover pytest = None # type: ignore[assignment] # Expose the public API. from sqlfluff.api import fix, lint, list_dialects, list_rules, parse __all__ = ( ...
sqlfluff/sqlfluff
https://github.com/sqlfluff/sqlfluff
null
null
null
null
9,681
null
null
mit
null
null
null
null
null
null
null
src/sqlfluff/__main__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:29.696810
"""Export cli to __main__ for use like python -m sqlfluff.""" from sqlfluff.cli.commands import cli # pragma: no cover if __name__ == "__main__": # pragma: no cover cli() # pragma: no cover
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/follower.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.238905
# -*- coding: utf-8 -*- import abc import datetime import os import pickle import queue import re import threading import time from typing import List import requests from easytrader import exceptions from easytrader.log import logger class BaseFollower(metaclass=abc.ABCMeta): """ slippage: 滑点,取值范围为 [0, 1] ...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/gf_clienttrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.244225
# -*- coding: utf-8 -*- import re import tempfile import time import os import pywinauto import pywinauto.clipboard from easytrader import clienttrader from easytrader.utils.captcha import recognize_verify_code class GFClientTrader(clienttrader.BaseLoginClientTrader): @property def broker_type(self): ...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.245356
# -*- coding: utf-8 -*- import urllib3 from easytrader import exceptions from easytrader.api import use, follower from easytrader.log import logger urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) __version__ = "0.23.7" __author__ = "shidenggui"
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/api.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.246915
# -*- coding: utf-8 -*- import logging import sys import six from easytrader.joinquant_follower import JoinQuantFollower from easytrader.log import logger from easytrader.ricequant_follower import RiceQuantFollower from easytrader.xq_follower import XueQiuFollower from easytrader.xqtrader import XueQiuTrader if sys....
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/grid_strategies.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.250494
# -*- coding: utf-8 -*- import abc import io import tempfile from io import StringIO from typing import TYPE_CHECKING, Dict, List, Optional import pandas as pd import pywinauto.keyboard import pywinauto import pywinauto.clipboard from easytrader.log import logger from easytrader.utils.captcha import captcha_recognize...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/exceptions.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.259467
# -*- coding: utf-8 -*- class TradeError(IOError): pass class NotLoginError(Exception): def __init__(self, result=None): super(NotLoginError, self).__init__() self.result = result
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/config/client.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.261343
# -*- coding: utf-8 -*- def create(broker): if broker == "yh": return YH if broker == "ht": return HT if broker == "gj": return GJ if broker == "gf": return GF if broker == "ths": return CommonConfig if broker == "wk": return WK if broker == "h...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/clienttrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.262424
# -*- coding: utf-8 -*- import abc import functools import logging import os import re import sys import time from typing import Type, Union import hashlib, binascii import easyutils from pywinauto import findwindows, timings from easytrader import grid_strategies, pop_dialog_handler, refresh_strategies from easytra...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/gj_clienttrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.285670
# -*- coding: utf-8 -*- import re import tempfile import time import pywinauto import pywinauto.clipboard from easytrader import clienttrader from easytrader.utils.captcha import recognize_verify_code class GJClientTrader(clienttrader.BaseLoginClientTrader): @property def broker_type(self): return "...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/log.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.863504
# -*- coding: utf-8 -*- import logging logger = logging.getLogger("easytrader") logger.setLevel(logging.INFO) logger.propagate = False fmt = logging.Formatter( "%(asctime)s [%(levelname)s] %(filename)s %(lineno)s: %(message)s" ) ch = logging.StreamHandler() ch.setFormatter(fmt) logger.handlers.append(ch)
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/joinquant_follower.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.869624
# -*- coding: utf-8 -*- from datetime import datetime from threading import Thread from easytrader import exceptions from easytrader.follower import BaseFollower from easytrader.log import logger class JoinQuantFollower(BaseFollower): LOGIN_PAGE = "https://www.joinquant.com" LOGIN_API = "https://www.joinquan...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/remoteclient.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.877394
# -*- coding: utf-8 -*- import requests from easytrader.utils.misc import file2dict def use(broker, host, port=1430, **kwargs): return RemoteClient(broker, host, port, **kwargs) class RemoteClient: def __init__(self, broker, host, port=1430, **kwargs): self._s = requests.session() # 支持 basi...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/ht_clienttrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.878520
# -*- coding: utf-8 -*- import pywinauto import pywinauto.clipboard from easytrader import grid_strategies from . import clienttrader class HTClientTrader(clienttrader.BaseLoginClientTrader): grid_strategy = grid_strategies.Xls @property def broker_type(self): return "ht" d...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/refresh_strategies.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.892068
# -*- coding: utf-8 -*- import abc import io import tempfile from io import StringIO from typing import TYPE_CHECKING, Dict, List, Optional import pandas as pd import pywinauto.keyboard import pywinauto import pywinauto.clipboard from easytrader.log import logger from easytrader.utils.captcha import captcha_recognize...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/htzq_clienttrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.903709
# -*- coding: utf-8 -*- import pywinauto import pywinauto.clipboard from easytrader import grid_strategies from . import clienttrader class HTZQClientTrader(clienttrader.BaseLoginClientTrader): grid_strategy = grid_strategies.Xls @property def broker_type(self): return "htzq" def login(sel...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/ricequant_follower.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.906304
# -*- coding: utf-8 -*- from datetime import datetime from threading import Thread from easytrader.follower import BaseFollower from easytrader.log import logger class RiceQuantFollower(BaseFollower): def __init__(self): super().__init__() self.client = None def login(self, user=None, passw...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/miniqmt/miniqmt_trader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:32.926370
from xtquant.xttrader import XtQuantTrader, XtQuantTraderCallback from xtquant.xttype import StockAccount from xtquant import xtconstant import random from easytrader.log import logger from easytrader.utils.perf import perf_clock from easytrader.utils.stock import get_stock_type # 市价委托类型映射 MARKET_ORDER_TYPE_NAME_MAP =...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/pop_dialog_handler.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.022954
# coding:utf-8 import re import time from typing import Optional from easytrader import exceptions from easytrader.utils.perf import perf_clock from easytrader.utils.win_gui import SetForegroundWindow, ShowWindow, win32defines class PopDialogHandler: def __init__(self, app): self._app = app @staticm...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/universal_clienttrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.473136
# -*- coding: utf-8 -*- import pywinauto import pywinauto.clipboard from easytrader import grid_strategies from . import clienttrader class UniversalClientTrader(clienttrader.BaseLoginClientTrader): grid_strategy = grid_strategies.Xls @property def broker_type(self): return "universal" def...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/utils/misc.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.495509
# coding:utf-8 import json def parse_cookies_str(cookies): """ parse cookies str to dict :param cookies: cookies str :type cookies: str :return: cookie dict :rtype: dict """ cookie_dict = {} for record in cookies.split(";"): key, value = record.strip().split("=", 1) ...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/utils/perf.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.498560
# coding:utf-8 import functools import inspect import logging import timeit from easytrader import logger try: from time import process_time except: from time import clock as process_time def perf_clock(f): @functools.wraps(f) def wrapper(*args, **kwargs): if not logger.isEnabledFor(logging....
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/utils/stock.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.507806
# coding:utf-8 import datetime import json import random import requests def get_stock_type(stock_code): """判断股票ID对应的证券市场 匹配规则 ['4', '8'] 为 bj ['5', '6', '7', '9', '110', '113', '118', '132', '204'] 为 sh 其余为 sz :param stock_code:股票ID, 若以 'sz', 'sh', 'bj' 开头直接返回对应类型,否则使用内置规则判断 :return 'bj'...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/utils/win_gui.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.513199
# coding:utf-8 from pywinauto import win32defines from pywinauto.win32functions import SetForegroundWindow, ShowWindow
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/server.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.543360
import functools from flask import Flask, jsonify, request from . import api from .log import logger app = Flask(__name__) global_store = {} def error_handle(func): @functools.wraps(func) def wrapper(*args, **kwargs): try: return func(*args, **kwargs) # pylint:...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/wk_clienttrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.574878
# -*- coding: utf-8 -*- import pywinauto from easytrader.ht_clienttrader import HTClientTrader class WKClientTrader(HTClientTrader): @property def broker_type(self): return "wk" def login(self, user, password, exe_path, comm_password=None, **kwargs): """ :param user: 用户名 ...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/utils/captcha.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.614772
import re import requests from PIL import Image from easytrader import exceptions def captcha_recognize(img_path): import pytesseract im = Image.open(img_path).convert("L") # 1. threshold the image threshold = 200 table = [] for i in range(256): if i < threshold: ...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/webtrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:33.619629
# -*- coding: utf-8 -*- import abc import logging import os import re import time from threading import Thread import requests import requests.exceptions from easytrader import exceptions from easytrader.log import logger from easytrader.utils.misc import file2dict, str2num from easytrader.utils.stock import get_30_d...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/xq_follower.py
null
null
null
null
null
null
Python
2026-05-04T02:04:34.394406
# -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals import json import re from datetime import datetime from numbers import Number from threading import Thread from easytrader.follower import BaseFollower from easytrader.log import logger from easytrader.utils.misc import parse_c...
shidenggui/easytrader
https://github.com/shidenggui/easytrader
null
null
null
null
9,677
null
null
mit
null
null
null
null
null
null
null
easytrader/yh_clienttrader.py
null
null
null
null
null
null
Python
2026-05-04T02:04:34.470549
# -*- coding: utf-8 -*- import re import tempfile import pywinauto from easytrader import clienttrader, grid_strategies from easytrader.utils.captcha import recognize_verify_code class YHClientTrader(clienttrader.BaseLoginClientTrader): """ Changelog: 2018.07.01: 银河客户端 2018.5.11 更新后不再支持通过剪切板复制获...