This repository was archived by the owner on May 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ eth-utils==4.1.1
3939eth_abi == 5.1.0
4040exceptiongroup == 1.2.2
4141executing == 2.0.1
42- fastapi == 0.135.1
42+ fastapi == 0.111.0
4343fastapi-cli == 0.0.7
4444filelock == 3.15.4
4545flatbuffers == 24.3.25
@@ -50,7 +50,7 @@ googleapis-common-protos==1.63.2
5050grpcio == 1.65.2
5151h11 == 0.14.0
5252hexbytes == 1.2.1
53- httpcore == 1.0.5
53+ httpcore == 1.0.7
5454httptools == 0.6.1
5555httpx == 0.28.1
5656huggingface-hub == 0.24.5
Original file line number Diff line number Diff line change 1+ from typing import Optional
2+
13from fastapi import FastAPI
24
35app = FastAPI ()
@@ -9,17 +11,17 @@ def read_root():
911
1012
1113@app .get ("/items/{item_id}" )
12- def read_item (item_id : int , q : str | None = None ):
14+ def read_item (item_id : int , q : Optional [ str ] = None ):
1315 return {"item_id" : item_id , "q" : q }
1416
1517
1618@app .get ("/trades/{trade_id}" )
17- def read_trade (trade_id : int , q : str | None = None ):
19+ def read_trade (trade_id : int , q : Optional [ str ] = None ):
1820 return {"trade_id" : trade_id , "q" : q }
1921
2022
2123@app .get ("/markets/{market_id}" )
22- def read_market (market_id : int , q : str | None = None ):
24+ def read_market (market_id : int , q : Optional [ str ] = None ):
2325 return {"market_id" : market_id , "q" : q }
2426
2527
You can’t perform that action at this time.
0 commit comments