disagreement/examples/sample_extension.py
Slipstreamm e965a675c1
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
refactor(api): Re-export common symbols from top-level package
Makes commonly used classes, functions, and decorators from `disagreement.ext` and `disagreement.ui` submodules directly accessible under the `disagreement` namespace.

This change simplifies import statements for users, leading to cleaner and more concise code. Documentation and examples have been updated to reflect these new, simplified import paths.
2025-06-14 18:57:12 -06:00

17 lines
268 B
Python

from disagreement import loop
@loop(seconds=2.0)
async def ticker() -> None:
print("Extension tick")
def setup() -> None:
print("sample_extension setup")
ticker.start()
def teardown() -> None:
print("sample_extension teardown")
ticker.stop()