A wrapper library to easily retrieve FWA related information that is publicly available and free-to-use.
Project description
Supy-fwas [SFWAS]
This is a wrapper library to easily retrieve FWA related information that is publicly available and free-to-use. The package uses synchronous calls for developers to easily implement the features.
Table of Contents
- About the package 📦
- Usage 🧾
- Installation ➕
- Requirements ⚙
- Examples 🖥
- License ©
- Disclaimer ❗
- Contact 📩
Usage
SFWAS focuses on easy-to-use Python synchronous methods and objects. See Examples after Installation
Installation
For Windows:
py -m pip install supy-fwas
For Unix/MacOS:
python3 -m pip install supy-fwas
Requirements
- Python 3.7+
- coc.py 2.0+
- requests
Examples
This consists of only few out of all the available methods in the package.
from sfwas import SFWAS
supy = SFWAS()
# Allows only FWA clan_tag to execute the function
# Other clan_tags are ignored
@supy.fwa_clans
def foo1(clan_tag, member_tag):
print(f"{member_tag} is now a part of clan ({clan_tag}))")
# any suitable work
...
def foo2(clan_tag, ...):
clan_weight = supy.get_clan_weight(clan_tag)
...
def foo3(player_tag):
w = supy.get_member_weight(player_tag)
# If Exception `NotFound` is thrown, you'll require to use get_member_from_clan()
# Since FWA Stats likely doesn't have their weights readily available
def bar(clan_name):
clan_tag = supy.get_clan_by_name(clan_name)
# Use clan_tag for any valid purpose :)
...
foo1
Describes how the decorator helps the function filter/not call clans that are not in FWA Stats (FWA)
foo2
Describes how easy it is to get the latest uploaded clan weights of a clan.
foo3
Describes the use of player_tag to get player weights
bar
Uses get_member_weight() method (instead of get_member_weight_from_clan()) to retrieve member's weight.
License
Copyright (c) 2022-present real-supreme
Disclaimer
This content is not affiliated with, endorsed, sponsored, or specifically approved by Supercell and Supercell is not responsible for it. For more information see Supercell's Fan Content Policy: www.supercell.com/fan-content-policy
This package is not supported or developed by FWA. The package is used to access data directly from the fwa stats.
Contact
- Discord - SUPREME#1000
- Github - real-supreme
Other forms of contact will be added later :wink:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file supy-fwas-0.9.0.tar.gz
.
File metadata
- Download URL: supy-fwas-0.9.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f03d2886adc80bd99431bd308d1aa58610f38ab897c25dd92592dc37ecf9f75 |
|
MD5 | 45c1a83a5704572e416c6d59a29d21cb |
|
BLAKE2b-256 | ea6122553c2b6ebd30d0899178738313eb3024cbd1f651bb3231fb89619a03b7 |