Writing Python Services

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

tomevault-io eb6a6b4 2 files · 1.2 KB Updated

File contents

  • 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 — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/jack-michaud--faire--writing-python-services commit eb6a6b4d5c

Frequently asked questions

npx skillmds@latest add tomevault-io/writing-python-services