| Name | awin-py JSON |
| Version |
0.0.3
JSON |
| download |
| home_page | None |
| Summary | A wrapper around the AWIN API. |
| upload_time | 2024-09-03 05:44:21 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.8 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# awin-py
**awin-py** is a python wrapper around the [AWIN API](https://wiki.awin.com/index.php/API).
The goals is to provide an easy to use interface for all AWIN API endpoints.
It handles pagination, rate limiting, errors. Most information needed is available via docstrings, for further details please refer to the [AWIN API docs](https://wiki.awin.com/index.php/API).
```python
>>> from advertiser_api.client import Awin
>>> Awin = Awin(client_id='***', client_secret='***')
>>> start_date = datetime.now() - timedelta(days=361)
>>> end_date = datetime.now()
>>> transactions = Awin.get_transactions(start_date=start_date, end_date=end_date)
>>> len(transactions)
1302
>>> transactions[0]
{"advertiserCost": {"amount": null, "currency": null},
"advertiserCountry": "DE",
"advertiserId": 11111,
"amendReason": null,
"amended": false,
"basketProducts": null,
"campaign": null,
"clickDate": "2024-05-04T20:54:00",
"clickDevice": "Android Mobile",
"clickRefs": {"clickRef": "9184c7g4-9gbb-48g7-9e43-44717t5bed70"},
"commissionAmount": {"amount": 4.26, "currency": "EUR"},
"commissionSharingPublisherId": null,
"commissionSharingSelectedRatePublisherId": null,
"commissionStatus": "pending",
"customParameters": [],
"customerAcquisition": null,
"customerCountry": "IE",
"declineReason": null,
"id": 1591984035,
"ipHash": "-917875755098098",
"lapseTime": 286,
"networkFee": {"amount": 1.19, "currency": "EUR"},
"oldCommissionAmount": null,
"oldSaleAmount": null,
"orderRef": "99439999999",
"originalSaleAmount": null,
"paidToPublisher": false,
"paymentId": 0,
"publisherId": 426667,
"publisherUrl": null,
"saleAmount": {"amount": 42.56, "currency": "EUR"},
"siteName": "http://www.payback.de",
"trackedCurrencyAmount": null,
"transactionDate": "2024-05-14T20:59:00",
"transactionDevice": "Linux",
"transactionParts": [{"advertiserCost": null,
"amount": 42.56,
"commissionAmount": 4.26,
"commissionGroupCode": "DEFAULT",
"commissionGroupId": 167797,
"commissionGroupName": "Default",
"trackedParts": [{"amount": 42.56,
"code": "DEFAULT",
"currency": "EUR"}]}],
"transactionQueryId": 0,
"type": "Commission group transaction",
"url": "http://www.payback.de",
"validationDate": null,
"voucherCode": "TESTTEST100",
"voucherCodeUsed": true}
```
If something appears to be broken, please have a look at the [open issues](https://github.com/FriedrichtenHagen/awin-py/issues) and vote for an existing issue or create a new one, if you can't find an issue that describes your problem.
## Features
* Aims to cover all functions of the Awin API (work in progress)
* Python function wrappers for all API endpoints as part of the Awin class
* Support for type hints
## API Functions
awin-py currently only implements a subset of all available API features. This section gives an overview over which API endpoints are accessible through awin-py.
### Available
- Advertiser API
- GET accounts
- GET publishers
- GET transactions (list)
- GET transactions (ID)
- GET reports aggregated by publisher
- GET reports aggregated by creative
- GET reports aggregated by campaign
### Not yet implemented
- Publisher API
- Transaction Validation API
## License
Copyright 2024 Friedrich ten Hagen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Raw data
{
"_id": null,
"home_page": null,
"name": "awin-py",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Friedrich ten Hagen <author@example.com>",
"download_url": "https://files.pythonhosted.org/packages/66/c9/e068cd90f4ee1ce83c76c209763090dd5f880f8c65185af305f734c5577e/awin_py-0.0.3.tar.gz",
"platform": null,
"description": "# awin-py\n\n**awin-py** is a python wrapper around the [AWIN API](https://wiki.awin.com/index.php/API).\nThe goals is to provide an easy to use interface for all AWIN API endpoints.\nIt handles pagination, rate limiting, errors. Most information needed is available via docstrings, for further details please refer to the [AWIN API docs](https://wiki.awin.com/index.php/API).\n\n```python\n>>> from advertiser_api.client import Awin\n>>> Awin = Awin(client_id='***', client_secret='***')\n>>> start_date = datetime.now() - timedelta(days=361)\n>>> end_date = datetime.now()\n>>> transactions = Awin.get_transactions(start_date=start_date, end_date=end_date)\n>>> len(transactions)\n1302\n>>> transactions[0]\n{\"advertiserCost\": {\"amount\": null, \"currency\": null},\n \"advertiserCountry\": \"DE\",\n \"advertiserId\": 11111,\n \"amendReason\": null,\n \"amended\": false,\n \"basketProducts\": null,\n \"campaign\": null,\n \"clickDate\": \"2024-05-04T20:54:00\",\n \"clickDevice\": \"Android Mobile\",\n \"clickRefs\": {\"clickRef\": \"9184c7g4-9gbb-48g7-9e43-44717t5bed70\"},\n \"commissionAmount\": {\"amount\": 4.26, \"currency\": \"EUR\"},\n \"commissionSharingPublisherId\": null,\n \"commissionSharingSelectedRatePublisherId\": null,\n \"commissionStatus\": \"pending\",\n \"customParameters\": [],\n \"customerAcquisition\": null,\n \"customerCountry\": \"IE\",\n \"declineReason\": null,\n \"id\": 1591984035,\n \"ipHash\": \"-917875755098098\",\n \"lapseTime\": 286,\n \"networkFee\": {\"amount\": 1.19, \"currency\": \"EUR\"},\n \"oldCommissionAmount\": null,\n \"oldSaleAmount\": null,\n \"orderRef\": \"99439999999\",\n \"originalSaleAmount\": null,\n \"paidToPublisher\": false,\n \"paymentId\": 0,\n \"publisherId\": 426667,\n \"publisherUrl\": null,\n \"saleAmount\": {\"amount\": 42.56, \"currency\": \"EUR\"},\n \"siteName\": \"http://www.payback.de\",\n \"trackedCurrencyAmount\": null,\n \"transactionDate\": \"2024-05-14T20:59:00\",\n \"transactionDevice\": \"Linux\",\n \"transactionParts\": [{\"advertiserCost\": null,\n \"amount\": 42.56,\n \"commissionAmount\": 4.26,\n \"commissionGroupCode\": \"DEFAULT\",\n \"commissionGroupId\": 167797,\n \"commissionGroupName\": \"Default\",\n \"trackedParts\": [{\"amount\": 42.56,\n \"code\": \"DEFAULT\",\n \"currency\": \"EUR\"}]}],\n \"transactionQueryId\": 0,\n \"type\": \"Commission group transaction\",\n \"url\": \"http://www.payback.de\",\n \"validationDate\": null,\n \"voucherCode\": \"TESTTEST100\",\n \"voucherCodeUsed\": true}\n```\n\nIf something appears to be broken, please have a look at the [open issues](https://github.com/FriedrichtenHagen/awin-py/issues) and vote for an existing issue or create a new one, if you can't find an issue that describes your problem.\n\n## Features\n\n* Aims to cover all functions of the Awin API (work in progress)\n* Python function wrappers for all API endpoints as part of the Awin class\n* Support for type hints\n\n## API Functions\n\nawin-py currently only implements a subset of all available API features. This section gives an overview over which API endpoints are accessible through awin-py.\n\n### Available\n\n- Advertiser API\n - GET accounts\n - GET publishers\n - GET transactions (list)\n - GET transactions (ID)\n - GET reports aggregated by publisher\n - GET reports aggregated by creative\n - GET reports aggregated by campaign\n\n### Not yet implemented\n\n- Publisher API\n- Transaction Validation API\n\n## License\nCopyright 2024 Friedrich ten Hagen\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A wrapper around the AWIN API.",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/FriedrichtenHagen/awin-py",
"Issues": "https://github.com/FriedrichtenHagen/awin-py/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a3f066c5079a31c127e634e50e04eafbd71eaa1cb5e6b1acb0248dede21b2bf9",
"md5": "c38e81512f023afd1ad1bdf6d0a20eaf",
"sha256": "f9f694d77fa8e6b7308380b4b26d30a8fbf1a2c46cfb675c90bfea7b448b355c"
},
"downloads": -1,
"filename": "awin_py-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c38e81512f023afd1ad1bdf6d0a20eaf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9436,
"upload_time": "2024-09-03T05:44:20",
"upload_time_iso_8601": "2024-09-03T05:44:20.357247Z",
"url": "https://files.pythonhosted.org/packages/a3/f0/66c5079a31c127e634e50e04eafbd71eaa1cb5e6b1acb0248dede21b2bf9/awin_py-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "66c9e068cd90f4ee1ce83c76c209763090dd5f880f8c65185af305f734c5577e",
"md5": "7f5fe8b4c0de6b1b2e08785227ef893c",
"sha256": "786e4ef4193d09971bd6a1190835a32f7f09d5d2310c16c5034e2146495869ad"
},
"downloads": -1,
"filename": "awin_py-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "7f5fe8b4c0de6b1b2e08785227ef893c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9476,
"upload_time": "2024-09-03T05:44:21",
"upload_time_iso_8601": "2024-09-03T05:44:21.944979Z",
"url": "https://files.pythonhosted.org/packages/66/c9/e068cd90f4ee1ce83c76c209763090dd5f880f8c65185af305f734c5577e/awin_py-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-03 05:44:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "FriedrichtenHagen",
"github_project": "awin-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "awin-py"
}