python-patterns
Pythonic patterns for readable, robust Python: typing, error handling, data modeling, iteration, resource management, threading/process/subinterpreter primitives, project layout, and tooling. Use when writing or reviewing Python code and APIs. For measurement/GIL/JIT use python-performance; for asyn
v2026.11.13-21cd5683 התקנות+3 ב-7 ימים39 כוכביםMITסונכרן לפני 10 שעות
התקנה
עדיין אין לכם את ה-CLI של NotHoly? התקינו אותו קודם.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/python-patternsנכתב אל ~/.notholy/skills אחרי בדיקת החתימה וה-SHA-256.
חתימהחתום, ed25519
חבילהcf84dbdd…d893c911
cf84dbddde45…f266d893c9119 קבצים · 8.9 KBסריקהנמוךממצא אחד
- קישורים לדומיינים חיצוניים
מקורgithub.com/AeonDave/malskill/tree/main/coding/python-patterns@21cd568
הפריט הזה עדיין לא נכתב בעברית, ולכן הוא מוצג בשפה אחרת: English.
בעמוד הזה
This skill is for day-to-day Python code quality: readability, correctness, maintainability.
If you are doing asyncio-heavy work, prefer python-async-patterns. If the task is profiling, GIL/free-threading, or experimental JIT, use python-performance.
When to activate
- Writing/refactoring Python modules, libraries, services
- Reviewing PRs for idioms, clarity, and footguns
- Introducing typing or improving error handling
- Designing lightweight data models and APIs
- Choosing threads vs processes vs subinterpreters (not asyncio)
Core principles (high signal)
- Readability beats cleverness.
- Be explicit at boundaries (I/O, parsing, network). Keep inner code simple.
- Prefer small, typed functions with clear names.
- Use context managers for resource safety.
- Raise specific exceptions and preserve causes (
raise ... from e).
Outcome expectations
- Code is readable; intent is clear from names and structure, not comments.
- All public APIs have type annotations; error boundaries are explicit.
- Resource cleanup is deterministic (via context managers, no
__del__). - Exceptions are domain-specific and chain causes; no silent failures.
Recommended workflow
- Design module interfaces with clear input/output types and error contracts.
- Use context managers for all resource acquisition.
- Validate at I/O boundaries; raise specific errors with cause chaining.
- Apply ruff, mypy (on public APIs), and pytest baseline in CI.
- Review code for footguns (mutable defaults, bare
except, type hiding).
Quick review checklist
- No mutable default arguments;
Nonesentinel used is None/is not None(not== None)- Specific
exceptclauses; no bareexcept: - Types: public functions/classes have annotations; 3.12+ type-parameter syntax;
T | NonenotOptional[T] - Files/paths use
pathlib.Path(Path.walk3.12+); notos.pathstring soup - Iteration uses comprehensions/generators only when simple
- CPU-bound fan-out uses executors from
concurrency.md, not unboundedThreadspawns
Resources
Load on demand:
references/typing.md— load for annotations, PEP 695 generics, Protocols, 3.14 deferred evaluationreferences/errors.md— load for exception hygiene,ExceptionGroup/except*,finallycontrol flowreferences/data-models.md— load for dataclasses,copy.replace,StrEnum, t-strings (3.14)references/iteration.md— load for comprehensions, generators,itertools.batched,matchreferences/resources.md— load for context managers and pathlibreferences/concurrency.md— load for threads,concurrent.futures, queues, multiprocessing start methods,InterpreterPoolExecutorreferences/layout-tooling.md— load forpyproject.toml, ruff/mypy/pytest, removed stdlib modulesreferences/performance.md— one-screen "don't micro-optimize here"; real measurement ispython-performance
הקבצים בגרסה הזו
references/817.7 KB
- concurrency.md5.1 KB
- data-models.md2.6 KB
- errors.md2.2 KB
- iteration.md1.6 KB
- layout-tooling.md1.8 KB
- performance.md596 B
- resources.md1.1 KB
- typing.md2.8 KB
- SKILL.md3.5 KB
הרשאות
| הרשאה | הוצהר | נמצא בסריקה |
|---|---|---|
| קורא קבצים | כן | כן |
| כותב קבצים | לא | לא |
| מריץ פקודות shell | כן | כן |
| משתמש ברשת | כן | כן |
| משתמש במחברים | לא | לא |
| שולט בדפדפן | לא | לא |
ממצאי הסריקה
נבדק ב-13 בנוב׳ 2026
- מידעקישור · קישורים לדומיינים חיצוניים
סריקה נקייה מורידה את הסיכון, אבל לא מוכיחה שהחבילה בטוחה. כדאי לקרוא מה מתקינים.
| גרסה | פורסמה | Commit | SHA-256 | חתימה | שינוי בהרשאות |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | 13 בנוב׳ 2026 | 21cd568 | cf84dbdd | חתומה | – |
עוד מ-AeonDave
הכול מהמפרסם הזהעוד בקטגוריה APIs, SaaS וזהות
לקטגוריה- testing-for-sensitive-data-exposuremukul975/testing-for-sensitive-data-exposure5
- performing-jwt-none-algorithm-attackmukul975/performing-jwt-none-algorithm-attack5
- sharp-edgestrailofbits/sharp-edges4
- hydraaeondave/hydra4
- implementing-google-workspace-admin-securitymukul975/implementing-google-workspace-admin-security4
- implementing-api-security-posture-managementmukul975/implementing-api-security-posture-management4
שאלו כל מה שהסקופ מאפשר.
יוצרים חשבון, מוסיפים קרדיטים ושואלים את השאלה הראשונה בצ׳אט או בטרמינל.
- 1/3
יצירת חשבון
פרטי או חברה. אפשר לעבור לחשבון חברה אחר כך בלי לאבד יתרה או מפתחות.
פרטיחברה - 2/3
הוספת קרדיטים
בכרטיס אשראי. תשלום לפי טוקן, בלי מנוי.
$5.00טעינה מינימלית - 3/3
שאלה ראשונה
בצ׳אט, או להתקין את ה-CLI ולהריץ notholy login בטרמינל.
$ notholy login