Skip to main content

transfermarkt rev: v0.0.3

A python module for retrieving information from https://www.transfermarkt.com.

Test Coverage Status License: GPL v3

You can use Github-flavored Markdown to write your content.

Installation

pip install -e .

Usage

from transfermarket.market import Market

Get a list of all clubs

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:

<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.

$ market competition list

Output:

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.

$ market team list GB1

Output:

<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.

$ market player list 11

Output:

<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

Metadata

Release files for transfermarket 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transfermarket 0.0.3
File Size Uploaded Provenance Actions
transfermarket-0.0.3.tar.gz 27.9 kB Without provenance Details for transfermarket-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for transfermarket 0.0.3
File Interpreter ABI Platform Actions
transfermarket-0.0.3-py3-none-any.whl Python 3 none any Details for transfermarket-0.0.3-py3-none-any.whl

Total release size: 59.9 kB

Release files / transfermarket-0.0.3.tar.gz

Download URL transfermarket-0.0.3.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8e116e3e6ce844300e0959302e37a650fed088d068cdff0d6d72bc0b3a4f48ef
BLAKE2b-256 checksum
How to use checksums
6c6cbd73a721a2cf8ce923307bf6286b5756dbb954618222b8a0120fe2ae1abf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

Release files / transfermarket-0.0.3-py3-none-any.whl

Download URL transfermarket-0.0.3-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3594d010a2b5cc63f0d6f8d81ce0854cb8eae34b038189b9f0e7134b22c7c3c7
BLAKE2b-256 checksum
How to use checksums
cb89b814b30e7dabc77b1d2536807262a68aeb8ab17d7b376732d25db4ff605f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

Security for transfermarket 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page