/thm-api-py

Python THM public API wrapper

Primary LanguagePythonMIT LicenseMIT

API Py

NOTE:

The maintained version off the TryHackMe python API is moved to tryhackme.py And this fork is now dormant.

Maintained Python wrapper for TryHackMe public API
This fork is unofficial and not associated with TryHackMe, but i would love to.

Installation

pip install thmapi

Usage

from thmapi import THM

creds = {
    'username': '<USERNAME>', 'password': '<PASSWORD', 
    # username and password are no longer supported please instead use
    'session': '<connect.sid cookie>'
}

thm = THM(credentials=creds) # Logging in is optional

thm.get_stats() # {'publicRooms': 203, 'totalUsers': 88017, 'cloneableRooms': 967}

API documentation

For the API documentation please visit the TryHackMe-API-Doc

Contributing

You're welcome to create Issues/Pull Requests with features you'd want to see

License

MIT LICENSE