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 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 get-skill add tomevault-io/writing-python-services