Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
},
"mypy_exclude": [
"src/whop_sdk/lib"
]
],
"extra_dependencies": {
"standardwebhooks": ">=1.0.1,<2"
}
},
"originGitCommit": "a26a97d2d8ee29f78819a299712fb3b4086d634e",
"originGitCommit": "ece201e2cfe67e8b10dd9627bd5e151dad29f1c5",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "0.0.41",
"requestedVersion": "1.0.13",
"ciProvider": "unknown",
"sdkVersion": "0.0.41"
"sdkVersion": "1.0.13"
}
16 changes: 16 additions & 0 deletions .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@
.github/workflows/publish-main.yml
src/whop_sdk/lib
tests/custom
.fern/replay.lock
.fern/replay.yml
.gitattributes
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.fern/replay.lock linguist-generated=true
35 changes: 7 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
# Whop Python Library

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Whop%2FPython)
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fwhopio%2Fwhopsdk-python)
[![pypi](https://img.shields.io/pypi/v/whop_sdk)](https://pypi.python.org/pypi/whop_sdk)

The Whop SDK gives you typed access to the Whop API. Pass your API key to the client explicitly — the SDK reads no environment variables, so a client built without a key sends unauthenticated requests and the API answers 401.


## Table of Contents

- [Documentation](#documentation)
- [Installation](#installation)
- [Reference](#reference)
- [Usage](#usage)
- [Migrating from 0.0.41 and earlier](#migrating-from-0041-and-earlier)
- [There is no environment-variable fallback](#there-is-no-environment-variable-fallback)
- [A first request](#a-first-request)
- [Migrating From 0 0 41 and Earlier](#migrating-from-0-0-41-and-earlier)
- [A First Request](#a-first-request)
- [Environments](#environments)
- [Async Client](#async-client)
- [Using aiohttp](#using-aiohttp)
- [Using Aiohttp](#using-aiohttp)
- [Exception Handling](#exception-handling)
- [Pagination](#pagination)
- [What a pager exposes](#what-a-pager-exposes)
- [Verifying user tokens](#verifying-user-tokens)
- [Verifying User Tokens](#verifying-user-tokens)
- [Advanced](#advanced)
- [Access Raw Response Data](#access-raw-response-data)
- [Retries](#retries)
- [Timeouts](#timeouts)
- [Custom Client](#custom-client)
- [Requirements](#requirements)
- [Determining the installed version](#determining-the-installed-version)
- [Determining The Installed Version](#determining-the-installed-version)
- [Contributing](#contributing)

## Documentation
Expand Down Expand Up @@ -226,26 +225,6 @@ for page in pager.iter_pages():
print(item)
```

### What a pager exposes

The pager is not the response body. It carries `items` (this page only), `has_next`,
`next_page()`, and `iter_pages()`, and iterating the pager itself walks every page. The
decoded response — `data` and `page_info` — is on `pager.response`:

```python
from whop_sdk import Whop

client = Whop(token="<token>")
pager = client.products.list(account_id="biz_xxxxxxxxxxxxxx")

print(pager.response.page_info.has_next_page)
print(pager.response.data) # this page's items, as returned by the API
print(pager.items) # the same items, off the pager
```

`SyncPager` and `AsyncPager` live in `whop_sdk.core.pagination`; they are not exported
from the package root.

## Verifying user tokens

`verify_user_token` checks the `x-whop-user-token` JWT that Whop sends to an embedded
Expand Down
Loading
Loading