Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Match (0.02 sec)

  1. tests/test_multipart_installation.py

        with warnings.catch_warnings(record=True):
            warnings.simplefilter("always")
            monkeypatch.delattr("multipart.multipart.parse_options_header", raising=False)
        with pytest.raises(RuntimeError, match=multipart_incorrect_install_error):
            app = FastAPI()
    
            @app.post("/")
            async def root(username: str = Form()):
                return username  # pragma: nocover
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 21:46:26 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. fastapi/routing.py

                    embed_body_fields=self._embed_body_fields,
                )
            )
    
        def matches(self, scope: Scope) -> Tuple[Match, Scope]:
            match, child_scope = super().matches(scope)
            if match != Match.NONE:
                child_scope["route"] = self
            return match, child_scope
    
    
    class APIRoute(routing.Route):
        def __init__(
            self,
            path: str,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:44:57 UTC 2024
    - 172.1K bytes
    - Viewed (0)
  3. docs_src/sql_databases/tutorial002_an.py

    def read_hero(hero_id: int, session: SessionDep):
        hero = session.get(Hero, hero_id)
        if not hero:
            raise HTTPException(status_code=404, detail="Hero not found")
        return hero
    
    
    @app.patch("/heroes/{hero_id}", response_model=HeroPublic)
    def update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep):
        hero_db = session.get(Hero, hero_id)
        if not hero_db:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  4. docs_src/sql_databases/tutorial002_py39.py

    def read_hero(hero_id: int, session: Session = Depends(get_session)):
        hero = session.get(Hero, hero_id)
        if not hero:
            raise HTTPException(status_code=404, detail="Hero not found")
        return hero
    
    
    @app.patch("/heroes/{hero_id}", response_model=HeroPublic)
    def update_hero(
        hero_id: int, hero: HeroUpdate, session: Session = Depends(get_session)
    ):
        hero_db = session.get(Hero, hero_id)
        if not hero_db:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. configure.py

            hermetic_cuda_compute_capabilities.split()
        )
        for compute_capability in hermetic_cuda_compute_capabilities.split(','):
          m = re.match('[0-9]+.[0-9]+', compute_capability)
          if not m:
            # We now support sm_35,sm_50,sm_60,compute_70.
            sm_compute_match = re.match('(sm|compute)_?([0-9]+[0-9]+)',
                                        compute_capability)
            if not sm_compute_match:
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Wed Oct 02 22:16:02 UTC 2024
    - 48.2K bytes
    - Viewed (0)
  6. docs_src/sql_databases/tutorial002_py310.py

    def read_hero(hero_id: int, session: Session = Depends(get_session)):
        hero = session.get(Hero, hero_id)
        if not hero:
            raise HTTPException(status_code=404, detail="Hero not found")
        return hero
    
    
    @app.patch("/heroes/{hero_id}", response_model=HeroPublic)
    def update_hero(
        hero_id: int, hero: HeroUpdate, session: Session = Depends(get_session)
    ):
        hero_db = session.get(Hero, hero_id)
        if not hero_db:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  7. docs_src/sql_databases/tutorial002_an_py39.py

    def read_hero(hero_id: int, session: SessionDep):
        hero = session.get(Hero, hero_id)
        if not hero:
            raise HTTPException(status_code=404, detail="Hero not found")
        return hero
    
    
    @app.patch("/heroes/{hero_id}", response_model=HeroPublic)
    def update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep):
        hero_db = session.get(Hero, hero_id)
        if not hero_db:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_tutorial002.py

            assert response.json() == snapshot(
                [{"name": "Spider-Boy", "age": 18, "id": IsInt()}]
            )
    
            # Update a hero
            response = client.patch(
                f"/heroes/{hero_id}", json={"name": "Dog Pond", "age": None}
            )
            assert response.status_code == 200, response.text
            assert response.json() == snapshot(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  9. docs_src/sql_databases/tutorial002.py

    def read_hero(hero_id: int, session: Session = Depends(get_session)):
        hero = session.get(Hero, hero_id)
        if not hero:
            raise HTTPException(status_code=404, detail="Hero not found")
        return hero
    
    
    @app.patch("/heroes/{hero_id}", response_model=HeroPublic)
    def update_hero(
        hero_id: int, hero: HeroUpdate, session: Session = Depends(get_session)
    ):
        hero_db = session.get(Hero, hero_id)
        if not hero_db:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  10. docs_src/sql_databases/tutorial002_an_py310.py

    def read_hero(hero_id: int, session: SessionDep):
        hero = session.get(Hero, hero_id)
        if not hero:
            raise HTTPException(status_code=404, detail="Hero not found")
        return hero
    
    
    @app.patch("/heroes/{hero_id}", response_model=HeroPublic)
    def update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep):
        hero_db = session.get(Hero, hero_id)
        if not hero_db:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top