- basic usage and core functionality, command, event handlers, command guards, etc.
- docs
- tutorials
- basic typing support
- web framework integration
introduce the concept of "source" adding more source
introduce the concept of "sink"
event sink
improve compatibility
remote handler
- create a cli stub generator for anywise.send, something like (similar to pyright createstub, or mypy stubgen)
# in project root
anywise stub-gen .
This should scan functions decorated with
@command_handler
async def create_user(cmd: CreateUser) -> str:
...
then generate project_folder/typings/anywise.pyi
# anywise.pyi
from typing import overload
from project.commands import CreateUser
class Anywise:
@overload
async def send(self, message: CreateUser) -> str:
...
@overload
async def send(self, message: ListTodos) -> dict[str, list[Any]]:
...
in your project root, create a pyproject.toml
file
[tool.pyright]
typeCheckingMode = "strict"
extraPaths = ["path/to/typings"]
stubPath [path, optional]
Path to a directory that contains custom type stubs. Each package's type stub file(s) are expected to be in its own subdirectory. The default value of this setting is "./typings". (typingsPath is now deprecated)
Configure mypy:
MYPYPATH
If you have created your own stubs or placed them in a non-standard location, use the MYPYPATH environment variable to tell mypy where to find them.