twarc2sql

https://img.shields.io/pypi/v/twarc2sql.svg Documentation Status Tests

This package converts jsonl file generated by twarc2 to sql database in an opnionated way.

Features

  • This package converts jsonl file generated by twarc2 to a postgres sql database in an opnionated way.

  • It creates a database with multiple tables that can be found in the documentation & models.py file.

Installation

You can install twarc2sql using pip:

$ pip install twarc2sql

Usage

import twarc2sql

twarc2sql.connect_to_db_and_upload(
    "folderpath/to/jsonl/file",
    "jsonl_file",
    "twarc_task_type",
    "env_file_with_db_information",
)

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.