Current collected state Current
Observed since 20 Oct, 19:49 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
adpushup-adstxt
AdPushUp ads.txt management API.
This library provides adpushup API for handling ads.txt management.
Django:
add it to installed apps:
INSTALLED_APPS = (
...,
'adpushup_adstxt',
...,
)
add your user_id and key to YOUR settings.py:
ADPUSHUP_API_USER_ID = 'test@example.com'
ADPUSHUP_API_KEY = '1234'
OPTIONALLY add different WWW_DIR:
ADPUSHUP_WWW_DIR = '/some/dir/to/put/ads.txt/in/it/'
by default it is Djangos ROOT_DIR + '/www'
ADD it to your urlconf:
from adpushup_adstxt.django_views import handle
urlpatterns += patterns(
'',
url(r'^adsTxtManagementApiByAdpushup.php', handle)),
Testing:
from adpushup_adstxt.utils import encode_uri_component
import time
import hmac
import hashlib
import requests
user_id = 'your user id'
key = 'your key'
req_time = int(time.time())
hash_params = "email={}&ts={}".format(
encode_uri_component(user_id.encode("UTF-8")), req_time)
hash = hmac.new(key, hash_params, hashlib.sha256).hexdigest()
res = requests.post(
'http://localhost:8000/adsTxtManagementApiByAdpushup.php',
dict(
data='test content',
ts=req_time,
hash=hash))
print res.status_code
print res.content
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
bdist_wheel · 5.27 KB · Python py3
sdist · 4.29 KB · Python source
Observed since 20 Oct, 19:49 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:e8d29d78d55d05d55f39b93e845a67a55b1f2ec879497459f4801974282ed38c