<commit_before>stormpath-export
================

Easily export your Stormpath user data.


.. image:: https://img.shields.io/pypi/v/stormpath-export.svg
    :alt: stormpath-export Release
    :target: https://pypi.python.org/pypi/stormpath-export

.. image:: https://img.shields.io/pypi/dm/stormpath-export.svg
    :alt: stormpath-export Downloads
    :target: https://pypi.python.org/pypi/stormpath-export

.. image:: https://api.codacy.com/project/badge/grade/d7904abc80dc40a39e8b1850f10000ea
    :alt: stormpath-export Code Quality
    :target: https://www.codacy.com/app/r/stormpath-export

.. image:: https://img.shields.io/travis/stormpath/stormpath-export.svg
    :alt: stormpath-export Build
    :target: https://travis-ci.org/stormpath/stormpath-export

.. image:: https://github.com/rdegges/stormpath-export/raw/master/assets/box-sketch.png
    :alt: Box Sketch


Purpose
-------

`Stormpath`_ is one of my favorite API services. They provide a scalable,
simple, and secure user management API which makes building scalable systems
simple.

Whenever I talk to people about using `Stormpath`_, the same question
invariably comes up: "Is it easy to export my user data out of Stormpath?  Or
am I locked in?"

Up until now, the answer has been "Yes! But only if you contact them about it."

With ``stormpath-export``, however, you can easily back up all your Stormpath
user data instantly!

``stormpath-export`` will:

- Grab all Stormpath data you've stored, and dump it to JSON files locally.
- Dump data into a local directory structure which makes intuitive sense
  (*groups are located in the groups directory, etc.*).
- Each object gets it's own JSON file generated. This makes it easy to look at
  the file system and extract the information you need.

``stormpath-export`` makes it easy to:

- Download a copy of all your user data.
- Back up your user data (*Stormpath has their own backups of course, but you
  can never be too safe*).
- Migrate user data out of Stormpath.


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

Installing ``stormpath-export`` is simple -- just use `pip`_!

Once you have pip installed on your computer, you can run the following to
install the latest release of ``stormpath-export``:

.. code-block:: console

    $ pip install -U stormpath-export

That's it :)


Usage
-----

Before you can export all your `Stormpath`_ data, you'll need to configure
``stormpath-export`` and give it your Stormpath API credentials. To do this,
simply run:

.. code-block:: console

    $ stormpath-export configure

This will prompt you for some basic information, then store your credentials
in the local file ``~/.stormy``.

NOTE: If you are using Stormpath Enterprise, please enter
``https://enterprise.stormpath.io/v1`` when prompted for the Base URL.  This
instructs the export tool to talk to the Stormpath Enterprise environment.

Next, to initiate a backup job, you can run:

.. code-block:: console

    $ stormpath-export

This will export all your Stormpath data, and dump it into a new directory
named ``stormpath-exports``. If you'd like to specify your own backup location,
you can do so by adding a path -- for instance:

.. code-block:: console

    $ stormpath-export ~/Desktop/stormpath-exports

When exporting your data, you should see output similar to the following:

.. code-block:: console

    === Exporting all application data...
    - Exporting application: Stormpath
    === Done!

    === Exporting all directory data...
    - Exporting directory: Stormpath Administrators
    - Exporting directory: testdirectory
    === Done!

    === Exporting all group data...
    - Exporting group: Administrators
    === Done!

    === Exporting all account data...
    - Exporting account: <EMAIL>
    === Done!

.. note::
    Depending on how many applications, groups, directories, organizations, and
    accounts you have, this process may take a while.

Once the process is finished, you can navigate the JSON files in the export
directory, which will contain all your Stormpath data.

For full usage information, run ``stormpath-export -h``:

.. code-block:: console

    $ stormpath-export -h
    stormpath-export
    ----------------

    Easily export your Stormpath (https://stormpath.com/) user data.

    Usage:
      stormpath-export configure
      stormpath-export [(<location> | -l <location> | --location <location>)]
      stormpath-export (-h | --help)
      stormpath-export --version

    Options:
      -h --help  Show this screen.
      --version  Show version.

    Written by <NAME> <http://www.rdegges.com/>.


Help
----

Need help? Can't figure something out? If you think you've found a bug, please
open an issue on the `Github issue tracker`_.

Otherwise, `shoot us an email`_.


Changelog
---------

**0.1.0**: 03-16-2016
<commit_msg>Updating readme.<commit_after>stormpath-export
================

Easily export your Stormpath user data.


.. image:: https://img.shields.io/pypi/v/stormpath-export.svg
    :alt: stormpath-export Release
    :target: https://pypi.python.org/pypi/stormpath-export

.. image:: https://img.shields.io/pypi/dm/stormpath-export.svg
    :alt: stormpath-export Downloads
    :target: https://pypi.python.org/pypi/stormpath-export

.. image:: https://api.codacy.com/project/badge/grade/d7904abc80dc40a39e8b1850f10000ea
    :alt: stormpath-export Code Quality
    :target: https://www.codacy.com/app/r/stormpath-export

.. image:: https://img.shields.io/travis/stormpath/stormpath-export.svg
    :alt: stormpath-export Build
    :target: https://travis-ci.org/stormpath/stormpath-export

.. image:: https://github.com/rdegges/stormpath-export/raw/master/assets/box-sketch.png
    :alt: Box Sketch


Purpose
-------

`Stormpath`_ is one of my favorite API services. They provide a scalable,
simple, and secure user management API which makes building scalable systems
simple.

Whenever I talk to people about using `Stormpath`_, the same question
invariably comes up: "Is it easy to export my user data out of Stormpath?  Or
am I locked in?"

Up until now, the answer has been "Yes! But only if you contact them about it."

With ``stormpath-export``, however, you can easily back up all your Stormpath
user data instantly!

``stormpath-export`` will:

- Grab all Stormpath data you've stored, and dump it to JSON files locally.
- Dump data into a local directory structure which makes intuitive sense
  (*groups are located in the groups directory, etc.*).
- Each object gets it's own JSON file generated. This makes it easy to look at
  the file system and extract the information you need.

``stormpath-export`` makes it easy to:

- Download a copy of all your user data.
- Back up your user data (*Stormpath has their own backups of course, but you
  can never be too safe*).
- Migrate user data out of Stormpath.


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

Installing ``stormpath-export`` is simple -- just use `pip`_!

Once you have pip installed on your computer, you can run the following to
install the latest release of ``stormpath-export``:

.. code-block:: console

    $ pip install -U stormpath-export

That's it :)


Usage
-----

Before you can export all your `Stormpath`_ data, you'll need to configure
``stormpath-export`` and give it your Stormpath API credentials. To do this,
simply run:

.. code-block:: console

    $ stormpath-export configure

This will prompt you for some basic information, then store your credentials
in the local file ``~/.stormy``.

NOTE: If you are using Stormpath Enterprise, please enter
``https://enterprise.stormpath.io/v1`` when prompted for the Base URL.  This
instructs the export tool to talk to the Stormpath Enterprise environment.

Next, to initiate a backup job, you can run:

.. code-block:: console

    $ stormpath-export

This will export all your Stormpath data, and dump it into a new directory
named ``stormpath-exports``. If you'd like to specify your own backup location,
you can do so by adding a path -- for instance:

.. code-block:: console

    $ stormpath-export ~/Desktop/stormpath-exports

When exporting your data, you should see output similar to the following:

.. code-block:: console

    === Exporting all application data...
    - Exporting application: Stormpath
    === Done!

    === Exporting all directory data...
    - Exporting directory: Stormpath Administrators
    - Exporting directory: testdirectory
    === Done!

    === Exporting all group data...
    - Exporting group: Administrators
    === Done!

    === Exporting all account data...
    - Exporting account: <EMAIL>
    === Done!

.. note::
    Depending on how many applications, groups, directories, organizations, and
    accounts you have, this process may take a while.

Once the process is finished, you can navigate the JSON files in the export
directory, which will contain all your Stormpath data.

For full usage information, run ``stormpath-export -h``:

.. code-block:: console

    $ stormpath-export -h
    stormpath-export
    ----------------

    Easily export your Stormpath (https://stormpath.com/) user data.

    Usage:
      stormpath-export configure
      stormpath-export [(<location> | -l <location> | --location <location>)]
      stormpath-export (-h | --help)
      stormpath-export --version

    Options:
      -h --help  Show this screen.
      --version  Show version.

    Written by <NAME> <http://www.rdegges.com/>.


Help
----

Need help? Can't figure something out? If you think you've found a bug, please
open an issue on the `Github issue tracker`_.

Otherwise, `shoot us an email`_.


Changelog
---------

**0.1.1**: 10-17-2016

- Supporting ``--base-url`` argument.
- Making the tool Python 3 compatible.

**0.1.0**: 03-16-2016

{'fraction_non_alphanumeric': 0.11254384155147514, 'fraction_numerical': 0.007839900969671963, 'mean_word_length': 3.2765769739744157, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 22, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7072420', 'n_tokens_mistral': 2927, 'n_tokens_neox': 2756, 'n_words': 1116}