Search Options

Results per page
Sort
Preferred Languages
Advance

Results 371 - 380 of 619 for xprintf (0.09 sec)

  1. docs_src/python_types/tutorial009c.py

    from typing import Optional
    
    
    def say_hi(name: Optional[str]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 89 bytes
    - Viewed (0)
  2. docs_src/python_types/tutorial001.py

    def get_full_name(first_name, last_name):
        full_name = first_name.title() + " " + last_name.title()
        return full_name
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 162 bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial008c_an_py39.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 700 bytes
    - Viewed (0)
  4. tests/test_no_swagger_ui_redirect.py

        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert response.headers["content-type"] == "text/html; charset=utf-8"
        assert "swagger-ui-dist" in response.text
        print(client.base_url)
        assert "oauth2RedirectUrl" not in response.text
    
    
    def test_swagger_ui_no_oauth2_redirect():
        response = client.get("/docs/oauth2-redirect")
        assert response.status_code == 404, response.text
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 786 bytes
    - Viewed (0)
  5. docs_src/extra_models/tutorial002.py

        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
        print("User saved! ..not really")
        return user_in_db
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user_in: UserIn):
        user_saved = fake_save_user(user_in)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 824 bytes
    - Viewed (0)
  6. src/cmd/buildid/doc.go

    // license that can be found in the LICENSE file.
    
    /*
    Buildid displays or updates the build ID stored in a Go package or binary.
    
    Usage:
    
    	go tool buildid [-w] file
    
    By default, buildid prints the build ID found in the named file.
    If the -w option is given, buildid rewrites the build ID found in
    the file to accurately record a content hash of the file.
    
    This tool is only intended for use by the go command or
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 558 bytes
    - Viewed (0)
  7. docs_src/extra_models/tutorial001.py

        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
        print("User saved! ..not really")
        return user_in_db
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user_in: UserIn):
        user_saved = fake_save_user(user_in)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 943 bytes
    - Viewed (0)
  8. gorm.go

    	tx := db.getInstance()
    	tx.Statement.Settings.Store(fmt.Sprintf("%p", tx.Statement)+key, value)
    	return tx
    }
    
    // InstanceGet get value with key from current db instance's context
    func (db *DB) InstanceGet(key string) (interface{}, bool) {
    	return db.Statement.Settings.Load(fmt.Sprintf("%p", db.Statement) + key)
    }
    
    // Callback returns callback manager
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Oct 09 11:29:48 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  9. tests/test_custom_swagger_ui_redirect.py

        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert response.headers["content-type"] == "text/html; charset=utf-8"
        assert "swagger-ui-dist" in response.text
        print(client.base_url)
        assert (
            f"oauth2RedirectUrl: window.location.origin + '{swagger_ui_oauth2_redirect_url}'"
            in response.text
        )
    
    
    def test_swagger_ui_oauth2_redirect():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 1.1K bytes
    - Viewed (0)
  10. fastapi/cli.py

    
    def main() -> None:
        if not cli_main:  # type: ignore[truthy-function]
            message = 'To use the fastapi command, please install "fastapi[standard]":\n\n\tpip install "fastapi[standard]"\n'
            print(message)
            raise RuntimeError(message)  # noqa: B904
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 02 06:03:05 UTC 2024
    - 418 bytes
    - Viewed (0)
Back to top