# Writing Python Services

> Writing a class with encapsulated logic that interfaces with an external system. Logging, APIs, etc. Use when this capability is needed.

- Skill: `tomevault-io/writing-python-services` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/writing-python-services`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/writing-python-services/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/writing-python-services

---


- Use python 3.12+ syntax for types
  - e.g. `|` for unions, ` | None` for optional

- No side effects in constructor
  - Use `@cached_property` and lazily evaluate properties needing IO

- Methods use `dataclasses` for arguments and responses

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/jack-michaud) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

