Skip to main content

No project description provided

Project description

https://badge.fury.io/py/fbetl.svg http://img.shields.io/badge/license-MIT-yellow.svg?style=flat https://img.shields.io/badge/contact-Gregology-blue.svg?style=flat

Overview

Extracts, transforms, and loads your Facebook data from the Download Your Information tool into an SQLite DB.

Installation

fbetl is available on PyPI

http://pypi.python.org/pypi/fbetl

Install via pip

$ pip install fbetl

Or via easy_install

$ easy_install fbetl

Or directly from fbetl’s git repo <https://github.com/gregology/fbetl>

$ git clone git://github.com/gregology/fbetl.git
$ cd fbetl
$ python setup.py install

Basic usage

Use Facebook’s Download Your Information tool using the format JSON and unzip the file.

https://user-images.githubusercontent.com/1595448/43995530-f279ef72-9d7c-11e8-833b-522cc0d732f3.png
>>> from fbetl import Fbetl
>>> fbetl = Fbetl('path/to/unzipped/facebook-user/data')
>>> fbetl.load_all()
>>> fbetl.sql('SELECT COUNT(*) FROM comments')[0][0]
5000
>>> fbetl.sql('SELECT timestamp FROM posts LIMIT 5;')
[('2018-07-27 14:04:24',), ('2018-07-23 11:34:12',), ('2018-07-17 09:47:19',), ('2018-07-13 23:56:44',), ('2018-07-12 09:54:13',)]
>>> fbetl.save('foo.db') # Saves SQLite db to disk

Running Test

$ python tests/tests.py

Python compatibility

Developed for Python 3. May work but not tested in Python 2.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fbetl-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file fbetl-0.1.2.tar.gz.

File metadata

  • Download URL: fbetl-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.0

File hashes

Hashes for fbetl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fd093bb3360c3fd4c02b14170b23646439d89872ac6d911bf6d1049bb9dc9395
MD5 1e3516388f27e29cd57d0e9eefddb742
BLAKE2b-256 40119b98688a4b6395e9189e436f8c4aaeaf38e59057c9ba0fde00298b4b7f97

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page