← All repositories

fastapifastapi

Fastapi

Features

  • Application Core ClassesThe core class provides the primary interface for defining API routes, managing application state, and integrating with web frameworks for request handling.
  • Request Body ValidationsUse of models to define, validate, and document request body data, enabling automatic type checking and interactive documentation generation.
  • ASGI Middleware RegistrationsA standardized method to register middleware classes, ensuring proper integration with internal error handling and exception management systems.
  • Query Parameter ValidationsA parameter-validation utility for extracting and validating query string parameters, supporting default values, aliases, and validation constraints.
  • OpenAPI Response DefinitionsSupport for defining additional API response status codes and schemas by passing a dictionary to decorators, requiring manual response object returns.
  • Resource Replacement StrategiesSupport for full resource replacement using the HTTP PUT method, allowing developers to update entire data objects.
  • Background Task ManagersA background task management system allowing developers to offload slow operations to run after the HTTP response is returned to the client.
  • Asynchronous Request ProcessingThe request object provides asynchronous methods for streaming the request body as bytes or parsing it as JSON, facilitating efficient handling of large payloads.
  • Authenticated User InjectionA dependency-based mechanism for retrieving and injecting authenticated user models into request handlers, using schema-based validation for type-safe data handling.
  • Model Attribute ValidationsUse of field utilities within data models to declare validation, metadata, and default values for attributes.
  • Type Hint IntegrationsLeveraging standard language type hints to provide automatic editor support, data validation, request parsing, and API documentation generation.
  • Asynchronous DependenciesAutomatic handling of both synchronous and asynchronous dependency functions, allowing them to be mixed within any request handler.
  • Result CachingCaching of dependency results per request by default, ensuring that shared sub-dependencies are executed only once, with an option to disable caching.