Code Monkey home page Code Monkey logo

localytics's Introduction

Python Client for Localytics Raw Data Export

This is a Python API Client for Localytics Raw Data Export. It allows to export all events and sessions captured by Localytics. Data is written in JSON and available on hourly basis as log files.

Installation

The client is currently best installed via Pypi:

    $ pip install localytics

Usage

Let's have a walk through the functionalities through a couple of examples. Start by loading the library.

    >>> from localytics import Localytics

Setup and Authentication

In order for you to download Localytics events, you need to authenticate with using api_key and api_secret. Once you supply it, it will be used throughout the entire session.

    >>> l = Localytics(api_key = 'XXXXX', api_secret= 'YYYYY')

Download Data

There is a method download_data that downloads data to local folder. Example shows how to export data for last 2 days:

    >>> l.download_data(
            app_ids = ['AAAAA', 'BBBBB'],
            start_date = datetime.today() - timedelta(2),
            end_date = datetime.today()
        )

You can also specify optional parameters. This is more complex example:

    >>> l.download_data(
        app_ids = ['AAAAA', 'BBBBB'],
        start_date = datetime.today() - timedelta(2),
        end_date = datetime.today(),
        destination_folder = 'data',
        compressed=True
    )

On default data are stored in localytics_data folder and compressed in gz format. Please set compressed = False if you want to store data decompressed.

Contributions and bug reports.

Contributions and bug reports are only acceptable as GitHub Pull Requests and issues. Thanks!

localytics's People

Contributors

lexadavid avatar

Stargazers

 avatar

Watchers

 avatar  avatar

localytics's Issues

Empty Log Files

When I run this, it gives me back tons of blank log files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.