Metadata-Version: 2.1
Name: pyprotonrebar
Version: 0.0.1
Summary: Interact with the RackN Digital Rebar API
Home-page: https://github.com/ProtonMail/pyprotonrebar
Author: Sorin-Alexandru Paduraru
Author-email: spaduraru@proton.ch
License: Apache-2.0
Project-URL: Changelog, https://github.com/ProtonMail/pyprotonrebar/blob/master/CHANGELOG.rst
Project-URL: Issue Tracker, https://github.com/ProtonMail/pyprotonrebar/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: jsonpatch>=1.33
Requires-Dist: requests>=2.31.0

========
Overview
========

Interact with the RackN Digital Rebar API (in a way that's useful *to
us*).

* Free software: Apache Software License 2.0

Installation
============

::

    pip install pyprotonrebar

You can also install the in-development version with::

    pip install git+ssh://git@github.com/ProtonMail/pyprotonrebar.git@main

Documentation
=============


While primarily intended as common code for
https://github.com/ProtonMail/proton.rackndr, it can also be used as is.

For example, to use the project to create a new Param:

.. code-block:: python

    import pyprotonrebar.pyrackndr
    TOKEN = pyprotonrebar.pyrackndr.fetch_token_requests(
        'superuser',
        'user:pass',
        'https://localhost:8092')
    AUTH = TOKEN['header']

    rebar_object = pyprotonrebar.pyrackndr.RackNDr(
        'https://localhost:8092',
        AUTH,
        'params')

    data = pyprotonrebar.CONSTANTS['params'].copy()
    data['Description'] = 'new-param description goes here'
    data['Documentation'] = 'new-param documentation goes here'
    data['Name'] = 'new-param'
    data['Secure'] = False
    data['Schema'] = {
      'type': 'string',
      'default': 'hello'
    }

    rebar_object.create(data)


Development
===========

To run all the tests run::

    tox

Note, to combine the coverage data from all the tox environments run:

.. list-table::
    :widths: 10 90
    :stub-columns: 1

    - - Windows
      - ::

            set PYTEST_ADDOPTS=--cov-append
            tox

    - - Other
      - ::

            PYTEST_ADDOPTS=--cov-append tox


Changelog
=========

0.0.0 (2024-02-01)
------------------

* First release on PyPI.
