beat.web.experiments.api module

class beat.web.experiments.api.ListExperimentsView(**kwargs)[source]

Bases: beat.web.common.api.ListContributionView

Return all accessible experiments

model

alias of beat.web.experiments.models.experiment.Experiment

serializer_class

alias of beat.web.experiments.serializers.ExperimentSerializer

get(request, *args, **kwargs)[source]
class beat.web.experiments.api.ListCreateExperimentsView(**kwargs)[source]

Bases: beat.web.common.api.ListCreateContributionView

Read/Write end point that list the experiments available from a given author and allows the creation of new experiments

model

alias of beat.web.experiments.models.experiment.Experiment

serializer_class

alias of beat.web.experiments.serializers.ExperimentSerializer

writing_serializer_class

alias of beat.web.experiments.serializers.ExperimentSerializer

get(request, author_name)[source]
post(request, author_name)[source]
class beat.web.experiments.api.RetrieveUpdateDestroyExperimentView(**kwargs)[source]

Bases: beat.web.common.api.RetrieveUpdateDestroyContributionView

Read/Write/Delete endpoint for a given experiment

model

alias of beat.web.experiments.models.experiment.Experiment

serializer_class

alias of beat.web.experiments.serializers.ExperimentResultsSerializer

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)

get(request, author_name, toolchain_author_name, toolchain_name, version, name)[source]
put(request, author_name, toolchain_author_name, toolchain_name, version, name)[source]
delete(request, author_name, toolchain_author_name, toolchain_name, version, name)[source]
class beat.web.experiments.api.StartExperimentView(**kwargs)[source]

Bases: rest_framework.views.APIView

Start to run an experiment

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'beat.web.experiments.permissions.IsDatabaseAccessible'>]
post(request, author_name, toolchain_author_name, toolchain_name, version, name)[source]
class beat.web.experiments.api.CancelExperimentView(**kwargs)[source]

Bases: rest_framework.views.APIView

Cancel a running experiment

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
post(request, author_name, toolchain_author_name, toolchain_name, version, name)[source]
class beat.web.experiments.api.RetrieveExperimentResultsFromAttestationView(**kwargs)[source]

Bases: beat.web.common.mixins.CommonContextMixin, rest_framework.generics.RetrieveAPIView

Return the results of the experiment corresponding to given attestation

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'
get(request, *args, **kwargs)[source]
class beat.web.experiments.api.ShareExperimentView(**kwargs)[source]

Bases: beat.web.common.api.ShareView

This view allows to share an experiment with other users and/or teams

model

alias of beat.web.experiments.models.experiment.Experiment

serializer_class

alias of beat.web.common.serializers.SharingSerializer

post(request, author_name, toolchain_author_name, toolchain_name, version, name)[source]