Skip to main content

Will of Steel API Wrapper

A modern, easy to use, Pythonic API wrapper for the Will of Steel API in Python.

Installing

Python 3.8 or higher is required

On windows, the library can be installed using the following command:

py -3 -m install willofsteel

On macOS/linux, use the following command:

python3 pip install willofsteel

If desired, you can also clone the repository directly:

git clone https://github.com/WillofSteel-Devs/api-wrapper

Using the library

Creating a Client

To create a client to interact with the API with, you can use the followning code:

import willofsteel

API_KEY = 'Place your api key here'

client = willofsteel.Wrapper(API_KEY)

Example

A quick example of using this library is to look up your profile every hour and send the results to a text file, this can be accomplished with the following:

import willofsteel
import time

API_KEY = 'Place your api key here'
client = willofsteel.Wrapper(API_KEY)


def scheduled_query():

    # Querying the api for the api key holder's profile
    player = client.get_player()

    # Creating a file name to log the results with
    timestamp = time.asctime().replace(':', '_')

    # Logging results
    with open(f'{timestamp}.txt', 'x', encoding='utf-8') as f:
        f.write(player)

    print(f"Query made at {timestamp}")

while True:
    scheduled_query()
    time.sleep(3600)

Metadata

Release files for willofsteel 0.1

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

Source distribution (sdist)

Source distribution for willofsteel 0.1
File Size Uploaded
willofsteel-0.1.tar.gz 8.3 kB Details

Release files / willofsteel-0.1.tar.gz

Download URL willofsteel-0.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e429712e181668e94c8b707c5b4439260f4320dcfe705002ee13f537f89dfb36
BLAKE2b-256 checksum
How to use checksums
8508cc975c8a8f9275d50801d81b7b5533919c04d49c62f78f8ad8eb49c49c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

0.0.1

1 release file

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