Simple Python Whop API Wrapper
Project description
Whop-API-Wrapper
A simple python API wrapper of Whop's API, documentation can be found at: https://dev.whop.com/reference/home
Installation
To install the package, use the following command:
pip install whop-api-wrapper
Usage
Initialize the Client class with your token, use any api call as a method of the client.
from whop_api_wrapper import Client
client = Client("input_token_here")
products = client.list_all_products()
for product in products:
print(product) # Product(id=product_id, name=product_name, visibility=visible, created_at=123, experiences=[], plans=[])
customer = client.retrieve_customer("customer_id_here")
print(customer) # Customer(id=user_id, username=whop_username, email=email, profile_pic_url=url, social_accounts=[{'service': 'discord', 'username': 'discord_name#1234', 'id': '123'}], roles=None),
promo_code = client.create_promo_code(amount_off=25, base_currency="usd", code="25off", promo_type="flat_amount")
print(promo_code) # PromoCode(id=promo_id, created_at=123, amount_off=100.0, base_currency=usd, code=100off, expiration_datetime=None, new_users_only=True, number_of_intervals=1, plan_ids=[], promo_type=percentage, status=active, stock=6, uses=2)
Feel free open any issues or report them to me on discord, jacobfinn.
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 whop_api_wrapper-1.1.8.tar.gz.
File metadata
- Download URL: whop_api_wrapper-1.1.8.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b20f44bd38a67b01bd4f4777906b1a640856b25d50690d8d003dc7ae568367
|
|
| MD5 |
0cef36c2fa30490d037ee61914001c91
|
|
| BLAKE2b-256 |
d3afef3b37af50b9b47a020a99ad07c6add277b2aba717cedbd9cdd9f965ad61
|
File details
Details for the file whop_api_wrapper-1.1.8-py3-none-any.whl.
File metadata
- Download URL: whop_api_wrapper-1.1.8-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23866acb8a560a9398b06b6870fdd43b7a301dcfec074aa00631e7f3b07f0f04
|
|
| MD5 |
c689d9721bea3968d0dd787078eeb3be
|
|
| BLAKE2b-256 |
dbcbb643d15833c11d9a3763b70430f6245ba9e9b4c456671acd1630cd8101ee
|