semvec/pypi-packages huggingface dataset:
sbcli-firewall 19.1.6
CLI for managing SimplyBlock cluster


# SBCLI (SimplyBlock CLI)

Simplyblock provides a feature-rich CLI (command line interface) to deploy SimplyBlock Cluster and to manage the SimplyBlock Control plane

## Install

The CLI can be installed using pypi package [sbctl](https://pypi.org/project/sbctl/)

```
pip install --upgrade sbctl
```

# Components

## Simply Block Core
Contains core logic and controllers for the simplyblock cluster

## Simply Block CLI
The list of all the available CLI options can be here [CLI docs](./simplyblock_cli/README.md)

## SimplyBlock Web API

Web app that provides API to manage the cluster. More about this in [README.md](./simplyblock_web/README.md)


### local development

FoundationDB requires a client library (libfdb_c.dylib) for the Python bindings to interact with the database.
Depending on the OS architecture, please install the appropriate version from the official github repo

```
wget https://github.com/apple/foundationdb/releases/download/7.3.3/FoundationDB-7.3.3_arm64.pkg
```
setup the code on a management node and the webApp code can be developed by building the `docker-compose-dev.yml` file.

```
sudo docker compose -f docker-compose-dev.yml up --build -d
```
requiresthat 2025.7.2.0
Support for requirements-assisted development

requiresthat
============

Decorate an instance method with pre- and/or postconditions that must be fulfilled

Example usage
-------------

.. code-block:: python

    from requiresthat import (
        requires,
        RequirementNotFulfilledError,
        APRIORI,
        POSTMORTEM,
        BEFOREANDAFTER,
    )
    class C:

        def __init__(self, data=None):
            self.data = data

        @requires(that='self.data is not None')
        @requires(that='self.data == "spam"', when=APRIORI)
        @requires(that='True is not False')
        @requires(that='self.data != "spam"', when=POSTMORTEM)
        @requires(that='len(self.data) >= 3', when=BEFOREANDAFTER)
        def method(self):
            self.data = 'ham'

    X = C(data='spam')
    X.method()

See the `tests <https://gitlab.com/bedhanger/mwe/-/blob/master/python/requiresthat/tests/test_requiresthat.py>`_
for more.

The ``that`` can be almost any valid Python statement which can be evaluated and whose veracity can
be asserted, and the result thereof will decide whether or not the method fires/will be considered a
success.  Then details should be observed `here
<https://gitlab.com/bedhanger/mwe/-/blob/master/python/requiresthat/src/requiresthat/_requires.py>`_.

The parameter ``when`` decides if the condition is
`a-priori, post-mortem, or before-and-after
<https://gitlab.com/bedhanger/mwe/-/blob/master/python/requiresthat/src/requiresthat/_when.py>`_.
The default is a-priori, meaning a precondition.  Note that before-and-after does *not* mean during;
you cannot mandate an invariant this way!

``RequirementNotFulfilledError`` is the exception you have to deal with in case a condition is not
met.  ``NoCallableConstructError`` gets raised should you apply the decorator to a construct that is
not callable.  Both of these derive from the `base class
<https://gitlab.com/bedhanger/mwe/-/blob/master/python/requiresthat/src/requiresthat/_exceptions.py>`_
``RequirementError``.

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

The `project <https://pypi.org/project/requiresthat/>`_ is on PyPI, so simply run

.. code-block:: bash

    python -m pip install requiresthat

If you want to cook it on your own, do this:

.. code-block:: bash

    git clone https://gitlab.com/bedhanger/mwe.git
    cd mwe/python/requiresthat
    python -m venv --system-site-packages venv
    source venv/bin/activate
    python -m build
    python -m pip install .
    deactivate

It is recommended to carry out the build and install steps in a `venv
<https://docs.python.org/3/library/venv.html>`_.  This is shown in an exemplary manner in the
snipped above that deals with building from scratch.

Running the tests
-----------------

Build the package from scratch like shown above, but do not leave the ``venv`` (i.e., don't call
``deactivate``).  Then

.. code-block:: bash

    python -m pytest --verbose