Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 126 for name (0.14 sec)

  1. tests/test_tutorial/test_body/test_tutorial001.py

        response = client.post("/items/", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": None,
            "tax": None,
        }
    
    
    def test_post_with_str_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": "50.5"})
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (4)
  2. tests/test_tutorial/test_body/test_tutorial001_py310.py

        response = client.post("/items/", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": None,
            "tax": None,
        }
    
    
    @needs_py310
    def test_post_with_str_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": "50.5"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. fastapi/security/http.py

        def __init__(
            self,
            *,
            scheme: str,
            scheme_name: Optional[str] = None,
            description: Optional[str] = None,
            auto_error: bool = True,
        ):
            self.model = HTTPBaseModel(scheme=scheme, description=description)
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(
            self, request: Request
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  4. fastapi/security/oauth2.py

                ),
            ] = True,
        ):
            self.model = OAuth2Model(
                flows=cast(OAuthFlowsModel, flows), description=description
            )
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(self, request: Request) -> Optional[str]:
            authorization = request.headers.get("Authorization")
            if not authorization:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  5. tests/test_tutorial/test_bigger_applications/test_main_an.py

            "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200
        assert response.json() == {
            "plumbus": {"name": "Plumbus"},
            "gun": {"name": "Portal Gun"},
        }
    
    
    def test_items_with_no_token_jessica(client: TestClient):
        response = client.get("/items", headers={"X-Token": "fake-super-secret-token"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

            "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200
        assert response.json() == {
            "plumbus": {"name": "Plumbus"},
            "gun": {"name": "Portal Gun"},
        }
    
    
    @needs_py39
    def test_items_with_no_token_jessica(client: TestClient):
        response = client.get("/items", headers={"X-Token": "fake-super-secret-token"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  7. fastapi/utils.py

                use_type = create_model(original_type.__name__, __base__=original_type)
                cloned_types[original_type] = use_type
                for f in original_type.__fields__.values():
                    use_type.__fields__[f.name] = create_cloned_field(
                        f, cloned_types=cloned_types
                    )
        new_field = create_response_field(name=field.name, type_=use_type)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  8. ci/official/utilities/extract_resultstore_links.py

        case_attrib = attrib.copy()
        if command_type:
          command_type = command_type.title()
          case_name = f'{command_type} invocation {invocation_id}'
        else:
          case_name = f' Invocation {invocation_id}'
        case_attrib.update({'name': case_name,
                            'status': 'run', 'result': 'completed'})
    
        testcase = ElemTree.SubElement(testsuite, 'testcase', attrib=case_attrib)
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Nov 08 17:50:27 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params/test_tutorial006_py310.py

                                "name": "item_id",
                                "in": "path",
                            },
                            {
                                "required": True,
                                "schema": {"title": "Needy", "type": "string"},
                                "name": "needy",
                                "in": "query",
                            },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  10. docs_src/templates/tutorial001.py

    app = FastAPI()
    
    app.mount("/static", StaticFiles(directory="static"), name="static")
    
    
    templates = Jinja2Templates(directory="templates")
    
    
    @app.get("/items/{id}", response_class=HTMLResponse)
    async def read_item(request: Request, id: str):
        return templates.TemplateResponse(
            request=request, name="item.html", context={"id": id}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Dec 26 20:12:34 GMT 2023
    - 521 bytes
    - Viewed (0)
Back to top