尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Causify development system
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
helpers — Causify’s Python Toolkit for High-Leverage Engineering
helpers is a public collection of Python utilities, configuration patterns, and developer tooling extracted from real production work at Causify.
Make engineering repeatable.
Turn "tribal knowledge" into composable primitives: less glue code, fewer one-off scripts, and more reliable systems.
This repo is useful in three common contexts:檢視完整 README ↗helpers is a public collection of Python utilities, configuration patterns, and developer tooling extracted from real production work at Causify.
It exists for one reason:
Make engineering repeatable.
Turn "tribal knowledge" into composable primitives: less glue code, fewer one-off scripts, and more reliable systems.
This repo is useful in three common contexts:
flowchart LR
subgraph Lib["`**Python Library** (helpers/)`"]
direction TB
Core["Core Helpers<br>(hdbg, hio, hsystem, hgit, hdocker, hdatetime, …)"]
Data["Data Helpers<br>(hpandas and related modules)"]
LLM["LLM & Agentic Helpers<br>(hllm, hllm_cost, hllm_cli, hchatgpt, …)"]
end
subgraph Config["`**Configuration Patterns** (config_root/)`"]
Conf["Env-aware configuration objects<br>and builders"]
end
subgraph Tooling["`**Tooling & Automation**`"]
Scripts@{ label: "Dev Scripts<br/>(dev_scripts_helpers/)" }
Import@{ label: "Import Hygiene<br/>(import_check/)" }
Linters@{ label: "Linting Framework<br/>(linters/, linters2/)" }
Tasks@{ label: "Repo Tasks & Automation<br/>(tasks.py, invoke.yaml)" }
end
subgraph Docs["`**Documentation & Examples**`"]
Human@{ label: "Human Docs<br/>(docs/)" }
Mk@{ label: "MkDocs Site<br/>(docs_mkdocs/)" }
NB@{ label: "Tutorial Notebooks<br/>(helpers/notebooks/)" }
end
subgraph CI["`**Continuous Integration & Hygiene**`"]
GH@{ label: "GitHub Workflows<br/>(.github/)" }
PC@{ label: "Pre-commit & Scanning<br/>(.pre-commit-config.yaml, semgrep, …)" }
end
Core -- provides base utilities to --> Conf
Data -- feeds data into --> Conf
LLM -- adds AI logic to --> Conf
Scripts -- triggers tasks in --> GH
Import -- enforces rules in --> GH
Linters -- runs in --> GH
Tasks -- executes workflows in --> GH
Human -- documented in --> GH
Mk -- deployed via --> GH
NB -- tested in --> GH
PC -- validates via --> GH
Core@{ shape: rounded}
Data@{ shape: rounded}
LLM@{ shape: rounded}
Conf@{ shape: rect}
Scripts@{ shape: rect}
Import@{ shape: rect}
Linters@{ shape: rect}
Tasks@{ shape: rect}
Human@{ shape: doc}
Mk@{ shape: doc}
NB@{ shape: doc}
GH@{ shape: rect}
PC@{ shape: rect}
Core:::lib
Data:::lib
LLM:::lib
Conf:::config
Scripts:::tooling
Import:::tooling
Linters:::tooling
Tasks:::tooling
Human:::docs
Mk:::docs
NB:::docs
GH:::ci
PC:::ci
classDef lib fill:#e0f7fa,stroke:#0097a7,stroke-width:2px,color:#004d40
classDef config fill:#fff9c4,stroke:#fbc02d,stroke-width:2px,color:#795548
classDef tooling fill:#e1bee7,stroke:#7b1fa2,stroke-width:2px,color:#4a148c
classDef docs fill:#c5cae9,stroke:#3949ab,stroke-width:2px,color:#1a237e
classDef ci fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#1b5e20
Most engineering orgs accumulate dozens of tiny scripts and helper snippets. Over time that becomes:
helpers is the opposite: small, well-scoped primitives that are easy to discover and safe to reuse. The code is intentionally "boring"; because boring tools are what make fast teams.
These examples are deliberately small. The repo is optimized for everyday leverage.
import helpers.hdbg as hdbg
hdbg.dassert_eq(2 + 2, 4)
hdbg.dassert(10 > 3, "Math still works")
import helpers.hsystem as hsystem
out = hsystem.system_to_string("python --version")
print(out)
import helpers.hio as hio
payload = {"hello": "world"}
hio.to_json("tmp.json", payload)
loaded = hio.from_json("tmp.json")
print(loaded)
import pandas as pd
import helpers.hpandas as hpandas
df = pd.DataFrame({"a": [1, 2], "b": [3, 4]})
print(hpandas.convert_df_to_json_string(df))
helpers.hllm supports providers like OpenAI and OpenRouter (via openrouter/<model>). It also supports caching modes and structured output.
from pydantic import BaseModel
import helpers.hllm as hllm
import helpers.hllm_cost as hllmcost
class Summary(BaseModel):
summary: str
risks: list[str]
# Track cost for a specific provider/model.
tracker = hllmcost.LLMCostTracker(provider_name="openai", model="gpt-4o-mini")
result = hllm.get_structured_completion(
"Summarize key risks of shipping without observability.",
response_format=Summary,
system_prompt="Be concise and practical.",
model="gpt-4o-mini",
cache_mode="DISABLE_CACHE",
print_cost=True,
cost_tracker=tracker,
)
print(result.summary)
print("Cost so far ($):", tracker.get_current_cost())
helpers/)The main Python library lives in helpers/. Many modules follow the h<name>.py naming pattern (e.g., hdbg.py, hio.py, hsystem.py) to make discovery fast and avoid collisions.
A few high-signal examples:
helpers/hdbg.py: defensive checks and assertionshelpers/hsystem.py: safe system command executionhelpers/hio.py: practical file I/O helpershelpers/hgit.py: git utilitieshelpers/hdocker.py: docker helpershelpers/henv.py: environment utilitieshelpers/hdatetime.py: date/time utilitieshpandas and friends)helpers/hpandas.py re-exports a suite of pandas helpers implemented across hpandas_* modules (conversion, compare, display, cleaning, assertions, IO, etc.). This makes the most common "pandas hygiene" tasks consistent across projects.
This repo includes lightweight building blocks for LLM workflows:
helpers/hllm.py: completions + structured outputs + caching modeshelpers/hllm_cost.py: cost tracking and provider cost utilities (incl. LLMCostTracker)helpers/hllm_cli.py: CLI-oriented LLM workflowsTutorial notebooks live under helpers/notebooks/ (see hllm.tutorial.py).
config_root/)Reusable configuration patterns: config objects/builders and environment-aware configuration.
This repo also ships "how we keep repos healthy" primitives:
dev_scripts_helpers/: automation scripts for common workflowsimport_check/: import hygiene validationlinters/, linters2/: lint framework and configs.github/: CI workflows and checks.claude/: Claude Code configuration, hooks, and skills (.claude/skills/)
docs/tools/ai/all.ai_workflows.how_to_guide.md for how to run skills.claude/task_instructions.md: Development instructions and task specificationsCLAUDE.md: Architecture overview and development patterns for Claude Codeconftest.py: Pytest configuration and shared test fixturesmain_pytest.py: Main pytest runner and test execution controllertasks.py: Entry point for pyinvoke task automation system.pre-commit-config.yaml, .semgrepignore, etc.)git submodule add https://github.com/causify-ai/helpers.git helpers_root
git submodule update --init --recursive
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .
If contributing, enable pre-commit hooks:
pip install pre-commit
pre-commit install
Run tests:
pytest -q
# or
python main_pytest.py
Run pre-commit:
pre-commit run -a
List repo automation tasks (if using invoke):
pip install invoke
invoke -l
Human docs live under docs/. A browsable site is maintained under docs_mkdocs/.
Serve MkDocs locally:
pip install mkdocs mkdocs-material
cd docs_mkdocs
mkdocs serve
This repo includes secret-scanning and standard hygiene. Do not commit secrets. If you suspect a leak: rotate credentials and open an incident.
See LICENSE.