keitaro
keitaro is a simple and easy to use API wrapper library for Keitaro Admin API written in Python3 and aiohttp
📄 Official Keitaro resources
📖 Getting Started
Installation
Pypi package is not updated, you can build it using setup.py
Keitaro tracker initialization
Begin by importing Keitaro class from aiokeitaro module and passing Admin API key and URL of Keitaro tracker to it
from aiokeitaro import Keitaro
api = Keitaro('API KEY', 'URL with http or https (if is domain)')
📚 Examples
If API request was successful, status code 200 will be received and a response in the json format.
import asyncio
from aiokeitaro import Keitaro, Offer
async def main():
api = Keitaro('API KEY', 'URL with http or https (if is domain)')
# Create an instance of the Offer class
offer = Offer(api)
# Call the get method on the instance
ss = await offer.get()
print(ss)
# run main.py
asyncio.run(main())
Click to see a response sample Admin API reference
{ "id": 14, "name": "string", "postback_url": "string", "offer_param": "string", "state": "string", "template_name": "string", "notes": "string", "pull_api_options": "string", "created_at": "string", "updated_at": "string", "offers": "string" }
Get all offers or specific one
To get all offers call get() method without any arguments
all_offers = await offer.get()
Let's try to get a specific offer by its id
dummy_offer = await offer.get(21)
As a result you'll get a response in JSON format
Click to see a response sample
[ { "id": 21, "name": "string", "group_id": 0, "action_type": "string", "action_payload": "string", "action_options": [], "affiliate_network_id": 0, "payout_value": 0, "payout_currency": "string", "payout_type": "string", "state": "string", "created_at": {}, "updated_at": {}, "payout_auto": true, "payout_upsell": true, "country": [], "notes": "string", "affiliate_network": "string", "archive": "string", "local_path": "string", "preview_path": "string" } ]
Campaign creation
To create an advertising campaign, you can simply call create() method of the campaigns resource
payload = {
'name': 'Dummy campaign',
'state': 'disabled',
'cost_type': 'CPC',
'cost_value': '5',
'cost_currency': 'USD',
'cost_auto': True
}
campaign = await campaigns.create(payload)
The non-asynchronous module is located here: https://github.com/ysomad/keitaro
Metadata
Release files for aiokeitaro 1.0.3
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 |
|---|---|---|---|---|
| aiokeitaro-1.0.3.tar.gz | 11.0 kB | Without provenance | Details for aiokeitaro-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiokeitaro-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for aiokeitaro-1.0.3-py3-none-any.whl |
Total release size: 25.6 kB
Release files / aiokeitaro-1.0.3.tar.gz
| Download URL | aiokeitaro-1.0.3.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b80cd2708f3950ec32c3f029e3a655a61317b3b2dbb10af1f9a0c5a081841895
|
|
BLAKE2b-256 checksum How to use checksums |
ceb4c42e5b57070e501f21ba8075d4551342ae47213a9e1940aeeda4001e1650
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.0
|
Release files / aiokeitaro-1.0.3-py3-none-any.whl
| Download URL | aiokeitaro-1.0.3-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85da07ee30de7551c1f41d364596a8cf0f5e024c5c972bdb2ddb07e6413546d5
|
|
BLAKE2b-256 checksum How to use checksums |
3b401f6f312aa6bf406261b2194fbd7f3579ec625fedf8a54007ff2b2d848eca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.0
|
Security for aiokeitaro 1.0.3
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.