Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/newsapps/p2p-python
Wrapper for Tribune's Content Services API
https://github.com/newsapps/p2p-python
Last synced: 3 months ago
JSON representation
Wrapper for Tribune's Content Services API
- Host: GitHub
- URL: https://github.com/newsapps/p2p-python
- Owner: newsapps
- License: mit
- Created: 2012-10-27T02:04:59.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T18:57:58.000Z (almost 3 years ago)
- Last Synced: 2024-07-27T06:36:54.415Z (4 months ago)
- Language: Python
- Size: 101 KB
- Stars: 15
- Watchers: 9
- Forks: 15
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Python wrapper for P2P Content Services
------------------Configuration settings. Set these values in your environment or your Django settings.
P2P_API_KEY = your_p2p_api_key
P2P_API_URL = url_of_p2p_endpoint
P2P_API_DEBUG = plz # display an http log# Optional
P2P_IMAGE_SERVICES_URL = url_of_image_services_endpoint
To get a connection object based on these settings:from p2p import get_connection
p2p = get_connection()Or you can create a connection object manually. You'll want to do this in order to enable caching.
from p2p import P2P, cache
p2p = P2P(
url='url_of_p2p_endpoint',
auth_token='your_p2p_api_key',
debug=False or True,
image_services_url='url_of_image_services_endpoint',
cache=cache.DictionaryCache()
)To run tests:
$ python setup.py test