{"id":48607463,"url":"https://github.com/fossology/fossology-python","last_synced_at":"2026-04-09T00:12:03.078Z","repository":{"id":36474509,"uuid":"221675060","full_name":"fossology/fossology-python","owner":"fossology","description":"Python wrapper for the Fossology API","archived":false,"fork":false,"pushed_at":"2026-02-23T16:55:20.000Z","size":3631,"stargazers_count":15,"open_issues_count":4,"forks_count":13,"subscribers_count":18,"default_branch":"main","last_synced_at":"2026-02-23T18:26:32.655Z","etag":null,"topics":["automation","fossology","oss-clearing"],"latest_commit_sha":null,"homepage":"https://fossology.github.io/fossology-python","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fossology.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-14T10:51:23.000Z","updated_at":"2026-02-23T16:54:40.000Z","dependencies_parsed_at":"2023-12-19T17:12:08.882Z","dependency_job_id":"65a46c53-0bcd-4940-80e2-d72aa8ac8ee6","html_url":"https://github.com/fossology/fossology-python","commit_stats":{"total_commits":237,"total_committers":6,"mean_commits":39.5,"dds":"0.24472573839662448","last_synced_commit":"edb3f718f85e3baa41aa24a69ceebbccc9067ea1"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/fossology/fossology-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossology%2Ffossology-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossology%2Ffossology-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossology%2Ffossology-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossology%2Ffossology-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fossology","download_url":"https://codeload.github.com/fossology/fossology-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossology%2Ffossology-python/sbom","scorecard":{"id":407755,"data":{"date":"2025-08-11","repo":{"name":"github.com/fossology/fossology-python","commit":"44618ec73b946abfb5138cecffe8b4b973f7ee38"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Maintained","score":10,"reason":"17 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 2/16 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/semantic-release.yml:15","Warn: no topLevel permission defined: .github/workflows/doc-deploy.yml:1","Warn: no topLevel permission defined: .github/workflows/foss_cli_tests.yml:1","Warn: no topLevel permission defined: .github/workflows/fossologytests.yml:1","Warn: no topLevel permission defined: .github/workflows/semantic-release.yml:1","Warn: no topLevel permission defined: .github/workflows/staticchecks.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/doc-deploy.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/doc-deploy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/doc-deploy.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/doc-deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/foss_cli_tests.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/foss_cli_tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/fossologytests.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/fossologytests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/semantic-release.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/semantic-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/semantic-release.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/semantic-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/semantic-release.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/semantic-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/semantic-release.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/semantic-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/staticchecks.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/fossology/fossology-python/staticchecks.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/doc-deploy.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/doc-deploy.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/foss_cli_tests.yml:35","Warn: pipCommand not pinned by hash: .github/workflows/fossologytests.yml:35","Warn: pipCommand not pinned by hash: .github/workflows/staticchecks.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/staticchecks.yml:29","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/semantic-release.yml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T21:49:28.557Z","repository_id":36474509,"created_at":"2025-08-18T21:49:28.557Z","updated_at":"2025-08-18T21:49:28.557Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","fossology","oss-clearing"],"created_at":"2026-04-09T00:12:02.572Z","updated_at":"2026-04-09T00:12:03.067Z","avatar_url":"https://github.com/fossology.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"|License| |PyPI Version| |Python Version| |Downloads| |Static Checks| |Fossology Tests| |Coverage|\n\n.. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg\n   :target: https://github.com/fossology/fossology-python/blob/main/LICENSE.md\n\n.. |PyPI Version| image:: https://badge.fury.io/py/fossology.svg\n   :target: https://pypi.org/project/fossology\n\n.. |Python Version| image:: https://img.shields.io/badge/python-3.11%2C3.12-blue?logo=python\n   :target: https://www.python.org/doc/versions/\n\n.. |Downloads| image:: https://static.pepy.tech/badge/fossology\n   :target: https://pepy.tech/project/fossology\n\n.. |Static Checks| image:: https://github.com/deveaud-m/fossology-python/workflows/Static%20Checks/badge.svg\n   :target: https://github.com/deveaud-m/fossology-python/actions?query=workflow%3A%22Static+Checks%22\n\n.. |Fossology Tests| image:: https://github.com/deveaud-m/fossology-python/workflows/API%20Tests/badge.svg\n   :target: https://github.com/deveaud-m/fossology-python/actions?query=workflow%3A%22API+Tests%22\n\n.. |Coverage| image:: https://codecov.io/gh/fossology/fossology-python/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/fossology/fossology-python\n   \n\nA simple wrapper for the Fossology REST API.\n\nSee `the OpenAPI specification \u003chttps://raw.githubusercontent.com/fossology/fossology/master/src/www/ui/api/documentation/openapi.yaml\u003e`_ used to implement this library.\n\nCurrent release is compatible with **Fossology version 4.4.0** - API version 1.6.1 (not all endpoints are supported)\n\n   `See release notes \u003chttps://github.com/fossology/fossology-python/releases\u003e`_ for all details.\n\n   If you miss an API Endpoint, please open a new issue or contribute a pull request.\n\n   API v2 is partially supported too, however the specification is not stable yet and not all endpoints are supported.\n\nDocumentation\n=============\n\nSee `fossology-python on Github Pages \u003chttps://fossology.github.io/fossology-python\u003e`_.\n\nUsage\n=====\n\nInstallation\n------------\n\nThis project is available as `Python package on PyPi.org \u003chttps://pypi.org/project/fossology/\u003e`_.\n\n-  Install fossology and required dependencies:\n\n   .. code:: shell\n\n      pip install fossology requests\n\nUsing the API\n-------------\n\n-  Get a REST API token either from the Fossology server under **``User-\u003eEdit user account``** or generate a token using the method available in this library:\n\n   .. code:: python\n\n      from fossology import fossology_token\n      from fossology.enum import TokenScope\n\n      FOSSOLOGY_SERVER = \"https://fossology.example.com/repo\" # Note the absence of the trailing slash, otherwise the token generation will fail\n      FOSSOLOGY_USER = \"fossy\"\n      FOSSOLOGY_PASSWORD = \"fossy\"\n      TOKEN_NAME = \"fossy_token\"\n\n      # By default version v1 of the token generation API will be used\n      token = fossology_token(\n            FOSSOLOGY_SERVER,\n            FOSSOLOGY_USER,\n            FOSSOLOGY_PASSWORD,\n            TOKEN_NAME,\n            TokenScope.WRITE\n            version=\"v1\"\n      )\n\n-  Start using the API:\n\n   .. code:: python\n\n      from fossology import Fossology\n\n      # By default version v1 of the API will be used\n      foss = Fossology(FOSSOLOGY_SERVER, token, FOSSOLOGY_USER, version=\"v1\")\n      print(f\"Logged in as user {foss.user.name}\")\n\n\nUsing the CLI\n-------------\n\nFossology Python also offers a command line interface to simplify interactions with your Fossology server.\n\n- To get a list of available commands, run:\n\n   .. code:: bash\n\n      $ foss_cli --help\n      Usage: foss_cli [OPTIONS] COMMAND [ARGS]...\n\n- Generate a configuration file:\n\n   .. code:: bash\n\n      $ foss_cli config\n      Enter the URL to your Fossology server: e.g. http://fossology/repo\n      Fossology URL: http://fossology/repo\n      Enter Username and Password: e.g. fossy/fossy (in the default environment)\n      Username: fossy\n      Password: \n      Enter a scope for your Fossology token: either 'read' or 'write'\n      Token scope: write\n\n   This will get a token from Fossology server and store it within the local ``.foss_cli.ini`` file. \n\n   On subsequent foss_cli calls those values will be reused.\n\n   Re-run the config command to **create a new token** once it expired.\n\n- Verbosity of all foss_cli commands could be increased using the ``-v`` verbosity option:\n\n   .. code:: bash\n\n      $ foss_cli -vv [COMMAND]\n\n   This runs the given command with verbosity level 2 (all debug statements will be logged).\n\n   A log file in directory ``.foss_cli_results`` named ``.foss_cli.log`` will be created.\n\n- To create a group:\n\n   .. code:: bash\n\n      $ foss_cli -vv create_group FossGroup\n\n- To create a a folder:\n\n   .. code:: bash\n\n      $ foss_cli -vv create_folder FossFolder \\\n         --folder_group FossGroup \\\n         --folder_description \"Description of FossFolder\"\n\n- To upload a file:\n\n   .. code:: bash\n\n      $ foss_cli -vv upload_file tests/files/zlib_1.2.11.dfsg-0ubuntu2.debian.tar.xz \\\n            --folder_name FossFolder\n            --access_level public\n\n- To upload a source package to the server and initialize a scan workflow including report generation:\n\n   .. code:: bash\n\n      $ foss_cli -vv start_workflow --help \n      Usage: foss_cli start_workflow [OPTIONS] FILE_NAME\n      The foss_cli start_workflow command.\n      Options:\n            --folder_name TEXT            The name of the folder to upload to.\n            --file_description TEXT       The description of the upload.\n            --dry_run / --no_dry_run      Do not upload but show what would be done.\n                                          Use -vv to see output.\n            --reuse_newest_upload / --no_reuse_newest_upload\n                                          Reuse newest upload if available.\n            --reuse_newest_job / --no_reuse_newest_job\n                                          Reuse newest scheduled job for the upload if\n                                          available.\n            --report_format TEXT          The name of the reportformat. [dep5,\n                                          spdx2,spdxtv,readmeoss,unifiedreport,\n                                          clixml,spdx3json,spdx3rdf,spdx3jsonld]\n            --access_level TEXT           The access level of the\n                                          upload.[private,protected,public]\n            --help                        Show this message and exit.\n\nContribute\n==========\n\nDevelop\n-------\n\n-  All contributions in form of bug reports, feature requests or merge requests!\n\n-  Use proper\n   `docstrings \u003chttps://realpython.com/documenting-python-code/\u003e`__ to\n   document functions and classes\n\n-  Extend the testsuite **poetry run pytest** with the new functions/classes\n\n-  The **documentation website** can automatically be generated by the `Sphinx autodoc\n   extension \u003chttp://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html\u003e`_\n\n**HINT**\n\n   To avoid running the whole testsuite during development of a new branch with changing only touching the code related\n   to the CLI, name your branch ``feat/cli-{something}`` and only the ``test_foss_cli_*`` will run in the pull request context.\n\nBuild\n-----\n\n- You can build the PyPi package using `poetry \u003chttps://poetry.eustace.io/\u003e`_:\n\n  .. code:: shell\n\n    poetry build\n\n- Build documentation:\n\n  The static site is generated automatically by\n  `GitHub Actions \u003chttps://github.com/fossology/fossology-python/actions/workflows/doc-deploy.yml\u003e`_\n  on every merge to main branch and pushed to **gh-pages** branch. The action uses\n  `JamesIves/github-pages-deploy-action \u003chttps://github.com/JamesIves/github-pages-deploy-action\u003e`_\n  to deploy the static pages.\n\n  To build it locally\n\n  .. code:: shell\n\n     poetry run sphinx-build -b html docs-source docs/\n\n- Cleanup builds:\n\n  .. code:: shell\n\n     rm -r dist/ docs/\n\nTag\n---\n\nEach new release gets a new tag with important information about the changes added to the new release:\n\n.. code:: shell\n\n   git tag -a vx.x.x -m \"New major/minor/patch release x.x.x\"\n   git push origin vx.x.x\n\nAdd required information in the corresponding `release in the Github project \u003chttps://github.com/fossology/fossology-python/releases\u003e`_.\n\nPublish\n-------\n\nPublish the newest release to PyPi (visit https://pypi.org/manage/account/#api-tokens to get the token):\n\n.. code:: shell\n\n   poetry publish --build --username __token__ --password $PYPI_TOKEN\n\nTest\n----\n\nThe testsuite available in this project expects a running Fossology instance under the hostname **fossology** with the default admin user \"fossy\".\n\n- Use the latest Fossology container from `Docker hub \u003chttps://hub.docker.com/r/fossology/fossology\u003e`_:\n\n  .. code:: shell\n\n    docker pull fossology/fossology\n    tar xJf tests/files/base-files_11.tar.xz -C /tmp\n    docker run --mount src=\"/tmp\",dst=/tmp,type=bind --name fossology -p 80:80 fossology/fossology\n\n- Start the complete test suite or a specific test case (and generate coverage report):\n\n  .. code:: shell\n\n     poetry run coverage run --source=fossology -m pytest\n     poetry run coverage report -m\n     poetry run coverage html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffossology%2Ffossology-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffossology%2Ffossology-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffossology%2Ffossology-python/lists"}