I'm just starting with dagger and was trying the first example here:
https://docs.dagger.io/quickstart/#write-custom-functions
With the Python example:
async def publish(self) -> str:
return await (
dag.container()
.from_("alpine:latest")
.with_new_file("/hi.txt", "Hello from Dagger!")
.with_entrypoint(["cat", "/hi.txt"])
.publish("ttl.sh/hello")
)```
I put this into a simple `main.py` file which I made executable (although I get the same error without).
At first when running the command `dagger call build` I got `module not found` but after adding a dagger.json
```{
"name": "publish",
"engineVersion": "v0.18.12"
}```
I get the error
`Unknown command "publish" for "dagger call"`
I've tried turning the function into a full module by adding
```@object_type
class Publish:```
With the same result. I've also tried putting it in `src/publish/` with an `__init.py__` but that gives other errors and based on the example it looks like this should work without all that.
dagger version is v0.18.12 and the Python SDK is installed. Any help is appreciated, Thank you!