{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# Description \n\nSimple package which allow to figure out more about maccabi tel-aviv football team while manipulating statistics.\nAtm all the data parsed from maccabi-tlv site.\n\n\n# TL;DR\nYou can get the serialized maccabi games from [mega](https://mega.nz/#F!iX4y1CrJ!sCRXAGcImG8nK4jk8hUMEA)\n(separate by maccabistats version).\nafter that you can just load the games:\n\n```\nfrom maccabistats import get_maccabi_stats\ngames = get_maccabi_stats(your_maccabi.games_file_path) # Use the local path you've downloaded the file from mega.\n```\n\nYou might want to use:\n```\ngames = games.get_first_league_games()\n```\nbecause there are not only league games.\n\nnow, enjoy :)\n\n# Manipulating maccabi statistics\n\n ### Loading games\n```\n>>> from maccabistats import get_maccabi_stats\n>>> games = get_maccabi_stats() # From default folder path (Home folder - %userprofile%)\n>>> games = get_maccabi_stats(r\"C:\\maccabi\\maccabi.games\") # From local custom file path\n```\n\nEach list of games is from the same type - MaccabiGamesStats. \nAll the below manipulating can be done on every sub-category of games, like: \nold_games, old_home_games and old_home_wins. \n\nGetting only old home wins:\n```\n>>> old_games = games.played_before(\"1.1.2000\")\n>>> old_home_games = old_games.home_games\n>>> old_home_wins = old_home_games.maccabi_wins\n>>>\n>>> or just:\n>>> games.played_before(\"1.1.2000\").home_games.maccabi_wins\n```\n\n\n ### Basic usage\n```\n>>> games.averages.goals_for_maccabi # Avg goals for maccabi, for all the games in the list.\n>>> games.results.wins_percentage # the win % from the games in the list.\n>>>\n>>> game.get_games_* = use to filter games.\n>>> Lets combine all, wins % against hapoel haifa in league games:\n>>> game.get_first_league_games().get_games_against_team(\"\u05d4\u05e4\u05d5\u05e2\u05dc \u05d7\u05d9\u05e4\u05d4\").results.wins_percentage\n```\n\n\n ### Players\nAll of the names are very intuitive, some examples:\n```\n>>> games.players.best_scorers\n>>> games.players.get_most_winners_by_percentage()\n>>> games.players.most_played\n>>>\n>>> Getting top 5 scored players in league derby:\n>>> games.get_first_league_games().get_games_against_team(\"\u05d4\u05e4\u05d5\u05e2\u05dc \u05ea\u05dc \u05d0\u05d1\u05d9\u05d1\").players.best_scorers[0:5]\n```\n\n ### Coaches and Referees\nYou can get the win\\lose percentages of each one just by:\n```\n>>> games.coaches.most_winner_coach_by_percentage\n>>> games.referees.best_referee_by_percentage[0:2] # Top 2 referees (in all maccabi games history).\n>>>\n>>> Getting best drby coaches:\n>>> games.get_first_league_games().get_games_against_team(\"\u05d4\u05e4\u05d5\u05e2\u05dc \u05ea\u05dc \u05d0\u05d1\u05d9\u05d1\").coaches.most_winner_coach_by_percentage\n```\n\n\n ### Comebacks\nYou can get the craziest maccabi comebacks:\n```\n>>> games.comebacks.won_from_exactly_two_goal_diff()\n>>> games.comebacks.won_from_exactly_x_goal_diff(goals=3) # Wow!\n```\n\n ### Streaks\nYou can get the longest (or by streak length) streaks of any subset of maccabi games:\n```\n>>> games.streaks.get_longest_* = use to get the longest streak by condition, like:\n>>> games.streaks.get_longest_clean_sheet_games() # Games in a row without goal against maccabi.\n>>>\n>>> games.streak.get_similar_* = use to get similar with len of at least X and by condition.\n>>> # All the unbeaten rows of at least len of 20:\n>>> games.streaks.get_similar_unbeaten_streak_by_length(minimum_streak_length=20) \n```\n\n\n ### Seasons\nYou can get the games grouped by seasons sorted by any condition, such as:\n```\n>>> seasons = games.seasons.get_seasons_stats() # At default the season will be sorted by year.\n>>> seasons.sort_by_wins_percentage() # Sort the season by winning percentage, you should print the season object).\n>>> seasons # Print it\n```\n\n\n# Crawling maccabi games\n\nWhen crawling maccabi games each page will be saved on your disk to allow optimization for the next time.\nTo serialize maccabi games (it might take some time), use:\n```\n>>> from maccabistats import serialize_maccabi_games\n # The object will be serialized to home folder (%userprofile%) with its version and the current date.\n>>> serialize_maccabi_games(maccabi_games_stats_object)\n```\n\nManual-fixes will be run after crawling is finished and before serializing to disk.\n\nYou can 'use_multi-process-crawl' from settings to allow multi-processing, \nBUT atm logging does not support multi-processing, so don't use that if you need to debug.\n\n\n# Manual fixes\n\nThere are some information that need to be fix manually. \nWhen serializing maccabi games that done automatically.\nIf you Add anything to run_general_fixes, you can re-run it by:\n```\n>>> from maccabistats import get_maccabi_stats, run_general_fixes, serialize_maccabi_games\n>>> \n>>> games = get_maccabi_stats()\n>>> new_games = run_general_fixes(games)\n>>> serialize_maccabi_games(new_games)\n```\n\n# Logging\n\nAll of the log files will be saved at 'maccabistats\\logs' folder under the user home folder (%userprofile%)\nThere are several log files, each one has this pattern - maccabistats-{suffix}.log (at the mentioned folder): \n\n* all - save all log levels\n* info - save just the info log level\n* warning - save just the warn log level\n* exception - save just exceptions (log.exception)\n* stdout - not a file but log handler that print to stdout (info level +) \n\n\n# Known issues\n\n* Players which opened as (captain or had different shirt number between games) will be counted as different players.\n* Ignoring events after 120 min (in game_events_parser -> fully_game_time_without_penalties)\n* Logging with multi-process crawling mode isn't working.\n\n\n# Optimization \n* You can use 'use-disk-to-crawl-when-available' to crawl from disk when available, each page that will be crawled from internet wil be save on disk. \n* For the first time, you can get some of the html files from: https://mega.nz/#F!szxTUDRQ ( key will be available at forum.12p.co.il)\n* You can reduce logging when crawling by use :\n```\n>>> from maccabistats import faster_logging\n>>> faster_logging() will disable the stdout & debug handlers.\n```\n\n\n# Errors Finder\n\nManual check for errors might be helpful, this is can be done by:\n```\n>>> from maccabistats import get_maccabi_stats\n>>> from maccabistats.error_finder.error_finder import ErrorsFinder\n>>> games = get_maccabi_stats()\n>>> e = ErrorsFinder(games)\n>>> e.get_all_errors_numbers() # run all the manual errors exists\n```\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "maccabistats", "package_url": "https://pypi.org/project/maccabistats/", "platform": "", "project_url": "https://pypi.org/project/maccabistats/", "project_urls": null, "release_url": "https://pypi.org/project/maccabistats/2.0.0/", "requires_dist": [ "setuptools (==28.8.0)", "requests (==2.18.4)", "beautifulsoup4 (==4.6.0)", "lxml (==4.1.1)", "python-dateutil (==2.7.2)", "matplotlib (==2.2.2)", "pathlib (==1.0.1)" ], "requires_python": ">=3", "summary": "Maccabi tel-aviv football team statistics manipulation.", "version": "2.0.0" }, "last_serial": 4028098, "releases": { "1.2.0": [ { "comment_text": "", "digests": { "md5": "f3bca8312536429cb7e21987ed868ea7", "sha256": "04aa4934d75b33ae6ff3362d1da382b3c131a068191b013b1e34830d6a1dfb7d" }, "downloads": -1, "filename": "maccabistats-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f3bca8312536429cb7e21987ed868ea7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 2791483, "upload_time": "2018-02-03T13:59:01", "url": "https://files.pythonhosted.org/packages/25/e9/d6955296d635958eb8304243dc41456fb5f3ba72a6637d945358d466b00b/maccabistats-1.2.0-py3-none-any.whl" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "d4b4bc550bbebb1cd5d0f7f87da8c657", "sha256": "22d27923f840464cd7fbf27c58e711c66104195fefff2889759e89beafa5604a" }, "downloads": -1, "filename": "maccabistats-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d4b4bc550bbebb1cd5d0f7f87da8c657", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 2794021, "upload_time": "2018-03-10T00:21:03", "url": "https://files.pythonhosted.org/packages/35/cf/dfd76fd75acb06f49e47f8e124ad40687fbfb7f63ba956d77735b282a1a3/maccabistats-1.3.0-py3-none-any.whl" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "b61a55adfdeb2aacb07ce774dc518179", "sha256": "b8fa426028b5e3d667f3e65bd8dfce87ca1f94f7b70eaad0fb1eecbf2318fd3e" }, "downloads": -1, "filename": "maccabistats-1.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b61a55adfdeb2aacb07ce774dc518179", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 2813137, "upload_time": "2018-03-15T00:03:48", "url": "https://files.pythonhosted.org/packages/89/42/aad0ebdf05080d90a4d80268dba9c9cef8db6fdb41187741120bf27b3117/maccabistats-1.4.0-py3-none-any.whl" } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "bd0c75aa86143fa0994e61b0180facf6", "sha256": "4fea27e1aff1564edf8cf7e57063297a8e4c573020deb57d267b767c1ce6ab3b" }, "downloads": -1, "filename": "maccabistats-1.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bd0c75aa86143fa0994e61b0180facf6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 32112, "upload_time": "2018-03-28T21:52:31", "url": "https://files.pythonhosted.org/packages/0f/13/cb9df2c3b6491957983af0d667a57ba4d8eb4a538c8289daddf6a35a0583/maccabistats-1.5.1-py3-none-any.whl" } ], "1.6.0": [ { "comment_text": "", "digests": { "md5": "f2b47955c218efa16c4d7621f34acc86", "sha256": "9f54eaa5da5534fd0e9ac3b2b61cd69c7399418478bb9a367971aae2b25dc3a2" }, "downloads": -1, "filename": "maccabistats-1.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f2b47955c218efa16c4d7621f34acc86", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 34123, "upload_time": "2018-03-29T00:39:08", "url": "https://files.pythonhosted.org/packages/6d/34/e0631ce104b2ad71bac6f908aad592e9b9e448a7e23acf85310b298c43c8/maccabistats-1.6.0-py3-none-any.whl" } ], "1.6.2": [ { "comment_text": "", "digests": { "md5": "fc772cc7fedf66b7045551ae17dfa216", "sha256": "56eb9585af4a4f0f7d5ddb2ce4d2d09386606ce33df5e8a09d5781b3d347efa7" }, "downloads": -1, "filename": "maccabistats-1.6.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fc772cc7fedf66b7045551ae17dfa216", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 34877, "upload_time": "2018-03-29T10:23:56", "url": "https://files.pythonhosted.org/packages/a9/9d/2d01ea665ca0c54e0345457b00433a3ffb75d6823fe030d3ffe6817d4ddd/maccabistats-1.6.2-py3-none-any.whl" } ], "1.6.4": [ { "comment_text": "", "digests": { "md5": "09ce101939214de8e3c5dd36fb6a47f8", "sha256": "5a14fe67d0cb18b6418e996cc154dd5f9a153c2214185f6e635ffad1ad1cd86f" }, "downloads": -1, "filename": "maccabistats-1.6.4-py3-none-any.whl", "has_sig": false, "md5_digest": "09ce101939214de8e3c5dd36fb6a47f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 35052, "upload_time": "2018-03-30T08:06:01", "url": "https://files.pythonhosted.org/packages/4c/55/d9b5a49d9a89f4393dfbd40308e5446616fb89ed384821960e59517391f6/maccabistats-1.6.4-py3-none-any.whl" } ], "1.7.0": [ { "comment_text": "", "digests": { "md5": "59a5f51fb30a7f253077c4abcca45502", "sha256": "42597ced39c2a8f7f9c0b02049d8e1a9762b0a5ae3d961a9a9ec5befb2f4ab17" }, "downloads": -1, "filename": "maccabistats-1.7.0-py3-none-any.whl", "has_sig": false, "md5_digest": "59a5f51fb30a7f253077c4abcca45502", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 35885, "upload_time": "2018-04-02T11:12:45", "url": "https://files.pythonhosted.org/packages/14/1a/1f3023d641643af56980655973923c0ceae51847b34821a430451fa3fe2b/maccabistats-1.7.0-py3-none-any.whl" } ], "1.8.0": [ { "comment_text": "", "digests": { "md5": "4efd885a7ac97a5d23242dccf32aee37", "sha256": "96684bcd129330e54c9732deb7c48d7b752022442cab9783014e5f7148e01aca" }, "downloads": -1, "filename": "maccabistats-1.8.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4efd885a7ac97a5d23242dccf32aee37", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 41256, "upload_time": "2018-04-06T14:32:47", "url": "https://files.pythonhosted.org/packages/6c/68/bf683bc81e028a40841f6ce207615664eb498d073ccd86886e4261d14ced/maccabistats-1.8.0-py3-none-any.whl" } ], "1.9.1": [ { "comment_text": "", "digests": { "md5": "64b0d07886a28a34098062a8d7e8211d", "sha256": "1175ac53a1c3254c0f4eb0d2eb962941bfd428d623a036900921d53c2b07b03c" }, "downloads": -1, "filename": "maccabistats-1.9.1-py3-none-any.whl", "has_sig": false, "md5_digest": "64b0d07886a28a34098062a8d7e8211d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 43755, "upload_time": "2018-04-18T23:40:16", "url": "https://files.pythonhosted.org/packages/66/41/93cc0208f542d6b1ef63957ed0a8bedcc8125e7862e701c2d48e14601919/maccabistats-1.9.1-py3-none-any.whl" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "976494b01c02ab79447d43f4e53e85c1", "sha256": "079020c76a0321149f538cf65f1e42b90d0e2879f514af84f4f8d99c1a8832a3" }, "downloads": -1, "filename": "maccabistats-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "976494b01c02ab79447d43f4e53e85c1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 57111, "upload_time": "2018-07-03T22:01:14", "url": "https://files.pythonhosted.org/packages/12/d0/7f2dec85eb1bbf6bb4806e37713c952f8d57a760dacd43192ce8bbab9641/maccabistats-2.0.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "976494b01c02ab79447d43f4e53e85c1", "sha256": "079020c76a0321149f538cf65f1e42b90d0e2879f514af84f4f8d99c1a8832a3" }, "downloads": -1, "filename": "maccabistats-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "976494b01c02ab79447d43f4e53e85c1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 57111, "upload_time": "2018-07-03T22:01:14", "url": "https://files.pythonhosted.org/packages/12/d0/7f2dec85eb1bbf6bb4806e37713c952f8d57a760dacd43192ce8bbab9641/maccabistats-2.0.0-py3-none-any.whl" } ] }