beat.web.experiments.api module¶
-
class
beat.web.experiments.api.ListExperimentsView(**kwargs)[source]¶ Bases:
beat.web.common.api.ListContributionViewReturn all accessible experiments
-
model¶
-
serializer_class¶ alias of
beat.web.experiments.serializers.ExperimentSerializer
-
-
class
beat.web.experiments.api.ListCreateExperimentsView(**kwargs)[source]¶ Bases:
beat.web.common.api.ListCreateContributionViewRead/Write end point that list the experiments available from a given author and allows the creation of new experiments
-
model¶
-
serializer_class¶ alias of
beat.web.experiments.serializers.ExperimentSerializer
-
writing_serializer_class¶ alias of
beat.web.experiments.serializers.ExperimentCreationSerializer
-
namespace= 'api_experiments'¶
-
-
class
beat.web.experiments.api.DummySerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.SerializerDummy serializer to handle spurious put This behavior seems to affects Safari browsers only (as noticed in 08/2020)
-
class
beat.web.experiments.api.RetrieveUpdateDestroyExperimentView(**kwargs)[source]¶ Bases:
beat.web.common.api.RetrieveUpdateDestroyContributionViewRead/Write/Delete endpoint for a given experiment
-
model¶
-
serializer_class¶ alias of
beat.web.experiments.serializers.ExperimentResultsSerializer
-
writing_serializer_class¶ alias of
DummySerializer
-
get_queryset()[source]¶ Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
-
-
class
beat.web.experiments.api.StartExperimentView(**kwargs)[source]¶ Bases:
rest_framework.views.APIViewStart to run an experiment
-
permission_classes= [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'beat.web.experiments.permissions.IsDatabaseAccessible'>]¶
-
-
class
beat.web.experiments.api.CancelExperimentView(**kwargs)[source]¶ Bases:
rest_framework.views.APIViewCancel a running experiment
-
permission_classes= [<class 'rest_framework.permissions.IsAuthenticated'>]¶
-
-
class
beat.web.experiments.api.ResetExperimentView(**kwargs)[source]¶ Bases:
rest_framework.views.APIViewReset an experiment
-
permission_classes= [<class 'rest_framework.permissions.IsAuthenticated'>]¶
-
-
class
beat.web.experiments.api.RetrieveExperimentResultsFromAttestationView(**kwargs)[source]¶ Bases:
beat.web.common.mixins.CommonContextMixin,rest_framework.generics.RetrieveAPIViewReturn the results of the experiment corresponding to given attestation
-
queryset= <QuerySet []>¶
-
serializer_class¶ alias of
beat.web.experiments.serializers.ExperimentResultsSerializer
-
permission_classes= [<class 'rest_framework.permissions.AllowAny'>]¶
-
lookup_field= 'attestation__number'¶
-
lookup_url_kwarg= 'attestation_number'¶
-
Bases:
beat.web.common.api.ShareViewThis view allows to share an experiment with other users and/or teams