Search Options

Results per page
Sort
Preferred Languages
Advance

Results 851 - 860 of 1,080 for Str (0.01 sec)

  1. tests/test_generate_unique_id_function.py

        return f"bar_{route.name}"
    
    
    def custom_generate_unique_id3(route: APIRoute):
        return f"baz_{route.name}"
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    class Message(BaseModel):
        title: str
        description: str
    
    
    def test_top_level_generate_unique_id():
        app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
        router = APIRouter()
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jan 13 15:10:26 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  2. docs/nl/docs/features.md

    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Declareer een variabele als een str
    # en krijg editorondersteuning in de functie
    def main(user_id: str):
        return user_id
    
    
    # Een Pydantic model
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    Vervolgens kan je het op deze manier gebruiken:
    
    ```Python
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 03 13:50:38 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  3. callbacks.go

    	c.processor.callbacks = append(c.processor.callbacks, c)
    	return c.processor.compile()
    }
    
    // getRIndex get right index from string slice
    func getRIndex(strs []string, str string) int {
    	for i := len(strs) - 1; i >= 0; i-- {
    		if strs[i] == str {
    			return i
    		}
    	}
    	return -1
    }
    
    func sortCallbacks(cs []*callback) (fns []func(*DB), err error) {
    	var (
    		names, sorted []string
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Mar 26 03:33:36 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  4. cmd/update_test.go

    			}
    		}
    
    		str := getUserAgent(testCase.mode)
    		expectedStr := testCase.expectedStr
    		if IsDocker() {
    			expectedStr = strings.ReplaceAll(expectedStr, "; source", "; docker; source")
    		}
    		if !strings.Contains(str, expectedStr) {
    			t.Errorf("Test %d: expected: %s, got: %s", i+1, expectedStr, str)
    		}
    		os.Unsetenv("MARATHON_APP_LABEL_DCOS_PACKAGE_VERSION")
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/util/Encdec.java

            }
        }
    
        public static int enc_utf8( String str, byte[] dst, int di, int dlim ) throws IOException {
            int start = di, ch;
            int strlen = str.length();
    
            for( int i = 0; di < dlim && i < strlen; i++ ) {
                ch = str.charAt( i );
                if ((ch >= 0x0001) && (ch <= 0x007F)) {
                    dst[di++] = (byte)ch;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 10.9K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/request-files.md

    ### `UploadFile`
    
    `UploadFile` имеет следующие атрибуты:
    
    * `filename`: Строка `str` с исходным именем файла, который был загружен (например, `myimage.jpg`).
    * `content_type`: Строка `str` с типом содержимого (MIME type / media type) (например, `image/jpeg`).
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  7. tests/test_security_oauth2_authorization_code_bearer_description.py

    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize",
        tokenUrl="token",
        description="OAuth2 Code Bearer",
        auto_error=True,
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 401, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  8. tests/test_security_oauth2_password_bearer_optional.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False)
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        if token is None:
            return {"msg": "Create an account first"}
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. docs_src/path_params_numeric_validations/tutorial001_an_py310.py

    from fastapi import FastAPI, Path, Query
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get")],
        q: Annotated[str | None, Query(alias="item-query")] = None,
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 375 bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/dcerpc/UUID.java

            node[1] = uuid.node[1];
            node[2] = uuid.node[2];
            node[3] = uuid.node[3];
            node[4] = uuid.node[4];
            node[5] = uuid.node[5];
        }
        public UUID(String str) {
            char[] arr = str.toCharArray();
            time_low = hex_to_bin(arr, 0, 8);
            time_mid = S(hex_to_bin(arr, 9, 4));
            time_hi_and_version = S(hex_to_bin(arr, 14, 4));
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 4.1K bytes
    - Viewed (0)
Back to top