Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 349 for unionOf (0.36 seconds)

  1. docs/ko/docs/tutorial/extra-models.md

    ///
    
    {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *}
    
    
    ### Python 3.10에서 `Union`
    
    위의 예제에서는 `response_model` 인자 값으로 `Union[PlaneItem, CarItem]`을 전달합니다.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri May 30 13:38:33 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  2. fastapi/_compat/shared.py

    
    def _annotation_is_complex(annotation: Union[type[Any], None]) -> bool:
        return (
            lenient_issubclass(annotation, (BaseModel, Mapping, UploadFile))
            or _annotation_is_sequence(annotation)
            or is_dataclass(annotation)
        )
    
    
    def field_annotation_is_complex(annotation: Union[type[Any], None]) -> bool:
        origin = get_origin(annotation)
        if origin is Union or origin is UnionType:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 6.7K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/collect/SetViewTest.java

        assertMinSize(union(emptySet(), emptySet()), 0);
        assertMinSize(union(setSize(2), setSize(3)), 3);
        assertMinSize(union(setSize(3), setSize(2)), 3);
        assertMinSize(union(setSizeRange(10, 20), setSizeRange(11, 12)), 11);
        assertMinSize(union(setSizeRange(11, 12), setSizeRange(10, 20)), 11);
      }
    
      public void testUnion_maxSize() {
        assertMaxSize(union(emptySet(), emptySet()), 0);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 29.9K bytes
    - Click Count (0)
  4. docs_src/body_multiple_params/tutorial001_py39.py

    from fastapi import FastAPI, Path
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int = Path(title="The ID of the item to get", ge=0, le=1000),
        q: Union[str, None] = None,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 596 bytes
    - Click Count (0)
  5. 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,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 674 bytes
    - Click Count (0)
  6. 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.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 5.1K bytes
    - Click Count (0)
  7. docs_src/body_multiple_params/tutorial003_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(
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 575 bytes
    - Click Count (0)
  8. 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.
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri May 24 23:05:23 GMT 2024
    - 2.7K bytes
    - Click Count (0)
  9. docs_src/security/tutorial004_py39.py

    }
    
    
    class Token(BaseModel):
        access_token: str
        token_type: str
    
    
    class TokenData(BaseModel):
        username: Union[str, None] = None
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    password_hash = PasswordHash.recommended()
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  10. docs_src/body_multiple_params/tutorial001_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, Path
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: Union[str, None] = None,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 610 bytes
    - Click Count (0)
Back to Top