Skip to main content

🔮 Gacha

Project description

gacha

🔮 Gacha

language license

📑 Table of Contents

📦 Installation

🐍 PyPi

pip install gacha

🔎 Examples

🧾 Basic

examples/basic.py

from gacha import Engine, Banner, Character

engine = Engine(
    [
        Banner(
            "Wanderlust_Invocation",
            characters=[
                Character(
                    0.003,
                    name="Jean",
                    description="https://genshin-impact.fandom.com/wiki/Jean",
                ),
                Character(
                    0.003,
                    name="Qiqi",
                    description="https://genshin-impact.fandom.com/wiki/Qiqi",
                ),
                Character(
                    0.003,
                    name="Tighnari",
                    description="https://genshin-impact.fandom.com/wiki/Tighnari",
                ),
                Character(
                    0.003,
                    name="Keqing",
                    description="https://genshin-impact.fandom.com/wiki/Keqing",
                ),
                Character(
                    0.003,
                    name="Mona",
                    description="https://genshin-impact.fandom.com/wiki/Mona",
                ),
                Character(
                    0.003,
                    name="Dehya",
                    description="https://genshin-impact.fandom.com/wiki/Dehya",
                ),
                Character(
                    0.003,
                    name="Diluc",
                    description="https://genshin-impact.fandom.com/wiki/Diluc",
                ),
                ...,
            ],
            name="Wanderlust_Invocation",
            description="https://genshin-impact.fandom.com/wiki/Wanderlust_Invocation",
        ),
    ]
)

character = engine.roll()

print(character.name)  # Jean
print(character.description)  # https://genshin-impact.fandom.com/wiki/Jean

✨ Links

🐍 PyPi
🏠 Homepage
🐱 Repository

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

gacha-1.0.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

gacha-1.0.1-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

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