Search Options

Results per page
Sort
Preferred Languages
Advance

Results 331 - 340 of 808 for f$ (0.01 sec)

  1. docs_src/handling_errors/tutorial003.py

    app = FastAPI()
    
    
    @app.exception_handler(UnicornException)
    async def unicorn_exception_handler(request: Request, exc: UnicornException):
        return JSONResponse(
            status_code=418,
            content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."},
        )
    
    
    @app.get("/unicorns/{name}")
    async def read_unicorn(name: str):
        if name == "yolo":
            raise UnicornException(name=name)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 626 bytes
    - Viewed (0)
  2. src/all.rc

    #!/bin/rc -e
    # Copyright 2012 The Go Authors. All rights reserved.
    # Use of this source code is governed by a BSD-style
    # license that can be found in the LICENSE file.
    
    rfork n
    
    if(! test -f make.rc){
    	echo 'all.rc must be run from $GOROOT/src' >[1=2]
    	exit wrongdir
    }
    
    . ./make.rc --no-banner $*
    bind -b $GOROOT/bin /bin
    ./run.rc --no-rebuild
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Apr 20 04:53:46 UTC 2020
    - 388 bytes
    - Viewed (0)
  3. docs_src/configure_swagger_ui/tutorial003.py

    from fastapi import FastAPI
    
    app = FastAPI(swagger_ui_parameters={"deepLinking": False})
    
    
    @app.get("/users/{username}")
    async def read_user(username: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 201 bytes
    - Viewed (0)
  4. docs_src/python_types/tutorial009.py

    from typing import Optional
    
    
    def say_hi(name: Optional[str] = None):
        if name is not None:
            print(f"Hey {name}!")
        else:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 12 21:44:23 UTC 2020
    - 164 bytes
    - Viewed (0)
  5. docs_src/background_tasks/tutorial001.py

    from fastapi import BackgroundTasks, FastAPI
    
    app = FastAPI()
    
    
    def write_notification(email: str, message=""):
        with open("log.txt", mode="w") as email_file:
            content = f"notification for {email}: {message}"
            email_file.write(content)
    
    
    @app.post("/send-notification/{email}")
    async def send_notification(email: str, background_tasks: BackgroundTasks):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 519 bytes
    - Viewed (0)
  6. dockerscripts/download-static-curl.sh

    #!/bin/bash
    
    function download_arch_specific_executable {
    	curl -f -L -s -q \
    		https://github.com/moparisthebest/static-curl/releases/latest/download/curl-$1 \
    		-o /go/bin/curl || exit 1
    	chmod +x /go/bin/curl
    }
    
    case $TARGETARCH in
    "arm64")
    	download_arch_specific_executable aarch64
    	;;
    "s390x")
    	echo "Not downloading static cURL because it does not exist for the $TARGETARCH architecture."
    	;;
    *)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 15:45:19 UTC 2024
    - 461 bytes
    - Viewed (0)
  7. src/cmd/api/testdata/src/pkg/p1/p1.go

    	A         = 1
    	a         = 11
    	A64 int64 = 1
    
    	AIsLowerA = a // previously declared
    )
    
    const (
    	ConversionConst = MyInt(5)
    )
    
    // Variables from function calls.
    var (
    	V = ptwo.F()
    	// Deprecated: use WError.
    	VError = BarE()
    	V1     = Bar1(1, 2, 3)
    	V2     = ptwo.G()
    )
    
    // Variables with conversions:
    var (
    	StrConv  = string("foo")
    	ByteConv = []byte("foo")
    )
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Dec 02 16:29:41 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  8. docs_src/python_types/tutorial009c_py310.py

    def say_hi(name: str | None):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 56 bytes
    - Viewed (0)
  9. src/cmd/api/testdata/src/issue21181/p/p_generic.go

    //go:build !amd64
    // +build !amd64
    
    package p
    
    import (
    	"indirect"
    )
    
    var in = []algo{
    	{indirect.F},
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 105 bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial008c_an.py

    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
                status_code=404, detail="Item not found, there's only a plumbus here"
            )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 710 bytes
    - Viewed (0)
Back to top