Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lugipfupf committed Apr 17, 2024
1 parent da14a29 commit dd9c549
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Developing widgets
There a few sample widgets already included. On each page reload, each widgets `render()` is called and
a dictionary of type`RenderResult` is expected. Structure your module like so:

```python
from happyMirror.render import BaseRenderer, RenderResult

class NamedAfterMyPackage(BaseRenderer):
def render(self) -> RenderResult:
# do your stuff

# all fields are optional
return {
'name': 'some name', # mainly used for debuggging
'view': 'html stuff',
'script': 'javascript'
}
```

# How to run
## Development mode
Get all you need by typing `pip install -e .`, then run the application directly from VSCode.
Expand Down

0 comments on commit dd9c549

Please sign in to comment.