Metadata-Version: 2.1
Name: datapunt-objectstore
Version: 2020.9.7
Summary: Datapunt Amsterdam objectstore module
Home-page: https://github.com/amsterdam/objectstore
Author: Datapunt Amsterdam
Author-email: datapunt@amsterdam.nl
License: Mozilla Public License Version 2.0
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Requires-Dist: python-dateutil
Requires-Dist: python-swiftclient
Requires-Dist: datapunt-config-loader
Requires-Dist: python-keystoneclient
Provides-Extra: dev
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: pylint ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Provides-Extra: docs
Requires-Dist: sphinx ; extra == 'docs'
Requires-Dist: sphinx-autobuild ; extra == 'docs'
Requires-Dist: sphinx-rtd-theme ; extra == 'docs'

Datapunt Objectstore Libary
===============================================

.. image:: https://img.shields.io/badge/python-3.6%2C%203.5%2C%203.6-blue.svg
    :target: https://www.python.org/

.. image:: https://img.shields.io/badge/license-MPLv2.0-blue.svg
    :target: https://www.mozilla.org/en-US/MPL/2.0/

---------------------

Objecstore Libary
-----------------

.. code-block:: bash

    $ pip install datapunt-objectstore

Contains common used objectstore code for our API's.

During import / ETL tasks we offten use data uploaded to the objecstore
from data sources.

Contributing
------------

Found a bug or want to work on the code? You can branch the `repository on
GitHub <https://github.com/Amsterdam/objectstore>`_ or file an issue at its
`issue tracker <https://github.com/Amsterdam/objectstore/issues>`_.


1. Install the dev dependencies in your virtual environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash

    $ pip install --upgrade setuptools
    $ python setup.py install develop

The `setuptools` pakage must be upgraded (as shown above) because the version
that is pre-packaged with Python 3.6 causes problems when running the tests.

When you get a PYTHONPATH error, use the install-dir argument:

.. code-block:: bash

    $ python setup.py install develop --install-dir venv/lib/python3.6/site-packages

2. Run the tests
^^^^^^^^^^^^^^^^

The test suite and test coverage are run as follows:

.. code-block:: bash

    $ python setup.py test

The Python style checker Flake8 can be run as follows:

.. code-block:: bash

    $ python setup.py flake8


3. Example configuration and usage
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash

    python -m objecstore.databasedumps /backups/postgres.dump objectstore_dir --upload-db

uploads given dump with a date and environment informtion to objectstore


.. code-block:: bash

    python -m objecstore.databasedumps downloaddir objectstore_dir --download-db

Dowload latest dump with the name `database.environment.latestdate.dump` from given environmnet
with from location directory in objectstore.
- WILL DELETE OLD DUMPS more then 20 days old.



