Metadata-Version: 2.1
Name: odap-adfrom-downloader
Version: 0.9.0
Summary: DataSentics adform downloader
Home-page: https://github.com/DataSentics/odap-adform-downloader
License: MIT
Author: Jiri Koutny
Author-email: jiri.koutny@datasentics.com
Requires-Python: >=3.7.1,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: azure-storage-blob (>=12.8.0,<13.0.0)
Requires-Dist: requests (>=2.25.1,<3.0.0)
Project-URL: Repository, https://github.com/DataSentics/odap-adform-downloader
Description-Content-Type: text/markdown

# DataSentics Python package for downloading adform data

**This package is distributed under the "DataSentics SW packages Terms of Use." See [license](https://github.com/DataSentics/odap-ga-downloader/blob/main/LICENSE)**

## Downloads data from adform in zip files

You need to specify:
  * Credentials (name, setup_id, client_id, secret)
  * Optionally you can specify scope, which data from Adform you would like to download, dates and file directory

```bash
$ pip install adform-downloader

from adform.Client import Client, FilePersistingHandler
from adform.Credentials import Credentials

setup_id = ""
client_id = ""
client_secret = ""

# optionally can be added into credentials. Written with default values
file = "/tmp/" # for state file
scopes = [
        "https://api.adform.com/scope/buyer.masterdata",
        "https://api.adform.com/scope/eapi",
        "https://api.adform.com/scope/buyer.rtb.lineitem",
    ]
tables = ["Click", "Event", "Impression", "Trackingpoint", "meta"]
start_day=today-8days, # format dd-mm-yyyy
end_day=today,
landing_file = "/tmp/" # for data, can be same as file

persisting_handler = FilePersistingHandler(location=file)
credentials = Credentials(setup_id=setup_id, client_id=client_id, client_secret=client_secret)
client = Client(credentials, persisting_handler)
client.download_masterdata_files_by_id()
```

