Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wired API Python

A Python wrapper for the Habbo public API.

Installation

Add the wrapper to your project using pip:

pip install wired-api-python

Basic Usage

Initializing the API Client

from wired_api_python import HabboPublicAPI, Hotel

# Create an instance targeting the .COM hotel
api = HabboPublicAPI.from_hotel(Hotel.COM)

Accessing Standard Endpoints

Once instantiated, use the resource methods to query public data, for example:

# Fetch the achievements list
achievements = api.achievements().all()

# Fetch room details by ID
room = api.rooms().by_id(room_id)

Wired Variables Endpoints

To interact with WIRED variables, call .variables() on your API instance with the room ID and your read/write keys:

var_api = api.variables(room_id, wired_read_key, wired_write_key)

# Access variable data for the specified room
all_var_names = var_api.list_all()
user_var_profile = var_api.user().get_profile_by_username("WiredSpast")

Error Handling

API requests raise HabboApiException on failure. Wrap your calls in a try/except block:

from wired_api_python import HabboApiException

try:
    room = api.rooms().by_id(room_id)
except HabboApiException as e:
    # Handle API-specific errors (e.g., 404 Not Found, 500 Server Error)
    print(e.code, e.response_body)

Supported Feature Overview

  • Public Endpoints:
    • Achievements -- api.achievements()
    • Badge owner count -- api.badges()
    • Groups -- api.groups()
    • Marketplace statistics -- api.marketplace()
    • Ping -- api.ping()
    • Rooms -- api.rooms()
    • Lists (hot looks) -- api.lists()
    • Users -- api.users()
  • Variable Endpoints (api.variables(room_id, read_key, write_key)):
    • Read and manage permanent user variables -- .user()
    • Read and manage permanent furni variables -- .furni()
    • Read and manage permanent global variables -- .global_()

About

Python wrapper for the Habbo API.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages