Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 587 for Junior (0.17 sec)

  1. docs_src/body_multiple_params/tutorial004_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 674 bytes
    - Viewed (0)
  2. internal/event/rules.go

    			targetIDs = targetIDs.Union(targetIDSet)
    		}
    	}
    
    	return targetIDs
    }
    
    // Clone - returns copy of this rules.
    func (rules Rules) Clone() Rules {
    	rulesCopy := make(Rules)
    
    	for pattern, targetIDSet := range rules {
    		rulesCopy[pattern] = targetIDSet.Clone()
    	}
    
    	return rulesCopy
    }
    
    // Union - returns union with given rules as new rules.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  3. docs_src/body_updates/tutorial001.py

    from typing import List, Union
    
    from fastapi import FastAPI
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Union[str, None] = None
        description: Union[str, None] = None
        price: Union[float, None] = None
        tax: float = 10.5
        tags: List[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 906 bytes
    - Viewed (0)
  4. fastapi/utils.py

                main_dict[key] = main_dict[key] + update_dict[key]
            else:
                main_dict[key] = value
    
    
    def get_value_or_default(
        first_item: Union[DefaultPlaceholder, DefaultType],
        *extra_items: Union[DefaultPlaceholder, DefaultType],
    ) -> Union[DefaultPlaceholder, DefaultType]:
        """
        Pass items or `DefaultPlaceholder`s by descending priority.
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. docs_src/extra_models/tutorial001.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel, EmailStr
    
    app = FastAPI()
    
    
    class UserIn(BaseModel):
        username: str
        password: str
        email: EmailStr
        full_name: Union[str, None] = None
    
    
    class UserOut(BaseModel):
        username: str
        email: EmailStr
        full_name: Union[str, None] = None
    
    
    class UserInDB(BaseModel):
        username: str
        hashed_password: str
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 943 bytes
    - Viewed (0)
  6. fastapi/types.py

    import types
    from enum import Enum
    from typing import Any, Callable, Dict, Set, Type, TypeVar, Union
    
    from pydantic import BaseModel
    
    DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any])
    UnionType = getattr(types, "UnionType", Union)
    ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Dec 12 00:29:03 GMT 2023
    - 383 bytes
    - Viewed (0)
  7. docs_src/body_nested_models/tutorial006_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
        images: Union[list[Image], None] = None
    
    
    @app.put("/items/{item_id}")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 519 bytes
    - Viewed (0)
  8. docs/fr/docs/tutorial/query-params-str-validations.md

    ```
    
    Le paramètre de requête `q` a pour type `Union[str, None]` (ou `str | None` en Python 3.10), signifiant qu'il est de type `str` mais pourrait aussi être égal à `None`, et bien sûr, la valeur par défaut est `None`, donc **FastAPI** saura qu'il n'est pas requis.
    
    !!! note
        **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `= None`.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jul 27 18:53:21 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  9. docs_src/body_updates/tutorial002.py

    from typing import List, Union
    
    from fastapi import FastAPI
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Union[str, None] = None
        description: Union[str, None] = None
        price: Union[float, None] = None
        tax: float = 10.5
        tags: List[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1K bytes
    - Viewed (0)
  10. internal/event/targetidset.go

    		setCopy[k] = v
    	}
    	return setCopy
    }
    
    // add - adds TargetID to the set.
    func (set TargetIDSet) add(targetID TargetID) {
    	set[targetID] = struct{}{}
    }
    
    // Union - returns union with given set as new set.
    func (set TargetIDSet) Union(sset TargetIDSet) TargetIDSet {
    	nset := set.Clone()
    
    	for k := range sset {
    		nset.add(k)
    	}
    
    	return nset
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 1.9K bytes
    - Viewed (0)
Back to top