Python

Python Frameworks and Libraries supported by NightVision API Discovery

The following section covers the components of different Python frameworks and their library components that NightVision’s API Discovery capability can detect and use to generate OpenAPI documentation. If a component that you use is not supported, please get in touch with our support team at [email protected], and we can add this as a new feature.

Django

Library ComponentDescription
django.http.QueryDictIn Django, GET or POST parameters can be accessed using the `QueryDict` class, which is a dictionary-like object containing the query parameters.
django.HttpRequestRepresents an HTTP request, including methods and data sent by the client.
django.urls.resolvers.RoutePatternRepresents a route pattern used for URL routing.
django.conf.settingsRepresents Django’s settings configuration.
django.conf.urls.url()Function to define a URL pattern in Django.
django.conf.urls.include()Function to include other URL patterns from a different module or app.
django.urls.path()Function to define URL patterns with routing based on paths.
django.urls.include()Function to include other URL configurations in your Django project.
django.urls.re_path()Function to define complex URL patterns using regular expressions.
django.views.generic.ViewA base class for all class-based views in Django.

DRF (Django REST framework)

Library ComponentDescription
rest_framework.generics.GenericAPIViewA base class for all generic views in DRF, providing common functionality.
rest_framework.generics.CreateAPIViewProvides a view that handles HTTP POST requests to create a new object.
rest_framework.generics.DestroyAPIViewProvides a view that handles HTTP DELETE requests to delete an object.
rest_framework.generics.ListAPIViewProvides a view that handles HTTP GET requests to list objects.
rest_framework.generics.ListCreateAPIViewProvides a view that handles both HTTP GET (list) and POST (create) requests.
rest_framework.generics.RetrieveAPIViewProvides a view that handles HTTP GET requests to retrieve a single object.
rest_framework.generics.RetrieveDestroyAPIViewProvides a view that handles HTTP GET (retrieve) and DELETE (destroy) requests.
rest_framework.generics.RetrieveUpdateAPIViewProvides a view that handles HTTP GET (retrieve), PUT (update), and PATCH (partial update) requests.
rest_framework.generics.RetrieveUpdateDestroyAPIViewProvides a view that handles HTTP GET, PUT, PATCH, and DELETE requests for a single object.
rest_framework.generics.UpdateAPIViewProvides a view that handles HTTP PUT and PATCH requests to update an object.
rest_framework.mixins.MixinA base class for mixins in DRF.
rest_framework.mixins.CreateModelMixinProvides create behavior for DRF views.
rest_framework.mixins.DestroyModelMixinProvides destroy behavior for DRF views.
rest_framework.mixins.ListModelMixinProvides list behavior for DRF views.
rest_framework.mixins.RetrieveModelMixinProvides retrieve behavior for DRF views.
rest_framework.mixins.UpdateModelMixinProvides update and partial_update behavior for DRF views.
rest_framework.serializers.FieldThe base class for all DRF serializer fields.
rest_framework.serializers.SerializerThe base class for defining custom serializers in DRF.
rest_framework.views.APIViewThe base class for all DRF views, handling the HTTP protocol and dispatching to appropriate methods.
rest_framework.viewsets.GenericViewSetA base class for all DRF viewsets, providing default implementations for actions.
rest_framework.viewsets.ModelViewSetA viewset that provides default CRUD (Create, Retrieve, Update, Delete) operations.
rest_framework.viewsets.ReadOnlyModelViewSetA viewset that provides default read-only operations (Retrieve, List).

Library ComponentDescription
rest_framework_extensions.routers.ExtendedDefaultRouterAn extended version of DRF’s DefaultRouter, providing additional functionality.
rest_framework_extensions.routers.ExtendedSimpleRouterAn extended version of DRF’s SimpleRouter, providing additional functionality.

Flask

Library ComponentDescription
flask.request request.args request.cookies request.files request.form request.headersA global object representing the incoming request data.
flask.FlaskThe central object of a Flask application, representing the web application.
flask.BlueprintClass that provides a way to organize Flask applications by grouping related routes and views.
flask.views.MethodViewA class-based view that dispatches request methods (GET, POST, etc.) to appropriate handlers.
flask.views.RouteCallableRepresents a callable route in Flask views
flask.views.ViewThe base class for creating class-based views in Flask.

Flask-RESTful

Library ComponentDescription
flask_restful.ApiThe central class for creating a Flask-RESTful API.
flask_restful.ResourceRepresents a REST resource in Flask-RESTful, with methods corresponding to HTTP verbs (GET, POST, etc.)

FastAPI

Library ComponentDescription
fastapi.FastAPIThe central object of a FastAPI app, representing the web application.
fastapi.APIRouterThe entity used to organize routes into reusable modular groups
pydantic.BaseModelA base class for models used as inputs/outputs of FastAPI app's routes
fastapi.ResponseA base response class used for manually contructing the response in a route handler
fastapi.HTTPExceptionAn exception class used to signal errors in route handlers
fastapi.Header, fastapi.CookieTyping annotations used to indicate expected input data for route handlers
fastapi.statusA module that stores all the HTTP codes used as status codes in route handlers