beat.web.algorithms.api module

class beat.web.algorithms.api.CheckAlgorithmNameView(**kwargs)[source]

Bases: beat.web.common.api.CheckContributionNameView

This view sanitizes an algorithm name and checks whether it is already used.

model

alias of beat.web.algorithms.models.Algorithm

class beat.web.algorithms.api.ShareAlgorithmView(**kwargs)[source]

Bases: beat.web.code.api.ShareCodeView

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

model

alias of beat.web.algorithms.models.Algorithm

class beat.web.algorithms.api.ListAlgorithmsView(**kwargs)[source]

Bases: beat.web.common.api.ListContributionView

List all available algorithms

model

alias of beat.web.algorithms.models.Algorithm

serializer_class

alias of beat.web.algorithms.serializers.AlgorithmSerializer

class beat.web.algorithms.api.ListCreateAlgorithmsView(**kwargs)[source]

Bases: beat.web.common.api.ListCreateContributionView

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

model

alias of beat.web.algorithms.models.Algorithm

serializer_class

alias of beat.web.algorithms.serializers.AlgorithmSerializer

writing_serializer_class

alias of beat.web.algorithms.serializers.AlgorithmCreationSerializer

namespace = 'api_algorithms'
class beat.web.algorithms.api.RetrieveUpdateDestroyAlgorithmsView(**kwargs)[source]

Bases: beat.web.code.api.RetrieveUpdateDestroyCodeView

Read/Write/Delete endpoint for a given algorithm

model

alias of beat.web.algorithms.models.Algorithm

serializer_class

alias of beat.web.algorithms.serializers.FullAlgorithmSerializer

writing_serializer_class

alias of beat.web.algorithms.serializers.AlgorithmModSerializer

class beat.web.algorithms.api.DiffAlgorithmView(**kwargs)[source]

Bases: beat.web.code.api.DiffView

This view shows the differences between two algorithms

model

alias of beat.web.algorithms.models.Algorithm

serializer_class

alias of beat.web.code.serializers.CodeDiffSerializer

class beat.web.algorithms.api.BinaryRenderer[source]

Bases: rest_framework.renderers.BaseRenderer

media_type = 'application/octet-stream'
charset = None
render_style = 'binary'
render(data, media_type=None, renderer_context=None)[source]
class beat.web.algorithms.api.FileHandlingView(**kwargs)[source]

Bases: rest_framework.views.APIView

This view handles the upload of binary files for non interpreted languages like c++

model

alias of beat.web.algorithms.models.Algorithm

parser_classes = [<class 'rest_framework.parsers.MultiPartParser'>, <class 'rest_framework.parsers.FormParser'>]
renderer_classes = [<class 'beat.web.algorithms.api.BinaryRenderer'>]
permission_classes = [<class 'beat.web.common.permissions.IsAuthorOrReadOnly'>]
get_object()[source]
get(request, author_name, object_name, version)[source]
post(request, author_name, object_name, version)[source]