semvec/pypi-packages huggingface dataset:
aboutcode.federatedcode 0.1.0
A library for FederatedCode client
Requires Python: >=3.9
Keywords: purl, Package-URL, open source, package, sca, scan, activitypub, dependencies

=======================
aboutcode.federatedcode
=======================

|license| |build| |release|

.. |license| image:: https://img.shields.io/badge/License-Apache--2.0-blue.svg?style=for-the-badge
    :target: https://opensource.org/licenses/Apache-2.0

.. |build| image:: https://img.shields.io/github/actions/workflow/status/aboutcode-org/federatedcode/pypi-release-aboutcode-federatedcode.yml?style=for-the-badge&logo=github

.. |release| image:: https://img.shields.io/pypi/v/aboutcode.federatedcode?style=for-the-badge&logo=pypi&color=%23a569bd
    :target: https://pypi.org/project/aboutcode.federatedcode/
    :alt: PyPI - Version


This is a CLI and library of FederatedCode client utilities for fetching and subscribing to package metadata, and utilities for managing activity streams.

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

To install the FederatedCode client, use the following command:

.. code-block:: bash

    pip install aboutcode.federatedcode


CLI Usage
=========

Use the ``federatedcode`` CLI to discover and fetch scans using the PURL:

.. code-block:: bash

    # Display the general help for federatedcode
    federatedcode --help

    # Display help for a specific command
    federatedcode [command] --help

Example
-------

Discover a PURL in the FederatedCode AP Server:

.. code-block:: bash

    ❯ federatedcode discover pkg:npm/%40angular/animation
    http://<Your-FederatedCode-Host>/purls/@pkg:npm/%2540angular/animation


Library Usage
=============

Use the ``client`` module to fetch scan results, subscribe to packages, or discover packages
in the AP server.

.. code-block:: python

    from aboutcode.federatedcode import client

Use the ``contrib`` module to get the Django mixin and various utilities to manage activity streams.

.. code-block:: python

    from aboutcode.federatedcode.contrib import django

License
=======

Copyright (c) nexB Inc. and others. All rights reserved.

SPDX-License-Identifier: Apache-2.0

See https://aboutcode.org for more information about AboutCode OSS projects.

.. code-block:: none

    You may not use this software except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
unifi-backup 0.2.2
A simple tool to fetch backups from the UniFi Network Application
Requires Python: >=3.10

Usage
=====

**unifi-backup** is a simple tool to fetch configuration backups from
the UniFi Network Application.

Arguments
----------------

``-h``, ``--help``
   show the help message and exit.

``-c FILE``, ``--config FILE``
   the configuration file (default: ``~/.config/unifi-backup/config.yml``)

``-o FILE``, ``--output FILE``
   the output file. The file name can contain ``strftime`` directives. If the argument
   is specified, ``directory``, ``name`` and ``keep`` fields of the configuration
   are ignored.

Configuration file
==================

The ``unifi-backup`` needs a configuration file
(default ``~/.config/unifi-backup/config.yml``). As the file contains secrets,
take care to set reasonable permissions. The file is in
the `YAML <https://yaml.org/>`_ format.

Configuration file
------------------

.. code-block:: yaml

      controller:
         host: unifi
         port: 8443
         user: admin
         password: ...
         site: default
         ssl_verify: true|false|/path/to/custom_cert.pem
      output:
         directory: .
         name: "unifi-%Y%m%d-%H%M.unf"
         keep: 12

All fields except ``password`` are optional.

``host`` is a host name or an IP address. The host has to be the same
as the network application is configured for; using ``unifi`` here
and ``unifi.domain.lan`` won't work.

``name`` specifies the name of the output file. ``strftime`` directives
are allowed.

``keep`` removes all but the most recent ``*.unf`` files from the ``directory``,
that in this case has to be specified and has to be an absolute path.

``directory`` has to already exist. As the backup is not encrypted
and contains secrets the permissions should be set accordingly.

Observability
-------------

The backups done can be exported through prometheus text-file format and consumed
by the node exporter's textfile collector. If the ``metrics`` key exists, the file
is atomically populated after each backup run.

.. code-block:: yaml

    metrics:
        directory: "/var/local/lib/prom_metrics"
        suffix: "my-unifi"

``directory`` is mandatory and specifies the path of the directory passed as the
``--collector.textfile.directory`` for the ``node_exporter``. It has to already exist.
``suffix`` is optional and will be appended to the file name to distinguish metrics
files generated by different configurations. For the above configuration
the full file name will be ``/var/local/lib/prom_metrics/unifi-backup-my-unifi.prom``.
pfsense-backup 0.2.4
A simple tool to fetch backups from the pfSense firewall
Requires Python: >=3.10

Usage
=====

**pfsense-backup** is a simple tool to fetch configuration backups from
the pfSense firewall.

Arguments
----------------

``-h``, ``--help``
   show the help message and exit.

``-c FILE``, ``--config FILE``
   the configuration file (default: ``~/.config/pfsense-backup/config.yml``)

``-o FILE``, ``--output FILE``
   the output file. The file name can contain ``strftime`` directives. If the argument
   is specified, ``directory``, ``name`` and ``keep`` fields of the configuration
   are ignored.

Configuration file
==================

The ``pfsense-backup`` needs a configuration file
(default ``~/.config/pfsense-backup/config.yml``). As the file contains secrets,
take care to set reasonable permissions. The file is in
the `YAML <https://yaml.org/>`_ format.

Configuration file
------------------

.. code-block:: yaml

      pfsense:
         url: https://pfsense
         user: admin
         password: ...
         ssl_verify: true|false|/path/to/custom_cert.pem
      output:
         directory: .
         name: "pfsense-%Y%m%d-%H%M.xml"
         keep: 12

All fields except ``password`` are optional.

``host`` is a host name or an IP address.

``name`` specifies the name of the output file. ``strftime`` directives
are allowed.

``keep`` removes all but the most recent ``*.xml`` files from the ``directory``,
that in this case has to be specified and has to be an absolute path.

``directory`` has to already exist. As the backup is not encrypted
and contains secrets the permissions should be set accordingly.


Observability
-------------

The backups done can be exported through prometheus text-file format and consumed
by the node exporter's textfile collector. If the ``metrics`` key exists, the file
is atomically populated after each backup run.

.. code-block:: yaml

    metrics:
        directory: "/var/local/lib/prom_metrics"
        suffix: "my-pfsense"

``directory`` is mandatory and specifies the path of the directory passed as the
``--collector.textfile.directory`` for the ``node_exporter``. It has to already exist.
``suffix`` is optional and will be appended to the file name to distinguish metrics
files generated by different configurations. For the above configuration
the full file name will be ``/var/local/lib/prom_metrics/pfsense-backup-my-pfsense.prom``.