Skip to main content

A package that allows you to create custom FUT cards

Project description

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:

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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fut_card_creator-1.3.2.tar.gz (7.9 MB view details)

Uploaded Source

Built Distribution

fut_card_creator-1.3.2-py3-none-any.whl (7.9 MB view details)

Uploaded Python 3

File details

Details for the file fut_card_creator-1.3.2.tar.gz.

File metadata

  • Download URL: fut_card_creator-1.3.2.tar.gz
  • Upload date:
  • Size: 7.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for fut_card_creator-1.3.2.tar.gz
Algorithm Hash digest
SHA256 4c66438a7315a5e85cfec52fda889b51064438f8e2370907c1199fa9eb6e1a8c
MD5 d224d237e9503445dd5bf924f1a2144e
BLAKE2b-256 1ae99f7b9a5f1627cf21fb7dff2dde9c50a958942e99a3d4d23705eb139607d3

See more details on using hashes here.

File details

Details for the file fut_card_creator-1.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fut_card_creator-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e947a56185e11abfbbd8eccf67fd04ab87715c7a8893c2b57d4db86d8fe7d4a3
MD5 3ab269e9bcf02baf4754e77f41b6a238
BLAKE2b-256 4db0061eae85698722c45a5bf005e13caa9786767f90256a3ad0f280bedb8c4e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page