pubsubsuperfeedr
A simple library designed to make it easy to add and remove feeds from Superfeedr’s PubSubHubbub API. Includes support for hub.secret.
Credits
Developed and used at Urban Airship and released under the MIT License.
Harper Reed’s gae-superfeedr-shell provided inspiration for part of this code. Thanks Harper!
Example Usage
Setting up pubsubsuperfeedr:
>>> import pubsubsuperfeedr >>> sf = pubsubsuperfeedr.Superfeedr(settings.SUPERFEEDR_USERNAME, settings.SUPERFEEDR_PASSWORD)
Validating a feed to make sure that it has at least one readable entry:
>>> sf.verify_feed_url("http://blog.urbanairship.com/feed/")
True
Note that this is just a really simple wrapper around feedparser and sometimes feedparser can read things that Superfeedr can’t.
Adding a feed:
>>> sf.add_feed("http://blog.urbanairship.com/feed/", "http://example.com/your_callback_url", "some_verify_token", "some_secret")
add_feed expects the feed you’re wanting to watch, then the callback URL, and optionally a verify token and feed secret.
Removing a feed:
>>> sf.remove_feed("http://blog.urbanairship.com/feed/", "http://example.com/your_callback_url", "some_secret")
Removing a feed is basically the same as adding a feed.
Verifying a secret (in Django):
>>> sf.verify_secret("some_secret", request.raw_post_data, request.META.get("HTTP_X_HUB_SIGNATURE", ""))
True
Testing
To run the tests, first make sure that nose and mox are installed. Then:
$ nosetests
And you’re off an running.
Metadata
Release files for pubsubsuperfeedr 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pubsubsuperfeedr-0.4.0.tar.gz | 3.5 kB | Without provenance | Details for pubsubsuperfeedr-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pubsubsuperfeedr-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for pubsubsuperfeedr-0.4.0-py3-none-any.whl |
Total release size: 7.1 kB
Release files / pubsubsuperfeedr-0.4.0.tar.gz
| Download URL | pubsubsuperfeedr-0.4.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35a6544bb8ac5d63fc05ba32e90949444ac86e58dd03186b193d45414cbfabdd
|
|
BLAKE2b-256 checksum How to use checksums |
80e501448eed01e2353ce532f8a351101d0fe02874777765091f9e7b08332d3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pubsubsuperfeedr-0.4.0-py3-none-any.whl
| Download URL | pubsubsuperfeedr-0.4.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1cacd3c8491a63ced401c03e3bc23b1351847427c282abbb90d864109f2c9ca
|
|
BLAKE2b-256 checksum How to use checksums |
fa9bc36efdb195912d5dee7a5a2357b5979d3b9642835d994250b773ceb9c48e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pubsubsuperfeedr 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.