mirror of
https://github.com/autistic-symposium/blockchain-data-engineering-toolkit.git
synced 2025-04-26 02:39:15 -04:00
add db async methods
This commit is contained in:
parent
548998d557
commit
2d346fec48
@ -1,27 +0,0 @@
|
|||||||
from typing import Optional
|
|
||||||
|
|
||||||
from pydantic import BaseModel, EmailStr, Field
|
|
||||||
|
|
||||||
|
|
||||||
class WalletsSchema(BaseModel):
|
|
||||||
wallet: float = Field(...)
|
|
||||||
|
|
||||||
class Config:
|
|
||||||
allow_population_by_field_name = True
|
|
||||||
schema_extra = {
|
|
||||||
"example": {
|
|
||||||
"wallet": "balance"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def ResponseModel(data, message):
|
|
||||||
return {
|
|
||||||
"data": [data],
|
|
||||||
"code": 200,
|
|
||||||
"message": message,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def ErrorResponseModel(error, code, message):
|
|
||||||
return {"error": error, "code": code, "message": message}
|
|
Loading…
x
Reference in New Issue
Block a user