|
2 | 2 | aboutcode.federatedcode |
3 | 3 | ======================= |
4 | 4 |
|
5 | | -|license| |build| |
| 5 | +|license| |build| |release| |
6 | 6 |
|
7 | 7 | .. |license| image:: https://img.shields.io/badge/License-Apache--2.0-blue.svg?style=for-the-badge |
8 | 8 | :target: https://opensource.org/licenses/Apache-2.0 |
9 | 9 |
|
10 | | -.. |build| image:: https://img.shields.io/github/actions/workflow/status/aboutcode-org/federatedcode/main.yml?style=for-the-badge&logo=github |
| 10 | +.. |build| image:: https://img.shields.io/github/actions/workflow/status/aboutcode-org/federatedcode/pypi-release-aboutcode-federatedcode.yml?style=for-the-badge&logo=github |
11 | 11 |
|
12 | | -This is a library of FederatedCode client utilities to fetch and subscribe package metadata. |
| 12 | +.. |release| image:: https://img.shields.io/pypi/v/aboutcode.federatedcode?style=for-the-badge&logo=pypi&color=%23a569bd |
| 13 | + :target: https://pypi.org/project/aboutcode.federatedcode/ |
| 14 | + :alt: PyPI - Version |
13 | 15 |
|
14 | 16 |
|
| 17 | +This is a CLI and library of FederatedCode client utilities for fetching and subscribing to package metadata, and utilities for managing activity streams. |
| 18 | + |
| 19 | +Installation |
| 20 | +============ |
| 21 | + |
| 22 | +To install the FederatedCode client, use the following command: |
| 23 | + |
| 24 | +.. code-block:: bash |
| 25 | +
|
| 26 | + pip install aboutcode.federatedcode |
| 27 | +
|
| 28 | +
|
| 29 | +CLI Usage |
| 30 | +========= |
| 31 | + |
| 32 | +Use the ``federatedcode`` CLI to discover and fetch scans using the PURL: |
| 33 | + |
| 34 | +.. code-block:: bash |
| 35 | +
|
| 36 | + # Display the general help for federatedcode |
| 37 | + federatedcode --help |
| 38 | +
|
| 39 | + # Display help for a specific command |
| 40 | + federatedcode [command] --help |
| 41 | +
|
| 42 | +Example |
| 43 | +------- |
| 44 | + |
| 45 | +Discover a PURL in the FederatedCode AP Server: |
| 46 | + |
| 47 | +.. code-block:: bash |
| 48 | +
|
| 49 | + ❯ federatedcode discover pkg:npm/%40angular/animation |
| 50 | + http://<Your-FederatedCode-Host>/purls/@pkg:npm/%2540angular/animation |
| 51 | +
|
| 52 | +
|
| 53 | +Library Usage |
| 54 | +============= |
| 55 | + |
| 56 | +Use the ``client`` module to fetch scan results, subscribe to packages, or discover packages |
| 57 | +in the AP server. |
| 58 | + |
| 59 | +.. code-block:: python |
| 60 | +
|
| 61 | + from aboutcode.federatedcode import client |
| 62 | +
|
| 63 | +Use the ``contrib`` module to get the Django mixin and various utilities to manage activity streams. |
| 64 | + |
| 65 | +.. code-block:: python |
| 66 | +
|
| 67 | + from aboutcode.federatedcode.contrib import django |
| 68 | +
|
15 | 69 | License |
16 | 70 | ======= |
17 | 71 |
|
|
0 commit comments