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
Metadata
Release files for adpushup-adstxt 0.1.2
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 |
|---|---|---|---|---|
| adpushup-adstxt-0.1.2.tar.gz | 4.4 kB | Without provenance | Details for adpushup-adstxt-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adpushup_adstxt-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for adpushup_adstxt-0.1.2-py3-none-any.whl |
Total release size: 9.8 kB
Release files / adpushup-adstxt-0.1.2.tar.gz
| Download URL | adpushup-adstxt-0.1.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7437575d4ad32b1c3c8efb33b974dbc222e7ebaa4645e17c0f0fd8a07ea9ba97
|
|
BLAKE2b-256 checksum How to use checksums |
f6a790179933ab7969e26b050f58f525066c7ce8e00a9fc00ef3447e310aa9fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / adpushup_adstxt-0.1.2-py3-none-any.whl
| Download URL | adpushup_adstxt-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c487434fd87f3ceb6bade363962ea4059d1e1ff4fb42706d8b8bee50f22472e
|
|
BLAKE2b-256 checksum How to use checksums |
ec098007cb624eb62d110720deda58d08ec245dfd0cd9a1057127abe6c7741a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for adpushup-adstxt 0.1.2
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.