<commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from rest_framework import viewsets, serializers
from integrations.credentials.models import IntegrationCredential
from .environment import EnvironmentSerializer
from .integration_type import IntegrationTypeSerializer


class IntegrationCredentialSerializer(serializers.HyperlinkedModelSerializer):

    environments = EnvironmentSerializer(many=True, read_only=True)
    integration_type = IntegrationTypeSerializer(many=False, read_only=True)

    class Meta:
        model = IntegrationCredential
        fields = ('user', 'password', 'integration_type', 'token', 'secret', 'endpoint', 'environments')


class IntegrationCredentialAPI(viewsets.ModelViewSet):
    """
    Integration Credential Api
    """
    serializer_class = IntegrationCredentialSerializer
    queryset = IntegrationCredential.objects.all()

<commit_msg>Add project to integration credential api fields<commit_after># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from rest_framework import viewsets, serializers
from integrations.credentials.models import IntegrationCredential
from .environment import EnvironmentSerializer
from .integration_type import IntegrationTypeSerializer


class IntegrationCredentialSerializer(serializers.HyperlinkedModelSerializer):

    environments = EnvironmentSerializer(many=True, read_only=True)
    integration_type = IntegrationTypeSerializer(many=False, read_only=True)

    class Meta:
        model = IntegrationCredential
        fields = ('user', 'password', 'integration_type', 'token', 'secret', 'endpoint', 'environments',"project",)


class IntegrationCredentialAPI(viewsets.ModelViewSet):
    """
    Integration Credential Api
    """
    serializer_class = IntegrationCredentialSerializer
    queryset = IntegrationCredential.objects.all()


{'fraction_non_alphanumeric': 0.08130939809926083, 'fraction_numerical': 0.0010559662090813093, 'mean_word_length': 5.992619926199262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5089932', 'n_tokens_mistral': 482, 'n_tokens_neox': 450, 'n_words': 114}