Search Options

Results per page
Sort
Preferred Languages
Advance

Results 881 - 890 of 1,080 for Str (0.01 sec)

  1. docs/nl/docs/index.md

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. docs_src/security/tutorial007_an_py39.py

                detail="Incorrect username or password",
                headers={"WWW-Authenticate": "Basic"},
            )
        return credentials.username
    
    
    @app.get("/users/me")
    def read_current_user(username: Annotated[str, Depends(get_current_username)]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/response-model.md

    ```Python hl_lines="9  11-12"
    {!> ../../docs_src/response_model/tutorial004_py310.py!}
    ```
    
    ////
    
    * `description: Union[str, None] = None` (โš–๏ธ `str | None = None` ๐Ÿ 3๏ธโƒฃ.1๏ธโƒฃ0๏ธโƒฃ) โœ”๏ธ ๐Ÿ”ข `None`.
    * `tax: float = 10.5` โœ”๏ธ ๐Ÿ”ข `10.5`.
    * `tags: List[str] = []` ๐Ÿ”ข ๐Ÿ› ๐Ÿ“‡: `[]`.
    
    โœ‹๏ธ ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ’š ๐Ÿšซ ๐Ÿ‘ซ โšช๏ธโžก๏ธ ๐Ÿ ๐Ÿšฅ ๐Ÿ‘ซ ๐Ÿšซ ๐Ÿค™ ๐Ÿช.
    
    ๐Ÿ–ผ, ๐Ÿšฅ ๐Ÿ‘† โœ”๏ธ ๐Ÿท โฎ๏ธ ๐Ÿ“š ๐Ÿ“ฆ ๐Ÿ”ข โ˜ ๐Ÿ’ฝ, โœ‹๏ธ ๐Ÿ‘† ๐Ÿšซ ๐Ÿ’š ๐Ÿ“จ ๐Ÿ“ถ ๐Ÿ“ ๐ŸŽป ๐Ÿ“จ ๐ŸŒ• ๐Ÿ”ข ๐Ÿ’ฒ.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  4. docs/fr/docs/tutorial/path-params-numeric-validations.md

    /// tip
    
    Ce n'est probablement pas aussi important ou nรฉcessaire si vous utilisez `Annotated`.
    
    ///
    
    Disons que vous voulez dรฉclarer le paramรจtre de requรชte `q` comme un `str` requis.
    
    Et vous n'avez pas besoin de dรฉclarer autre chose pour ce paramรจtre, donc vous n'avez pas vraiment besoin d'utiliser `Query`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 10:32:37 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/path-params-numeric-validations.md

    ## Order the parameters as you need
    
    /// tip
    
    This is probably not as important or necessary if you use `Annotated`.
    
    ///
    
    Let's say that you want to declare the query parameter `q` as a required `str`.
    
    And you don't need to declare anything else for that parameter, so you don't really need to use `Query`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  6. docs/em/docs/advanced/settings.md

    , ๐Ÿ”ข ๐Ÿ”› โšซ๏ธ ๐Ÿ”œ ๐Ÿ› ๏ธ ๐Ÿ• ๐Ÿ”  ๐ŸŒ€ โŒ. & โคด๏ธ ๐Ÿ’ฒ ๐Ÿ“จ ๐Ÿ”  ๐Ÿ‘ˆ ๐ŸŒ€ โŒ ๐Ÿ”œ โš™๏ธ ๐Ÿ”„ & ๐Ÿ”„ ๐Ÿ•โ” ๐Ÿ”ข ๐Ÿค™ โฎ๏ธ โšซ๏ธโ” ๐ŸŽ ๐ŸŒ€ โŒ.
    
    ๐Ÿ–ผ, ๐Ÿšฅ ๐Ÿ‘† โœ”๏ธ ๐Ÿ”ข:
    
    ```Python
    @lru_cache
    def say_hi(name: str, salutation: str = "Ms."):
        return f"Hello {salutation} {name}"
    ```
    
    ๐Ÿ‘† ๐Ÿ“‹ ๐Ÿ’ช ๐Ÿ› ๏ธ ๐Ÿ’– ๐Ÿ‘‰:
    
    ```mermaid
    sequenceDiagram
    
    participant code as Code
    participant function as say_hi()
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/custom-response.md

    The main `Response` class, all the other responses inherit from it.
    
    You can return it directly.
    
    It accepts the following parameters:
    
    * `content` - A `str` or `bytes`.
    * `status_code` - An `int` HTTP status code.
    * `headers` - A `dict` of strings.
    * `media_type` - A `str` giving the media type. E.g. `"text/html"`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  8. docs_src/sql_databases_peewee/sql_app/crud.py

    from . import models, schemas
    
    
    def get_user(user_id: int):
        return models.User.filter(models.User.id == user_id).first()
    
    
    def get_user_by_email(email: str):
        return models.User.filter(models.User.email == email).first()
    
    
    def get_users(skip: int = 0, limit: int = 100):
        return list(models.User.select().offset(skip).limit(limit))
    
    
    def create_user(user: schemas.UserCreate):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 843 bytes
    - Viewed (0)
  9. migrator/migrator.go

    	for _, opt := range opts {
    		str := stmt.Quote(opt.DBName)
    		if opt.Expression != "" {
    			str = opt.Expression
    		} else if opt.Length > 0 {
    			str += fmt.Sprintf("(%d)", opt.Length)
    		}
    
    		if opt.Collate != "" {
    			str += " COLLATE " + opt.Collate
    		}
    
    		if opt.Sort != "" {
    			str += " " + opt.Sort
    		}
    		results = append(results, clause.Expr{SQL: str})
    	}
    	return
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Apr 26 07:15:49 UTC 2024
    - 29K bytes
    - Viewed (0)
  10. docs_src/custom_docs_ui/tutorial002.py

            openapi_url=app.openapi_url,
            title=app.title + " - ReDoc",
            redoc_js_url="/static/redoc.standalone.js",
        )
    
    
    @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
    - 1.1K bytes
    - Viewed (0)
Back to top