Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for native (0.18 sec)

  1. tests/test_ws_router.py

    ):
        await websocket.accept()
        await websocket.send_text(data)
        await websocket.close()
    
    
    @native_prefix_route.websocket("/")
    async def router_native_prefix_ws(websocket: WebSocket):
        await websocket.accept()
        await websocket.send_text("Hello, router with native prefix!")
        await websocket.close()
    
    
    async def ws_dependency_err():
        raise NotImplementedError()
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. .github/actions/notify-translations/app/main.py

        # Messages to create or check
        new_translation_message = f"Good news everyone! 😉 There's a new translation PR to be reviewed: #{pr.number} by @{pr.user.login}. 🎉 This requires 2 approvals from native speakers to be merged. 🤓"
        done_translation_message = f"~There's a new translation PR to be reviewed: #{pr.number} by @{pr.user.login}~ Good job! This is done. 🍰☕"
    
        # Normally only one language, but still
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  3. configure.py

      """Set TF_CUDA_COMPUTE_CAPABILITIES."""
      while True:
        native_cuda_compute_capabilities = get_native_cuda_compute_capabilities(
            environ_cp)
        if not native_cuda_compute_capabilities:
          default_cuda_compute_capabilities = _DEFAULT_CUDA_COMPUTE_CAPABILITIES
        else:
          default_cuda_compute_capabilities = native_cuda_compute_capabilities
    
        ask_cuda_compute_capabilities = (
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  4. docs_src/security/tutorial004_an_py310.py

        if user is None:
            raise credentials_exception
        return user
    
    
    async def get_current_active_user(
        current_user: Annotated[User, Depends(get_current_user)],
    ):
        if current_user.disabled:
            raise HTTPException(status_code=400, detail="Inactive user")
        return current_user
    
    
    @app.post("/token")
    async def login_for_access_token(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  5. docs_src/security/tutorial005_an.py

                    headers={"WWW-Authenticate": authenticate_value},
                )
        return user
    
    
    async def get_current_active_user(
        current_user: Annotated[User, Security(get_current_user, scopes=["me"])],
    ):
        if current_user.disabled:
            raise HTTPException(status_code=400, detail="Inactive user")
        return current_user
    
    
    @app.post("/token")
    async def login_for_access_token(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_sql_databases.py

                        "title": "User",
                        "required": ["email", "id", "is_active"],
                        "type": "object",
                        "properties": {
                            "email": {"title": "Email", "type": "string"},
                            "id": {"title": "Id", "type": "integer"},
                            "is_active": {"title": "Is Active", "type": "boolean"},
                            "items": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py

                        "title": "User",
                        "required": ["email", "id", "is_active"],
                        "type": "object",
                        "properties": {
                            "email": {"title": "Email", "type": "string"},
                            "id": {"title": "Id", "type": "integer"},
                            "is_active": {"title": "Is Active", "type": "boolean"},
                            "items": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial005_py39.py

        assert response.json() == {"detail": "Could not validate credentials"}
        assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
    
    
    @needs_py39
    def test_token_inactive_user(client: TestClient):
        access_token = get_access_token(
            username="alice", password="secretalice", scope="me", client=client
        )
        response = client.get(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  9. docs_src/security/tutorial004_py310.py

        if user is None:
            raise credentials_exception
        return user
    
    
    async def get_current_active_user(current_user: User = Depends(get_current_user)):
        if current_user.disabled:
            raise HTTPException(status_code=400, detail="Inactive user")
        return current_user
    
    
    @app.post("/token")
    async def login_for_access_token(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  10. docs_src/sql_databases/sql_app/schemas.py

        class Config:
            orm_mode = True
    
    
    class UserBase(BaseModel):
        email: str
    
    
    class UserCreate(UserBase):
        password: str
    
    
    class User(UserBase):
        id: int
        is_active: bool
        items: List[Item] = []
    
        class Config:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 502 bytes
    - Viewed (0)
Back to top