- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 384 for not (0.15 sec)
-
fastapi/security/api_key.py
bool, Doc( """ By default, if the query parameter is not provided, `APIKeyQuery` will automatically cancel the request and send the client an error. If `auto_error` is set to `False`, when the query parameter is not available, instead of erroring out, the dependency result will be `None`.
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 23 22:29:18 GMT 2024 - 9.1K bytes - Viewed (0) -
tests/test_multipart_installation.py
with pytest.raises(RuntimeError, match=multipart_not_installed_error): app = FastAPI() @app.post("/") async def root(username: str = Form()): return username # pragma: nocover def test_no_multipart_installed_file(monkeypatch): monkeypatch.delattr("multipart.__version__", raising=False) with pytest.raises(RuntimeError, match=multipart_not_installed_error): app = FastAPI()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 3.7K bytes - Viewed (0) -
fastapi/dependencies/utils.py
raise RuntimeError(multipart_incorrect_install_error) from None except ImportError: logger.error(multipart_not_installed_error) raise RuntimeError(multipart_not_installed_error) from None def get_param_sub_dependant( *, param_name: str, depends: params.Depends, path: str,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
docs/en/docs/how-to/separate-openapi-schemas.md
``` </details> ...then the `description` field will **not be required**. Because it has a default value of `None`. ### Input Model in Docs You can confirm that in the docs, the `description` field doesn't have a **red asterisk**, it's not marked as required: <div class="screenshot"> <img src="/img/tutorial/separate-openapi-schemas/image01.png"> </div>
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 6.7K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs_src/security/tutorial004_py310.py
user_dict = db[username] return UserInDB(**user_dict) def authenticate_user(fake_db, username: str, password: str): user = get_user(fake_db, username) if not user: return False if not verify_password(password, user.hashed_password): return False return user def create_access_token(data: dict, expires_delta: timedelta | None = None): to_encode = data.copy()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4K bytes - Viewed (0) -
docs_src/request_files/tutorial001_02_an_py39.py
@app.post("/files/") async def create_file(file: Annotated[Union[bytes, None], File()] = None): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: Union[UploadFile, None] = None): if not file: return {"message": "No upload file sent"} else:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 524 bytes - Viewed (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
So, you should declare it with `...` to mark it as required. Nevertheless, even if you declared it with `None` or set a default value, it would not affect anything, it would still be always required. ## Order the parameters as you need !!! tip This is probably not as important or necessary if you use `Annotated`. Let's say that you want to declare the query parameter `q` as a required `str`.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 9.1K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
@needs_py39 def test_no_token(client: TestClient): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): access_token = get_access_token(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) -
tests/test_tutorial/test_security/test_tutorial005_py310.py
@needs_py310 def test_no_token(client: TestClient): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): access_token = get_access_token(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)