Unofficial python wrap for AppsFlyer API
Project description
PyAppsFlyer
Unofficial python wrapper for AppsFlyer API.
For working with this application you need to receive API_KEY in your personal account on website.
Getting performance data report
from pyappsflyer.api import PerformanceReport
report = PerformanceReport(api_key='your_api_key',
application_name="your_application_name",
)
report.get_report()
Default report is partners report. If you wish to change and receive another:
from pyappsflyer.api import PerformanceReport
report = PerformanceReport(api_key='your_api_key',
application_name="your_application_name",
)
report.get_report(api_report_name='daily_report')
If report is not listed in available report you will be notified with an Exception. All possible report are listed on application site. Please refer to them.
Report will be returned in python dict() type, so they can be easily transformed into JSON.
All method parameters:
- from_date - from what date to begin, date format - YYYY-MM-DD
- to_date - at what date to end, date format - YYYY-MM-DD
- timezone - timezone for api request, default - Europe/Moscow
- api_report_name - name of the performance report according to api documentation, string
If you want to receive all possible reports, use another method.
from pyappsflyer.api import PerformanceReport
report = PerformanceReport(api_key='your_api_key',
application_name="your_application_name",
)
report.get_reports()
Reports will return in python list() type, so they can be easily transformed into JSON.
Also you could create an .env file with parameters shown below. The file must be near src folder, or it would not be read. Do not put env file inside src folder.
Upon application start this file will be loaded and all additional parameters will be used.
-
APP_FLYER_HOST - host of an AppsFlyer API.
-
APP_FLYER_API_KEY = AppsFlyer API KEY.
-
DEFAULT_DAYS_NUMBER = Number of days for timedelta. Application will try to receive all info for previous days, shown here.
-
DEFAULT_TIMEZONE - default timezone is Europe/Moscow, could be changed. From API docs.
-
DEFAULT_CSV_DELIMETER - default csv files delimeter. From API docs.
-
DEFAULT_CSV_QUOTECHAR - default quotechar delimeter. From API docs.
-
DEFAULT_CSV_ENCODING - default encoding is UTF-8-SIG. From API docs.
If you want to receive other variants of reports there two classes. RawDataReport and TargetingValidationRulesReport These classes could be initialized as shown above.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyappsflyer-0.2.tar.gz
.
File metadata
- Download URL: pyappsflyer-0.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b617ab778dfe9d31d7100d908ea0d8eac9d3bf81b131705e865b83b58fa7835 |
|
MD5 | d84280a416b24f41aaaf2a1e3c11e2b1 |
|
BLAKE2b-256 | 388af5c34d8b4ece4d93d1f41768f18cb6e06d97db90935abe4f7e9a32f91003 |
File details
Details for the file pyappsflyer-0.2-py3-none-any.whl
.
File metadata
- Download URL: pyappsflyer-0.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9c875e3379a35d1b27b3a26bfd7f9bb360c27c6274da868e406edab1da2b1f5 |
|
MD5 | 6f3281957d7cf23c8259a7890bc37cd0 |
|
BLAKE2b-256 | dad9a66c9d5dc13578e3f919bb725c53c98b1523d4d2f5af8d23b2ab4ce46270 |