Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 47 for native (0.18 sec)

  1. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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 (1)
  6. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  7. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 502 bytes
    - Viewed (0)
  8. docs_src/sql_databases/sql_app_py39/models.py

    from .database import Base
    
    
    class User(Base):
        __tablename__ = "users"
    
        id = Column(Integer, primary_key=True)
        email = Column(String, unique=True, index=True)
        hashed_password = Column(String)
        is_active = Column(Boolean, default=True)
    
        items = relationship("Item", back_populates="owner")
    
    
    class Item(Base):
        __tablename__ = "items"
    
        id = Column(Integer, primary_key=True)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:35:33 GMT 2024
    - 710 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.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)
  10. tests/test_tutorial/test_sql_databases/test_sql_databases_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)
Back to top