# transfermarkt rev: v0.0.3
A python module for retrieving information from https://www.transfermarkt.com.
![Test](https://github.com/ocrosby/transfermarkt/actions/workflows/ci.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/ocrosby/transfermarkt/badge.svg?branch=main)](https://coveralls.io/github/ocrosby/transfermarkt?branch=main)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
You can use
[Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content.
## Installation
```bash
pip install -e .
```
## Usage
```python
from transfermarket.market import Market
```
### Get a list of all clubs
```python
from transfermarket.market import Market
clubs = Market.get_clubs()
```
## Parsing of commit logs
The semver level that should be bumped on a release is determined by the commit messages since the last release. In
order to be able to decide the correct version and generate the changelog, the content of those commit messages must
be parsed. By default, this package uses a parser for the Angular commit message style:
```text
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
## Using the command line interface
The transfermarkt appears to be a higharchy of data started with what they refer to as a competition.
Each competition can be thought of as a league or set of clubs.
List all the competitions from the transfermarkt.
```bash
$ market competition list
```
Output:
```text
Competition(id='GB1', name='Premier League', country='England', total_clubs=20, total_players=512, avg_age=27.0, foreigners_percent=66.6, total_value='€9.74bn', tier='First Tier')
Competition(id='ES1', name='LaLiga', country='Spain', total_clubs=20, total_players=501, avg_age=27.6, foreigners_percent=41.9, total_value='€4.86bn', tier='First Tier')
Competition(id='IT1', name='Serie A', country='Italy', total_clubs=20, total_players=582, avg_age=26.2, foreigners_percent=62.2, total_value='€4.59bn', tier='First Tier')
Competition(id='L1', name='Bundesliga', country='Germany', total_clubs=18, total_players=511, avg_age=25.8, foreigners_percent=52.3, total_value='€4.17bn', tier='First Tier')
...
```
Each competition is comprised of a set of teams. Each team has an identifier so for example the Premier League
has the identifier GB1. You can get a list of all the teams in the Premier League by using the following command.
```bash
$ market team list GB1
```
Output:
```text
<Team(id='11', title='Arsenal FC')>
<Team(id='405', title='Aston Villa')>
<Team(id='989', title='AFC Bournemouth')>
<Team(id='1148', title='Brentford FC')>
<Team(id='1237', title='Brighton & Hove Albion')>
<Team(id='631', title='Chelsea FC')>
<Team(id='873', title='Crystal Palace')>
<Team(id='29', title='Everton FC')>
<Team(id='931', title='Fulham FC')>
<Team(id='399', title='Leeds United')>
<Team(id='1003', title='Leicester City')>
<Team(id='31', title='Liverpool FC')>
<Team(id='281', title='Manchester City')>
<Team(id='985', title='Manchester United')>
<Team(id='762', title='Newcastle United')>
<Team(id='703', title='Nottingham Forest')>
<Team(id='180', title='Southampton FC')>
<Team(id='148', title='Tottenham Hotspur')>
<Team(id='379', title='West Ham United')>
<Team(id='543', title='Wolverhampton Wanderers')>
```
Now note that each team also has an identifier. You can get a list of all the players on a team
(for example Arsenal - with identifier 11) by using the following command.
```bash
$ market player list 11
```
Output:
```text
<Player(id='433177', name='Bukayo Saka', gender='Male', position='Midfielder')>
<Player(id='363205', name='Gabriel Jesus', gender='Male', position='Forward')>
<Player(id='316264', name='Martin Ødegaard', gender='Male', position='Midfielder')>
<Player(id='655488', name='Gabriel Martinelli', gender='Male', position='Forward')>
<Player(id='495666', name='William Saliba', gender='Male', position='Defender')>
<Player(id='335721', name='Ben White', gender='Male', position='Defender')>
<Player(id='435338', name='Gabriel Magalhães', gender='Male', position='Defender')>
<Player(id='230784', name='Thomas Partey', gender='Male', position='Midfielder')>
<Player(id='392765', name='Emile Rowe', gender='Male', position='Midfielder')>
<Player(id='203853', name='Oleksandr Zinchenko', gender='Male', position='Defender')>
<Player(id='300716', name='Kieran Tierney', gender='Male', position='Defender')>
<Player(id='427568', name='Aaron Ramsdale', gender='Male', position='Goalkeeper')>
<Player(id='537598', name='Fábio Vieira', gender='Male', position='Midfielder')>
<Player(id='111455', name='Granit Xhaka', gender='Male', position='Midfielder')>
<Player(id='331560', name='Takehiro Tomiyasu', gender='Male', position='Defender')>
<Player(id='340324', name='Eddie Nketiah', gender='Male', position='Forward')>
<Player(id='381967', name='Albert Lokonga', gender='Male', position='Midfielder')>
<Player(id='253341', name='Rob Holding', gender='Male', position='Defender')>
<Player(id='668268', name='Marquinhos None', gender='Male', position='Forward')>
<Player(id='160438', name='Mohamed Elneny', gender='Male', position='Midfielder')>
<Player(id='340325', name='Reiss Nelson', gender='Male', position='Forward')>
<Player(id='425306', name='Matt Turner', gender='Male', position='Goalkeeper')>
<Player(id='112988', name='Cédric Soares', gender='Male', position='Defender')>
```
## References
- [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
- [Transfermarkt](https://www.transfermarkt.com)
- [Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
- [Packaging Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
- [Semantic Versioning](https://semver.org/)
- [GitHub bot to enforce semantic PRs](https://github.com/apps/semantic-pull-requests)
Raw data
{
"_id": null,
"home_page": "",
"name": "transfermarket",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "transfermarkt,football,soccer,football club,football player,football manager,football league,football competition,football transfer,football statistics,football data",
"author": "",
"author_email": "Omar Crosby <omar.crosby@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/6c/6c/bd73a721a2cf8ce923307bf6286b5756dbb954618222b8a0120fe2ae1abf/transfermarket-0.0.3.tar.gz",
"platform": null,
"description": "# transfermarkt rev: v0.0.3\nA python module for retrieving information from https://www.transfermarkt.com.\n\n![Test](https://github.com/ocrosby/transfermarkt/actions/workflows/ci.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/ocrosby/transfermarkt/badge.svg?branch=main)](https://coveralls.io/github/ocrosby/transfermarkt?branch=main)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\nYou can use\n[Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)\nto write your content.\n\n## Installation\n```bash\npip install -e .\n```\n\n## Usage\n\n```python\nfrom transfermarket.market import Market\n```\n\n### Get a list of all clubs\n\n```python\nfrom transfermarket.market import Market\n\nclubs = Market.get_clubs()\n```\n\n## Parsing of commit logs\nThe semver level that should be bumped on a release is determined by the commit messages since the last release. In \norder to be able to decide the correct version and generate the changelog, the content of those commit messages must \nbe parsed. By default, this package uses a parser for the Angular commit message style:\n\n```text\n<type>(<scope>): <subject>\n<BLANK LINE>\n<body>\n<BLANK LINE>\n<footer>\n```\n\n## Using the command line interface\n\nThe transfermarkt appears to be a higharchy of data started with what they refer to as a competition.\nEach competition can be thought of as a league or set of clubs.\n\nList all the competitions from the transfermarkt.\n\n```bash\n$ market competition list\n```\n\nOutput: \n\n```text\nCompetition(id='GB1', name='Premier League', country='England', total_clubs=20, total_players=512, avg_age=27.0, foreigners_percent=66.6, total_value='\u20ac9.74bn', tier='First Tier')\nCompetition(id='ES1', name='LaLiga', country='Spain', total_clubs=20, total_players=501, avg_age=27.6, foreigners_percent=41.9, total_value='\u20ac4.86bn', tier='First Tier')\nCompetition(id='IT1', name='Serie A', country='Italy', total_clubs=20, total_players=582, avg_age=26.2, foreigners_percent=62.2, total_value='\u20ac4.59bn', tier='First Tier')\nCompetition(id='L1', name='Bundesliga', country='Germany', total_clubs=18, total_players=511, avg_age=25.8, foreigners_percent=52.3, total_value='\u20ac4.17bn', tier='First Tier')\n...\n```\n\nEach competition is comprised of a set of teams. Each team has an identifier so for example the Premier League\nhas the identifier GB1. You can get a list of all the teams in the Premier League by using the following command.\n\n```bash\n$ market team list GB1\n```\n\nOutput:\n\n```text\n<Team(id='11', title='Arsenal FC')>\n<Team(id='405', title='Aston Villa')>\n<Team(id='989', title='AFC Bournemouth')>\n<Team(id='1148', title='Brentford FC')>\n<Team(id='1237', title='Brighton & Hove Albion')>\n<Team(id='631', title='Chelsea FC')>\n<Team(id='873', title='Crystal Palace')>\n<Team(id='29', title='Everton FC')>\n<Team(id='931', title='Fulham FC')>\n<Team(id='399', title='Leeds United')>\n<Team(id='1003', title='Leicester City')>\n<Team(id='31', title='Liverpool FC')>\n<Team(id='281', title='Manchester City')>\n<Team(id='985', title='Manchester United')>\n<Team(id='762', title='Newcastle United')>\n<Team(id='703', title='Nottingham Forest')>\n<Team(id='180', title='Southampton FC')>\n<Team(id='148', title='Tottenham Hotspur')>\n<Team(id='379', title='West Ham United')>\n<Team(id='543', title='Wolverhampton Wanderers')>\n```\n\nNow note that each team also has an identifier. You can get a list of all the players on a team \n(for example Arsenal - with identifier 11) by using the following command.\n\n```bash\n$ market player list 11\n```\n\nOutput:\n\n```text\n<Player(id='433177', name='Bukayo Saka', gender='Male', position='Midfielder')>\n<Player(id='363205', name='Gabriel Jesus', gender='Male', position='Forward')>\n<Player(id='316264', name='Martin \u00d8degaard', gender='Male', position='Midfielder')>\n<Player(id='655488', name='Gabriel Martinelli', gender='Male', position='Forward')>\n<Player(id='495666', name='William Saliba', gender='Male', position='Defender')>\n<Player(id='335721', name='Ben White', gender='Male', position='Defender')>\n<Player(id='435338', name='Gabriel Magalh\u00e3es', gender='Male', position='Defender')>\n<Player(id='230784', name='Thomas Partey', gender='Male', position='Midfielder')>\n<Player(id='392765', name='Emile Rowe', gender='Male', position='Midfielder')>\n<Player(id='203853', name='Oleksandr Zinchenko', gender='Male', position='Defender')>\n<Player(id='300716', name='Kieran Tierney', gender='Male', position='Defender')>\n<Player(id='427568', name='Aaron Ramsdale', gender='Male', position='Goalkeeper')>\n<Player(id='537598', name='F\u00e1bio Vieira', gender='Male', position='Midfielder')>\n<Player(id='111455', name='Granit Xhaka', gender='Male', position='Midfielder')>\n<Player(id='331560', name='Takehiro Tomiyasu', gender='Male', position='Defender')>\n<Player(id='340324', name='Eddie Nketiah', gender='Male', position='Forward')>\n<Player(id='381967', name='Albert Lokonga', gender='Male', position='Midfielder')>\n<Player(id='253341', name='Rob Holding', gender='Male', position='Defender')>\n<Player(id='668268', name='Marquinhos None', gender='Male', position='Forward')>\n<Player(id='160438', name='Mohamed Elneny', gender='Male', position='Midfielder')>\n<Player(id='340325', name='Reiss Nelson', gender='Male', position='Forward')>\n<Player(id='425306', name='Matt Turner', gender='Male', position='Goalkeeper')>\n<Player(id='112988', name='C\u00e9dric Soares', gender='Male', position='Defender')>\n```\n\n## References\n- [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)\n- [Transfermarkt](https://www.transfermarkt.com)\n- [Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)\n- [Packaging Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)\n- [Semantic Versioning](https://semver.org/)\n- [GitHub bot to enforce semantic PRs](https://github.com/apps/semantic-pull-requests)\n",
"bugtrack_url": null,
"license": "",
"summary": "A python module for retrieving information from https://www.transfermarkt.com.",
"version": "0.0.3",
"split_keywords": [
"transfermarkt",
"football",
"soccer",
"football club",
"football player",
"football manager",
"football league",
"football competition",
"football transfer",
"football statistics",
"football data"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cb89b814b30e7dabc77b1d2536807262a68aeb8ab17d7b376732d25db4ff605f",
"md5": "d617b955da9dfd7cae4a3d759e151ab6",
"sha256": "3594d010a2b5cc63f0d6f8d81ce0854cb8eae34b038189b9f0e7134b22c7c3c7"
},
"downloads": -1,
"filename": "transfermarket-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d617b955da9dfd7cae4a3d759e151ab6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 32017,
"upload_time": "2023-01-12T08:17:22",
"upload_time_iso_8601": "2023-01-12T08:17:22.869898Z",
"url": "https://files.pythonhosted.org/packages/cb/89/b814b30e7dabc77b1d2536807262a68aeb8ab17d7b376732d25db4ff605f/transfermarket-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6c6cbd73a721a2cf8ce923307bf6286b5756dbb954618222b8a0120fe2ae1abf",
"md5": "c3df625afe5c56141b181719426b6858",
"sha256": "8e116e3e6ce844300e0959302e37a650fed088d068cdff0d6d72bc0b3a4f48ef"
},
"downloads": -1,
"filename": "transfermarket-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "c3df625afe5c56141b181719426b6858",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 27902,
"upload_time": "2023-01-12T08:17:24",
"upload_time_iso_8601": "2023-01-12T08:17:24.345750Z",
"url": "https://files.pythonhosted.org/packages/6c/6c/bd73a721a2cf8ce923307bf6286b5756dbb954618222b8a0120fe2ae1abf/transfermarket-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-12 08:17:24",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "transfermarket"
}