Name | sw360 JSON |
Version |
1.8.0
JSON |
| download |
home_page | https://github.com/sw360/sw360python |
Summary | Python interface to the SW360 software component catalogue |
upload_time | 2024-12-02 09:42:17 |
maintainer | None |
docs_url | None |
author | Thomas Graf |
requires_python | <4.0,>=3.8 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<!--
# SPDX-FileCopyrightText: (c) 2019-2024 Siemens
# SPDX-License-Identifier: MIT
-->
# SW360 Base Library for Python
[](https://github.com/sw360/sw360python/blob/master/License.md)
[](https://www.python.org/doc/versions/)
[](https://pypi.org/project/sw360/)
[](https://github.com/sw360/sw360python/actions/workflows/static-checks.yml)
[](https://github.com/sw360/sw360python/actions/workflows/unit-test.yml)
[](https://github.com/sw360/sw360python/actions/workflows/unit-test.yml)
[](https://api.reuse.software/info/git.fsfe.org/reuse/api)
This Python project implements the REST API of [SW360](https://www.eclipse.org/sw360/)
and allows an easy way to interact with SW360.
## Documentation
Have a look at the documentation: https://sw360.github.io/sw360python/
## Usage
### Installation
This project is available as [Python package on PyPi.org](https://pypi.org/project/sw360/).
Install sw360 and required dependencies:
```shell
pip install sw360 requests
```
### Using the API
* Get a REST API token from your SW360 server
* Export required environment variables (optionally but recommended):
```shell
export SW360ProductionToken=<your_api_token>
```
* Start using the API:
```python
import sw360
client = sw360.SW360(sw360_url, sw360_api_token)
```
### Contribute
* All contributions in form of bug reports, feature requests or merge requests!
* Use proper [docstrings](https://realpython.com/documenting-python-code/) to document
functions and classes
* Extend the testsuite **poetry run pytest** with the new functions/classes
* The **documentation website** can automatically be generated by the [Sphinx autodoc extension](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html)
### Build
#### Building the Documentation
The documentation of the project is built using Sphinx:
```python
poetry run sphinx-build ./docs-source/ ./docs/
```
#### Building Python package
For building the library, you need [Poetry](https://python-poetry.org/).
The build is then triggered using
```shell
poetry build
```
This creates the source and wheel files in ```dist/``` subdirectory -- which can then be
uploaded or installed locally using ```pip```.
## Test
Start the complete test suite or a specific test case (and generate coverage report):
```shell
poetry run pytest
```
or
```shell
poetry run coverage run -m pytest
poetry run coverage report -m --omit "*/site-packages/*.py"
poetry run coverage html --omit "*/site-packages/*.py"
```
## Demo
The script ``check_project.py`` shows how to use the library to retrieve some information
of a given project on SW360. This requires colorama>=0.4.1.
## License
Copyright 2019-2024 Siemens
The project is licensed under the MIT license.
SPDX-License-Identifier: MIT
## SBOM
For an up-to-date CycloneDX SBOM, please have a look at the
[SBOM](https://github.com/sw360/sw360python/tree/master/SBOM) folder.
Raw data
{
"_id": null,
"home_page": "https://github.com/sw360/sw360python",
"name": "sw360",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Thomas Graf",
"author_email": "thomas.graf@siemens.com",
"download_url": "https://files.pythonhosted.org/packages/a3/b8/35fa74711bbd9ff86aaa232aa34e0a31e30bba18e9d4dd474801dc2e0b3c/sw360-1.8.0.tar.gz",
"platform": null,
"description": "<!--\n# SPDX-FileCopyrightText: (c) 2019-2024 Siemens\n# SPDX-License-Identifier: MIT\n-->\n\n# SW360 Base Library for Python\n\n[](https://github.com/sw360/sw360python/blob/master/License.md)\n[](https://www.python.org/doc/versions/)\n[](https://pypi.org/project/sw360/)\n[](https://github.com/sw360/sw360python/actions/workflows/static-checks.yml)\n[](https://github.com/sw360/sw360python/actions/workflows/unit-test.yml)\n[](https://github.com/sw360/sw360python/actions/workflows/unit-test.yml)\n[](https://api.reuse.software/info/git.fsfe.org/reuse/api)\n\nThis Python project implements the REST API of [SW360](https://www.eclipse.org/sw360/)\nand allows an easy way to interact with SW360.\n\n## Documentation\n\nHave a look at the documentation: https://sw360.github.io/sw360python/\n\n## Usage\n\n### Installation\n\nThis project is available as [Python package on PyPi.org](https://pypi.org/project/sw360/). \nInstall sw360 and required dependencies:\n\n```shell\n pip install sw360 requests\n ```\n\n### Using the API\n\n* Get a REST API token from your SW360 server\n* Export required environment variables (optionally but recommended):\n\n ```shell\n export SW360ProductionToken=<your_api_token>\n ```\n\n* Start using the API:\n\n ```python\n import sw360\n client = sw360.SW360(sw360_url, sw360_api_token)\n ```\n\n### Contribute\n\n* All contributions in form of bug reports, feature requests or merge requests!\n* Use proper [docstrings](https://realpython.com/documenting-python-code/) to document \n functions and classes\n* Extend the testsuite **poetry run pytest** with the new functions/classes\n* The **documentation website** can automatically be generated by the [Sphinx autodoc extension](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html)\n\n### Build\n\n#### Building the Documentation\n\nThe documentation of the project is built using Sphinx:\n\n```python\npoetry run sphinx-build ./docs-source/ ./docs/\n```\n\n#### Building Python package\n\nFor building the library, you need [Poetry](https://python-poetry.org/). \nThe build is then triggered using\n\n```shell\npoetry build\n```\n\nThis creates the source and wheel files in ```dist/``` subdirectory -- which can then be \nuploaded or installed locally using ```pip```.\n\n## Test\n\nStart the complete test suite or a specific test case (and generate coverage report):\n\n```shell\npoetry run pytest\n```\n\nor\n\n```shell\npoetry run coverage run -m pytest\npoetry run coverage report -m --omit \"*/site-packages/*.py\"\npoetry run coverage html --omit \"*/site-packages/*.py\"\n```\n\n## Demo\n\nThe script ``check_project.py`` shows how to use the library to retrieve some information \nof a given project on SW360. This requires colorama>=0.4.1.\n\n## License\n\nCopyright 2019-2024 Siemens\n\nThe project is licensed under the MIT license.\nSPDX-License-Identifier: MIT\n\n## SBOM\n\nFor an up-to-date CycloneDX SBOM, please have a look at the\n[SBOM](https://github.com/sw360/sw360python/tree/master/SBOM) folder.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python interface to the SW360 software component catalogue",
"version": "1.8.0",
"project_urls": {
"Homepage": "https://github.com/sw360/sw360python",
"Repository": "https://github.com/sw360/sw360python"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1872acdd3faf52550a3beacb56957f868742b940389ecd8370e0fb5b7a7f85e2",
"md5": "225891e3beddcfaed2562082be4b3701",
"sha256": "7c7d83164383a5015aabefe7a701d50bdd960816a18466720f3dfe0ba1933991"
},
"downloads": -1,
"filename": "sw360-1.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "225891e3beddcfaed2562082be4b3701",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 30339,
"upload_time": "2024-12-02T09:42:16",
"upload_time_iso_8601": "2024-12-02T09:42:16.517030Z",
"url": "https://files.pythonhosted.org/packages/18/72/acdd3faf52550a3beacb56957f868742b940389ecd8370e0fb5b7a7f85e2/sw360-1.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a3b835fa74711bbd9ff86aaa232aa34e0a31e30bba18e9d4dd474801dc2e0b3c",
"md5": "5575e4c20128e77ff6d0fad2c46218aa",
"sha256": "713189ecc5abed3bed7fd4b51eca73eeb26dd539b8f188fc858489a96a2cc0e5"
},
"downloads": -1,
"filename": "sw360-1.8.0.tar.gz",
"has_sig": false,
"md5_digest": "5575e4c20128e77ff6d0fad2c46218aa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 20389,
"upload_time": "2024-12-02T09:42:17",
"upload_time_iso_8601": "2024-12-02T09:42:17.615531Z",
"url": "https://files.pythonhosted.org/packages/a3/b8/35fa74711bbd9ff86aaa232aa34e0a31e30bba18e9d4dd474801dc2e0b3c/sw360-1.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-02 09:42:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sw360",
"github_project": "sw360python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sw360"
}