Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for slice (0.24 sec)

  1. docs/en/docs/js/custom.js

                                console.error("Custom prompt found but no end delimiter", line)
                            }
                            const prompt = line.slice(0, promptStart).replace(customPromptLiteralStart, "")
                            let value = line.slice(promptStart + promptLiteralStart.length);
                            useLines.push({
                                type: "input",
                                value: value,
    JavaScript
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 08 17:50:56 GMT 2021
    - 6.6K bytes
    - Viewed (0)
  2. docs/en/docs/js/termynal.js

            for (let i = 1; i < chars.length + 1; i++) {
                await this._wait(this.typeDelay);
                const percent = Math.round(i / chars.length * 100);
                line.textContent = `${chars.slice(0, i)} ${percent}%`;
    			if (percent>progressPercent) {
    				break;
    			}
            }
        }
    
        /**
         * Helper function for animation delays, called with `await`.
    JavaScript
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 9.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        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(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 400, response.text
    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)
  4. tests/test_tutorial/test_security/test_tutorial005_py310.py

        assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
    
    
    @needs_py310
    def test_token_inactive_user(client: TestClient):
        access_token = get_access_token(
            username="alice", password="secretalice", scope="me", client=client
        )
        response = client.get(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 400, response.text
    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. docs_src/security/tutorial003_an_py39.py

            "full_name": "John Doe",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        },
        "alice": {
            "username": "alice",
            "full_name": "Alice Wonderson",
            "email": "alice@example.com",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial005_an.py

        assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
    
    
    def test_token_inactive_user():
        access_token = get_access_token(
            username="alice", password="secretalice", scope="me"
        )
        response = client.get(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 400, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. docs_src/security/tutorial003_an.py

            "full_name": "John Doe",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        },
        "alice": {
            "username": "alice",
            "full_name": "Alice Wonderson",
            "email": "alice@example.com",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  8. docs_src/security/tutorial003_an_py310.py

            "full_name": "John Doe",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        },
        "alice": {
            "username": "alice",
            "full_name": "Alice Wonderson",
            "email": "alice@example.com",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  9. docs_src/security/tutorial003_py310.py

            "full_name": "John Doe",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        },
        "alice": {
            "username": "alice",
            "full_name": "Alice Wonderson",
            "email": "alice@example.com",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 2.4K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_security/test_tutorial003_an.py

        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_inactive_user():
        response = client.get("/users/me", headers={"Authorization": "Bearer alice"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Inactive user"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8K bytes
    - Viewed (0)
Back to top