<commit_before>datafreeze
==========

.. figure:: https://api.travis-ci.org/datafreeze/aleph.png
   :target: https://travis-ci.org/pudo/datafreeze/
   :alt: Build Status

``datafreeze`` creates static extracts of SQL databases for use in interactive
web applications. SQL databases are a great way to manage relational data, but
exposing them on the web to drive data apps can be cumbersome. Often, the
capacities of a proper database are not actually required, a few static JSON
files and a bit of JavaScript can have the same effect. Still, exporting JSON
by hand (or with a custom script) can also become a messy process.

With ``datafreeze``, exports are scripted in a Makefile-like description,
making them simple to repeat and replicate.


Basic Usage
-----------

Calling DataFreeze is simple, the application is called with a
freeze file as its argument:

.. code-block:: bash

    datafreeze Freezefile.yaml

Freeze files can be either written in JSON or in YAML. The database URI
indicated in the Freezefile can also be overridden via the command line:

.. code-block:: bash

    datafreeze --db sqlite:///foo.db Freezefile.yaml
<commit_msg>install instructions<commit_after>datafreeze
==========

.. figure:: https://api.travis-ci.org/datafreeze/aleph.png
   :target: https://travis-ci.org/pudo/datafreeze/
   :alt: Build Status

``datafreeze`` creates static extracts of SQL databases for use in interactive
web applications. SQL databases are a great way to manage relational data, but
exposing them on the web to drive data apps can be cumbersome. Often, the
capacities of a proper database are not actually required, a few static JSON
files and a bit of JavaScript can have the same effect. Still, exporting JSON
by hand (or with a custom script) can also become a messy process.

With ``datafreeze``, exports are scripted in a Makefile-like description,
making them simple to repeat and replicate.


Installation
------------

The easiest way to install ``datafreeze`` is to retrieve it from the Python
package index using ``pip``:

.. code-block:: bash

    pip install datafreeze


Basic Usage
-----------

Calling DataFreeze is simple, the application is called with a
freeze file as its argument:

.. code-block:: bash

    datafreeze Freezefile.yaml

Freeze files can be either written in JSON or in YAML. The database URI
indicated in the Freezefile can also be overridden via the command line:

.. code-block:: bash

    datafreeze --db sqlite:///foo.db Freezefile.yaml

{'fraction_non_alphanumeric': 0.08584035298836742, 'fraction_numerical': 0.0, 'mean_word_length': 3.8053949903660884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1583659', 'n_tokens_mistral': 716, 'n_tokens_neox': 677, 'n_words': 334}