-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pydantic not working #96
Comments
Thanks for reporting this, @MominIqbal-1234. Would you mind providing instructions for reproducing this issue? |
@dicej I have reproduced it. @MominIqbal-1234, Since pypi does not have builds for The steps should be something like git clone https://github.com/dicej/wasi-wheels/
cd wasi-wheel
make With that step, all the packages will be built. you can then extract the The directory structure
I did not test a complicated example but this example compiled and I was able to run it successfully. import datetime
from typing import Tuple
from spin_sdk.http import IncomingHandler, Request, Response
from pydantic import BaseModel
class Delivery(BaseModel):
timestamp: datetime.datetime
class IncomingHandler(IncomingHandler):
def handle_request(self, request: Request) -> Response:
timestamp = datetime.datetime(2020, 1, 2, 3, 4, 5)
m = Delivery(timestamp=timestamp)
print(repr(m.timestamp))
return Response(
200,
{"content-type": "text/plain"},
bytes("Hello from Python!", "utf-8")
) |
Thanks for digging into this @karthik2804. This is a good reminder that we should start publishing pre-built artifacts for all supported packages in the |
Caused by:
ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'
Error: Build command for component spin-templete failed with status Exited(1)
The text was updated successfully, but these errors were encountered: