ntls-io / nautilus-trusted-compute

Nautilus Trusted Compute
GNU Affero General Public License v3.0
0 stars 3 forks source link

Initial fastapi #73

Closed sonasi closed 1 year ago

sonasi commented 1 year ago

Initiate a uvicorn/fastapi configuration in the 'backend-services' directory.

This contains initial paths for 'dataset', 'datapool' and 'dataschema', as needed for the data provisioning user story.

Follow instructions on [https://github.com/ntls-io/nautilus-wallet/tree/main/backend-services](Nautilus Wallet) for local installation and testing.

billguo99 commented 1 year ago

Could you change the branch you want to merge into from main to data-operations for this PR?

billguo99 commented 1 year ago

I'm getting the following internal error when trying to use the http://localhost:8000/docs#/default/post_dataset_create_dataset_create_post

bson.errors.InvalidDocument: cannot encode object: datetime.date(2023, 1, 30), of type: <class 'datetime.date'>

Have you encountered this?

Update: Turns out that. PyMongo doesn't support saving date instances. The server doesn't have a type for dates without times, so there would have to be some convention used to save dates without times.