Skip to content

Commit 3e3623e

Browse files
committed
Update README with installation and usage instruction
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent f2cf177 commit 3e3623e

2 files changed

Lines changed: 58 additions & 4 deletions

File tree

aboutcode/federatedcode/CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Changelog
33

44

55

6-
v0.1.0 (December 12, 2024)
6+
v0.1.0 (December 13, 2024)
77
---------------------------
88

99
- Initial release of the ``aboutcode.federatedcode`` library.

aboutcode/federatedcode/README.rst

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,70 @@
22
aboutcode.federatedcode
33
=======================
44

5-
|license| |build|
5+
|license| |build| |release|
66

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

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
1111

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
1315

1416

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+
1569
License
1670
=======
1771

0 commit comments

Comments
 (0)