- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 443 for constant (0.14 sec)
-
docs/en/docs/how-to/nosql-databases-couchbase.md
## Import Couchbase components For now, don't pay attention to the rest, only the imports: ```Python hl_lines="3-5" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` ## Define a constant to use as a "document type" We will use it later as a fixed field `type` in our documents. This is not required by Couchbase, but is a good practice that will help you afterwards. ```Python hl_lines="9"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 16 13:23:25 GMT 2024 - 6K bytes - Viewed (0) -
docs/en/docs/external-links.md
{% for section_name, section_content in external_links.items() %} ## {{ section_name }} {% for lang_name, lang_content in section_content.items() %} ### {{ lang_name }} {% for item in lang_content %} * <a href="{{ item.link }}" class="external-link" target="_blank">{{ item.title }}</a> by <a href="{{ item.author_link }}" class="external-link" target="_blank">{{ item.author }}</a>. {% endfor %} {% endfor %}
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Oct 22 07:35:13 GMT 2023 - 1K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
```Python hl_lines="7" {!../../../docs_src/query_params_str_validations/tutorial006.py!} ``` !!! info Si vous n'avez jamais vu ce `...` auparavant : c'est une des constantes natives de Python <a href="https://docs.python.org/fr/3/library/constants.html#Ellipsis" class="external-link" target="_blank">appelée "Ellipsis"</a>. Cela indiquera à **FastAPI** que la présence de ce paramètre est obligatoire.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jul 27 18:53:21 GMT 2023 - 9.8K bytes - Viewed (0) -
tests/test_include_router_defaults_overrides.py
url = "" content_type_level = "0" if override1: url += "/level1" content_type_level = "1" if override2: url += "/level2" content_type_level = "2" if override3: url += "/level3" content_type_level = "3" if override4: url += "/level4" content_type_level = "4" if override5:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 358.6K bytes - Viewed (0) -
docs_src/dependencies/tutorial011.py
class FixedContentQueryChecker: def __init__(self, fixed_content: str): self.fixed_content = fixed_content def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/") async def read_query_check(fixed_content_included: bool = Depends(checker)):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 504 bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001_py310.py
response = client.post( "/items/", content='{"name": "Foo", "price": 50.5}', headers={"Content-Type": "application/geo+json"}, ) assert response.status_code == 200, response.text @needs_py310 def test_no_content_type_is_json(client: TestClient): response = client.post( "/items/", content='{"name": "Foo", "price": 50.5}', )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 15K bytes - Viewed (2) -
tests/test_tutorial/test_body/test_tutorial001.py
"/items/", content='{"name": "Foo", "price": 50.5}', headers={"Content-Type": "application/geo+json"}, ) assert response.status_code == 200, response.text def test_no_content_type_is_json(client: TestClient): response = client.post( "/items/", content='{"name": "Foo", "price": 50.5}', ) assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 14.7K bytes - Viewed (7) -
tests/test_tutorial/test_request_files/test_tutorial001_03.py
path.write_bytes(b"<file content>") client = TestClient(app) with path.open("rb") as file: response = client.post("/files/", files={"file": file}) assert response.status_code == 200, response.text assert response.json() == {"file_size": 14} def test_post_upload_file(tmp_path): path = tmp_path / "test.txt" path.write_bytes(b"<file content>") client = TestClient(app)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 6K bytes - Viewed (0) -
tests/test_response_code_no_body.py
async def a(): pass @app.get("/b", responses={204: {"description": "No Content"}}) async def b(): pass # pragma: no cover client = TestClient(app) def test_get_response(): response = client.get("/a") assert response.status_code == 204, response.text assert "content-length" not in response.headers assert response.content == b"" def test_openapi_schema():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_body_updates/test_tutorial001_py39.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 11.8K bytes - Viewed (0)