Python package to interact with Houseparty's API.
Project description
houseparty
Description
A python package to interact with Houseparty's API. The following tasks can be automated through the use of this package:
- Logging in
- Waving
- Calling
- Messaging (not functional at the moment)
- In house alerts
- Changing profile picture
- Changing display name
- Changing username
- Checking username availability
- Viewing online friends
- Viewing relationships
- Viewing friend suggestions
- Searching for users
- Downloading a user's avatar
- Viewing account details:
- Account ID
- Username
- Full name
- Avatar ID
- Account creation date
- Last account update date
- Relationship status
- Last interaction
Requirements
This package relies on the requests library. You can install it with pip3 install requests.
Installation
pip3 install houseparty
Getting started
from houseparty import Houseparty, User
me = Houseparty('USERNAME','PASSWORD') # Replace this with your houseparty username and password
print(me.user) # Print your user information
friend = User(me.auth_token,'USERNAME') # Initializes an instance of a user we want to interact with, the auth token is needed to retrieve a friend's information and preform user actions (wave, ring, etc.)
print(friend.user) # Print the user's information
See example.py for more usage examples of this package.
Function explanations
| Function Name | Function Explanation | Number of arguments | Argument Details | Return value |
|---|---|---|---|---|
Houseparty.login() |
Logs in a user to get an authentication token. Called by default when initializing Houseparty instance. |
2 | self, username, password: username and password must be valid Houseparty credentials. |
Dictionary containing user information. |
Houseparty.change_avatar() |
Changes the avatar of the current user. | 1 | self, file: file must be a valid file path. |
Dictionary containing response from avatar PUT request. |
Houseparty.change_display_name() |
Changes the display name of the current user. | 1 | self, name |
True if the change was sucessful, otherwise returns None. |
Houseparty.check_username() |
Checks the availability and validity of a username. | 1 | username |
Dictionary containing the validity and availibility status. |
Houseparty.change_username() |
Changes the username of the current user. | 1 | self, username: username must be available and valid. |
True if the change was sucessful, otherwise returns None. |
Houseparty.in_house_alert() |
Sends out a <name> is in the house alert. | 0 | self |
True if the request was sucessful, otherwise returns None. |
Houseparty.online_friends() |
Returns the online friend list of the current user. | 0 | self |
Dictionary containing online friends and their user details. |
Houseparty.relationships() |
Returns the friend list of the current user. | 0 | self |
Dictionary containing all friends and their user details. |
Houseparty.suggestions() |
Returns friend suggestions for the current user. | 0 | self |
Dictionary containing frined suggestions and their user details. |
Houseparty.search() |
Searches for Houseparty users. | 1 | self, text: text must be at least 3 characters |
Dictionary of users matching the search text and their user details. |
User.get_uid() |
Returns the user ID of a username. Called by default when initializing User instance. |
1 | username: username must be a Houseparty user. |
uid string if sucessful, otherwise returns None. |
User.get_user_info() |
Returns the user details for a User instance. |
0 | self |
Dictionary containing user details. |
User.get_avatar() |
Downloads the avatar for a User instance. |
2 (optional) | self, output_dir, size: output_dir must be a valid file path, by default it is HOME_DIRECTORY/Pictures/houseparty-avatars. size must be an integer, by default it is 1000. |
True if sucessful, otherwise returns None. |
User.say_hi() |
Sends a wave to the current User instance. |
1 (optional) | self, amount: amount must be a positive integer. |
True if sucessful, otherwise returns None. |
User.ring() |
Sendsd a call to the current User instance. |
1 (optional) | self, amount: amount must be a positive integer. |
True if sucessful, otherwise returns None. |
User.send_message() |
Sends a message to the current User instance. Still under development and not functional at the moment. |
2 (second argument is optional) | self, message, amount: amount must be a positive integer. |
True if sucessful, otherwise returns None. |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file houseparty-1.0.1.tar.gz.
File metadata
- Download URL: houseparty-1.0.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e85f1b215a558d9a613c7427e1b8b59ae3ba55439635f9ce5c5855ec351fc58
|
|
| MD5 |
853cb7024224b1c361a37829acc865e5
|
|
| BLAKE2b-256 |
5d7667a0a4c9a9e878077432e26e45c3784f2995d060a681f15034dd005d4c52
|
File details
Details for the file houseparty-1.0.1-py3-none-any.whl.
File metadata
- Download URL: houseparty-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5f599aa109c6b6723ac3ad1e0de332d677a1f662b56e59151f05209e8808fc1
|
|
| MD5 |
15b97f6c497363ca2e03dffc69188f0a
|
|
| BLAKE2b-256 |
31548df1ebdffd44e6fc38b5fbc76c52f659e93b32eef5eb78e26c5d73a36a98
|