Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 787 for unicos (0.19 sec)

  1. docs/pt/docs/tutorial/extra-data-types.md

            * Nas requisições, uma lista será lida, eliminando duplicadas e convertendo-a em um `set`.
            * Nas respostas, o `set` será convertido para uma `list`.
            * O esquema gerado vai especificar que os valores do `set` são unicos (usando o `uniqueItems` do JSON Schema).
    * `bytes`:
        * O `bytes` padrão do Python.
        * Em requisições e respostas será representado como uma `str`.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 3K bytes
    - Viewed (0)
  2. tests/test_union_body.py

    from typing import Optional, Union
    
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class OtherItem(BaseModel):
        price: int
    
    
    @app.post("/items/")
    def save_union_body(item: Union[OtherItem, Item]):
        return {"item": item}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  3. tests/test_union_inherited_body.py

    from typing import Optional, Union
    
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class ExtendedItem(Item):
        age: int
    
    
    @app.post("/items/")
    def save_union_different_body(item: Union[ExtendedItem, Item]):
        return {"item": item}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_handling_errors/test_tutorial003.py

    from docs_src.handling_errors.tutorial003 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/unicorns/shinny")
        assert response.status_code == 200, response.text
        assert response.json() == {"unicorn_name": "shinny"}
    
    
    def test_get_exception():
        response = client.get("/unicorns/yolo")
        assert response.status_code == 418, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. docs_src/handling_errors/tutorial003.py

    
    app = FastAPI()
    
    
    @app.exception_handler(UnicornException)
    async def unicorn_exception_handler(request: Request, exc: UnicornException):
        return JSONResponse(
            status_code=418,
            content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."},
        )
    
    
    @app.get("/unicorns/{name}")
    async def read_unicorn(name: str):
        if name == "yolo":
            raise UnicornException(name=name)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 626 bytes
    - Viewed (0)
  6. src/main/java/jcifs/dcerpc/msrpc/lsarpc.idl

    		uint32_t length;
    		uint8_t *root_directory;
    		unicode_string *object_name;
    		uint32_t attributes;
    		uint32_t security_descriptor;
    		LsarQosInfo *security_quality_of_service;
    	} LsarObjectAttributes;
    
    	typedef struct {
    		unicode_string name;
    		sid_t *sid;
    	} LsarDomainInfo;
    
    	typedef struct {
    		unicode_string name;
    		unicode_string dns_domain;
    		unicode_string dns_forest;
    		uuid_t domain_guid;
    		sid_t *sid;
    Others
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 3.1K bytes
    - Viewed (1)
  7. src/main/java/jcifs/smb1/dcerpc/msrpc/lsarpc.idl

    		uint32_t length;
    		uint8_t *root_directory;
    		unicode_string *object_name;
    		uint32_t attributes;
    		uint32_t security_descriptor;
    		LsarQosInfo *security_quality_of_service;
    	} LsarObjectAttributes;
    
    	typedef struct {
    		unicode_string name;
    		sid_t *sid;
    	} LsarDomainInfo;
    
    	typedef struct {
    		unicode_string name;
    		unicode_string dns_domain;
    		unicode_string dns_forest;
    		uuid_t domain_guid;
    		sid_t *sid;
    Others
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 3.1K bytes
    - Viewed (0)
  8. .github/actions/people/app/main.py

        new_people_content = yaml.dump(
            people, sort_keys=False, width=200, allow_unicode=True
        )
        new_github_sponsors_content = yaml.dump(
            github_sponsors, sort_keys=False, width=200, allow_unicode=True
        )
        if (
            people_old_content == new_people_content
            and github_sponsors_old_content == new_github_sponsors_content
        ):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  9. docs/de/docs/tutorial/extra-models.md

    !!! note "Hinweis"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:26:47 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/extra-models.md

        ```
    
    ## `Union` ou `anyOf`
    
    Você pode declarar uma resposta como o `Union` de dois tipos, o que significa que a resposta seria qualquer um dos dois.
    
    Isso será definido no OpenAPI com `anyOf`.
    
    Para fazer isso, use a dica de tipo padrão do Python <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    !!! note
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
Back to top