# FUT Card Creator
**FUT Card Creator** is a Python package that allows you to create custom FIFA Ultimate Team (FUT) cards with ease. You can generate cards for your favorite players, complete with their stats, position, nationality, club, and more.
## Features
- Generate custom FUT cards with player photos, club logos, national flags, and stats.
- Automatically fetch and cache club logos and national flags using online APIs.
- Easily customize and update player stats.
- Automatically calculate the overall rating for players based on their position.
- Automatically update player stats when their overall rating changes.
- Export the generated FUT card as an image file.
## Installation
To install FUT Card Creator, simply run:
```bash
pip install fut_card_creator
```
## Requirements
- Python 3.6 or higher
- `Pillow` for image processing
- `requests` for API calls
- `fuzzywuzzy` and `python-Levenshtein` for fuzzy string matching
These dependencies will be installed automatically when you install the package.
## Usage
Here’s a basic example of how to use the FUT Card Creator:
```python
from fut_card_creator.fut_card_creator import Player, Card
# Create a Player instance
player = Player(
name="Lionel Messi",
photo_path="path/to/messi_photo.png",
club="Paris Saint-Germain",
nation="Argentina",
overall=93,
position="RW",
stats={"PAC": 85, "SHO": 92, "PAS": 91, "DRI": 95, "DEF": 35, "PHY": 65}
)
# Create a FUT card
fut_card = Card(player, card_type="gold")
# Generate the card image
fut_card.create_image()
# Export the card image
fut_card.export_image("messi_fut_card.png")
```
### Automatic Overall Calculation
The FUT Card Creator automatically calculates a player’s overall rating based on their position and individual stats. Each position has a unique formula that emphasizes different stats, ensuring that the overall rating reflects the player’s role on the field.
### Automatic Stat Updater
When you update a player's overall rating, the package automatically adjusts the player's stats to match the new overall. This ensures that the stats are consistent with the player's new rating, maintaining a realistic balance.
### Customization
You can easily customize various aspects of the FUT card, such as:
- **Player stats**: Modify individual stats using the `Player` class.
- **Card type**: Use different card templates by specifying the `card_type` in the `Card` class. (rare_gold, gold, silver_rare, totw, toty, tots, future_star, icon)
- **Image paths**: Provide paths to player photos, club logos, and nation flags.
### Directory Structure
Make sure your project structure looks like this:
```
fut_card_creator/
│
├── fonts/
│ └── DINPro CondBold.otf # Required font file
│
├── images/
│ ├── card_templates/ # Store card template images here
│ ├── club_logo_cache/ # Automatically caches club logos
│ └── nation_cache/ # Automatically caches national flags
│
├── __init__.py
├── fut_card_creator.py
└── utils.py
│
setup.py
```
### Dependencies
The package requires the following dependencies, which will be installed automatically:
- `Pillow`
- `requests`
- `fuzzywuzzy`
- `python-Levenshtein`
Raw data
{
"_id": null,
"home_page": "https://github.com/AngelFireLA/FutCardCreator",
"name": "fut-card-creator",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "AngelFire",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e9/e4/ee369abc3ec2b3d0907a649883135f4cd368c789b63c22521b6d55a2b0fb/fut_card_creator-1.3.3.tar.gz",
"platform": null,
"description": "# FUT Card Creator\r\n\r\n**FUT Card Creator** is a Python package that allows you to create custom FIFA Ultimate Team (FUT) cards with ease. You can generate cards for your favorite players, complete with their stats, position, nationality, club, and more.\r\n\r\n## Features\r\n\r\n- Generate custom FUT cards with player photos, club logos, national flags, and stats.\r\n- Automatically fetch and cache club logos and national flags using online APIs.\r\n- Easily customize and update player stats.\r\n- Automatically calculate the overall rating for players based on their position.\r\n- Automatically update player stats when their overall rating changes.\r\n- Export the generated FUT card as an image file.\r\n\r\n## Installation\r\n\r\nTo install FUT Card Creator, simply run:\r\n\r\n```bash\r\npip install fut_card_creator\r\n```\r\n\r\n## Requirements\r\n\r\n- Python 3.6 or higher\r\n- `Pillow` for image processing\r\n- `requests` for API calls\r\n- `fuzzywuzzy` and `python-Levenshtein` for fuzzy string matching\r\n\r\nThese dependencies will be installed automatically when you install the package.\r\n\r\n## Usage\r\n\r\nHere\u00e2\u20ac\u2122s a basic example of how to use the FUT Card Creator:\r\n\r\n```python\r\nfrom fut_card_creator.fut_card_creator import Player, Card\r\n\r\n# Create a Player instance\r\nplayer = Player(\r\n name=\"Lionel Messi\",\r\n photo_path=\"path/to/messi_photo.png\",\r\n club=\"Paris Saint-Germain\",\r\n nation=\"Argentina\",\r\n overall=93,\r\n position=\"RW\",\r\n stats={\"PAC\": 85, \"SHO\": 92, \"PAS\": 91, \"DRI\": 95, \"DEF\": 35, \"PHY\": 65}\r\n)\r\n\r\n# Create a FUT card\r\nfut_card = Card(player, card_type=\"gold\")\r\n\r\n# Generate the card image\r\nfut_card.create_image()\r\n\r\n# Export the card image\r\nfut_card.export_image(\"messi_fut_card.png\")\r\n```\r\n\r\n### Automatic Overall Calculation\r\n\r\nThe FUT Card Creator automatically calculates a player\u00e2\u20ac\u2122s overall rating based on their position and individual stats. Each position has a unique formula that emphasizes different stats, ensuring that the overall rating reflects the player\u00e2\u20ac\u2122s role on the field.\r\n\r\n### Automatic Stat Updater\r\n\r\nWhen you update a player's overall rating, the package automatically adjusts the player's stats to match the new overall. This ensures that the stats are consistent with the player's new rating, maintaining a realistic balance.\r\n\r\n### Customization\r\n\r\nYou can easily customize various aspects of the FUT card, such as:\r\n\r\n- **Player stats**: Modify individual stats using the `Player` class.\r\n- **Card type**: Use different card templates by specifying the `card_type` in the `Card` class. (rare_gold, gold, silver_rare, totw, toty, tots, future_star, icon)\r\n- **Image paths**: Provide paths to player photos, club logos, and nation flags.\r\n\r\n### Directory Structure\r\n\r\nMake sure your project structure looks like this:\r\n\r\n```\r\nfut_card_creator/\r\n\u00e2\u201d\u201a\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac fonts/\r\n\u00e2\u201d\u201a \u00e2\u201d\u201d\u00e2\u201d\u20ac\u00e2\u201d\u20ac DINPro CondBold.otf # Required font file\r\n\u00e2\u201d\u201a\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac images/\r\n\u00e2\u201d\u201a \u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac card_templates/ # Store card template images here\r\n\u00e2\u201d\u201a \u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac club_logo_cache/ # Automatically caches club logos\r\n\u00e2\u201d\u201a \u00e2\u201d\u201d\u00e2\u201d\u20ac\u00e2\u201d\u20ac nation_cache/ # Automatically caches national flags\r\n\u00e2\u201d\u201a\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac __init__.py\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac fut_card_creator.py\r\n\u00e2\u201d\u201d\u00e2\u201d\u20ac\u00e2\u201d\u20ac utils.py\r\n\u00e2\u201d\u201a\r\nsetup.py\r\n```\r\n\r\n### Dependencies\r\n\r\nThe package requires the following dependencies, which will be installed automatically:\r\n\r\n- `Pillow`\r\n- `requests`\r\n- `fuzzywuzzy`\r\n- `python-Levenshtein`\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A package that allows you to create custom FUT cards",
"version": "1.3.3",
"project_urls": {
"Homepage": "https://github.com/AngelFireLA/FutCardCreator"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "62b33e5a277176d67589295469ade3c3cb49aad3aacc640aa2b7b6c127c0697c",
"md5": "8d19bacd4fdc50fd31001e074c9a3f49",
"sha256": "aae58344f62fc5da4b3e662b530ab12f6c677232fb8d80c93b36465e43d86461"
},
"downloads": -1,
"filename": "fut_card_creator-1.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8d19bacd4fdc50fd31001e074c9a3f49",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7930193,
"upload_time": "2024-08-30T21:58:57",
"upload_time_iso_8601": "2024-08-30T21:58:57.428274Z",
"url": "https://files.pythonhosted.org/packages/62/b3/3e5a277176d67589295469ade3c3cb49aad3aacc640aa2b7b6c127c0697c/fut_card_creator-1.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e9e4ee369abc3ec2b3d0907a649883135f4cd368c789b63c22521b6d55a2b0fb",
"md5": "8f2870c35ef8c7ea7608eb91e8a44192",
"sha256": "8cab709cb9f4edc2354435ea89dda7b1ef04b18e87668440c0280a5503d834ac"
},
"downloads": -1,
"filename": "fut_card_creator-1.3.3.tar.gz",
"has_sig": false,
"md5_digest": "8f2870c35ef8c7ea7608eb91e8a44192",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 7930161,
"upload_time": "2024-08-30T21:59:41",
"upload_time_iso_8601": "2024-08-30T21:59:41.971781Z",
"url": "https://files.pythonhosted.org/packages/e9/e4/ee369abc3ec2b3d0907a649883135f4cd368c789b63c22521b6d55a2b0fb/fut_card_creator-1.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-30 21:59:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AngelFireLA",
"github_project": "FutCardCreator",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "fut-card-creator"
}