<commit_before>'''
@author: <NAME>
@author: 2015-09-29
@organization: MLSB API
@summary: The views for player stats
'''
import unittest
from sqlalchemy.sql.expression import or_
from flask.ext.restful import Resource, reqparse
from flask import Response
from json import dumps
from api.validators import date_validator
from api import DB
from api.model import Team, Player, roster, Bat, Game
from datetime import datetime, date, time
from pprint import PrettyPrinter
parser = reqparse.RequestParser()
parser.add_argument('year', type=int)
parser.add_argument('league_id', type=int)
parser.add_argument('player_id', type=int)
parser.add_argument('team_id', type=int)



class PlayerStatsAPI(Resource):
    def post(self):
        """
            GET request for Players Stats List
            Route: Route['player_stats']
            Parameters:
                year: the year  (int)
                team_id: the team id (int)
                league_id: the league id (int)
                player_id: the player id (int)
            Returns:
                status: 200 
                mimetype: application/json
                data: list of Players
        """
        year = None
        id = None<commit_msg>Imports<commit_after>'''
@author: <NAME>
@author: 2015-09-29
@organization: MLSB API
@summary: The views for player stats
'''
from sqlalchemy.sql.expression import or_
from flask.ext.restful import Resource, reqparse
from flask import Response
from json import dumps
from api import DB
from api.model import Team, Player, roster, Bat, Game
from datetime import datetime, date, time
parser = reqparse.RequestParser()
parser.add_argument('year', type=int)
parser.add_argument('league_id', type=int)
parser.add_argument('player_id', type=int)
parser.add_argument('team_id', type=int)

class PlayerStatsAPI(Resource):
    def post(self):
        """
            GET request for Players Stats List
            Route: Route['player_stats']
            Parameters:
                year: the year  (int)
                team_id: the team id (int)
                league_id: the league id (int)
                player_id: the player id (int)
            Returns:
                status: 200 
                mimetype: application/json
                data: list of Players
        """
        year = None
        id = None
{'fraction_non_alphanumeric': 0.08817204301075268, 'fraction_numerical': 0.00946236559139785, 'mean_word_length': 2.5457317073170733, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '96745', 'n_tokens_mistral': 676, 'n_tokens_neox': 624, 'n_words': 217}