- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 16 for annotations (0.37 seconds)
-
tests/test_security_oauth2.py
} } ) class User(BaseModel): username: str # Here we use string annotations to test them def get_current_user(oauth_header: "str" = Security(reusable_oauth2)): user = User(username=oauth_header) return user @app.post("/login") # Here we use string annotations to test them def login(form_data: "OAuth2PasswordRequestFormStrict" = Depends()): return form_dataCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 9K bytes - Click Count (0) -
docs/en/docs/advanced/dataclasses.md
7. Here the `response_model` is using a type annotation of a list of `Author` dataclasses. Again, you can combine `dataclasses` with standard type annotations. 8. Notice that this *path operation function* uses regular `def` instead of `async def`. As always, in FastAPI you can combine `def` and `async def` as needed.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 4.2K bytes - Click Count (0) -
pyproject.toml
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 9.3K bytes - Click Count (0) -
docs/de/llm-prompt.md
««« ## Type hints and annotations { #type-hints-and-annotations } »»» Translate with (German) – notice the hyphen: ««« ## Typhinweise und -annotationen { #type-hints-and-annotations } »»» Do NOT translate with (German) – notice the dash: ««« ## Typhinweise und –annotationen { #type-hints-and-annotations } »»»Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 09:39:53 GMT 2025 - 11.9K bytes - Click Count (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/rules/AbstractGradleViolationRule.groovy
return true } private static boolean isAnnotatedWithIncubating(JApiHasAnnotations member) { member.annotations*.fullyQualifiedName.any { it == Incubating.name } } private static boolean isAnnotatedWithDeprecated(JApiHasAnnotations member) { member.annotations*.fullyQualifiedName.any { it == Deprecated.name || it == kotlin.Deprecated.name } }Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Tue Dec 30 10:14:25 GMT 2025 - 10.5K bytes - Click Count (0) -
docs/en/docs/how-to/graphql.md
Depending on your use case, you might prefer to use a different library, but if you asked me, I would probably suggest you try **Strawberry**. Here's a small preview of how you could integrate Strawberry with FastAPI:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 3.4K bytes - Click Count (0) -
fastapi/dependencies/utils.py
default=param.default, annotation=get_typed_annotation(param.annotation, globalns), ) for param in signature.parameters.values() ] typed_signature = inspect.Signature(typed_params) return typed_signature def get_typed_annotation(annotation: Any, globalns: dict[str, Any]) -> Any: if isinstance(annotation, str): annotation = ForwardRef(annotation)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 37.6K bytes - Click Count (3) -
build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/AbstractBinaryCompatibilityTest.kt
import org.gradle.testkit.runner.GradleRunner import org.gradle.testkit.runner.UnexpectedBuildFailure import org.hamcrest.Matcher import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers import org.intellij.lang.annotations.Language import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Rule import org.junit.rules.TemporaryFolder import java.io.File import java.nio.file.Files
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Tue Dec 30 10:14:25 GMT 2025 - 18K bytes - Click Count (0) -
fastapi/openapi/models.py
contentSchema: Optional["SchemaOrBool"] = None # Ref: JSON Schema Validation 2020-12: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-a-vocabulary-for-basic-meta # A Vocabulary for Basic Meta-Data Annotations title: Optional[str] = None description: Optional[str] = None default: Optional[Any] = None deprecated: Optional[bool] = None readOnly: Optional[bool] = None
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 15.1K bytes - Click Count (0) -
docs/en/docs/release-notes.md
The key updated docs are: * Python Types Intro: * [Type Hints with Metadata Annotations](https://fastapi.tiangolo.com/python-types/#type-hints-with-metadata-annotations). * Tutorial: * [Query Parameters and String Validations - Additional validation](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#additional-validation)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 19:06:15 GMT 2025 - 586.7K bytes - Click Count (0)