Skip to main content

twhook

py twt-api mit

About

twhook is a simple Twitter Premium Account Activity API wrapper that helps you to manage webhooks and subscriptions.

Installation

Git:

git clone https://github.com/nxgeo/twhook.git
cd twhook
pip install -r requirements.txt

Pip:

pip install twhook

Examples

For easy implementation examples, see twhook/examples/.

Suggestion

As described in the Twitter Securing Webhooks guide, a first step is writing code that receives a Twitter Challenge-Response Check (CRC) GET request and responds with a properly formatted JSON response.

A CRC will be sent when you register your webhook URL, so implementing your CRC response code is a fundamental first step.

HERE is an example of implementing a CRC response in Python.

Reference

Account Activity API: Premium

Metadata

Release files for twhook 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twhook 0.1.0
File Size Uploaded
twhook-0.1.0.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for twhook 0.1.0
File Interpreter ABI Platform
twhook-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / twhook-0.1.0.tar.gz

Download URL twhook-0.1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
54ab76162de888cc1fad4f1ca2b4b8ade8d89f91bdf3febd27aba48bbba06f29
BLAKE2b-256 checksum
How to use checksums
633ba3fad0daad8bed7a601484091504331df9ea5069fc0d93ac452741a7e938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / twhook-0.1.0-py3-none-any.whl

Download URL twhook-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43296011d92bdd1632032df6f5335cfc7cb6767f6e98f27eaa1d2fda073c7e66
BLAKE2b-256 checksum
How to use checksums
639ae6eace400b4de181cb97ad738ed2a09f5d62f5adf8c52b7a8f5aebbbbd86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page