You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All bindings in this repository are generated using
shacl2code at the time the package is
built.
NOTE: The bindings are pretty low level, intended for more directly
manipulating SPDX files. While they are fully functions, they lack higher level
helper functions that may be useful for creating SPDX documents. If you want a
higher level approach, please see the
SPDX Python Tools (however this repo
doesn't yet support SPDX 3)
Installation (PyPi)
python3 -m pip install spdx-python-model
Installation (Git)
If you would like to pull the bindings directly from Git instead of using a
released version from PyPi, the following command can be used:
Note that this will pull the latest version from the main branch. If you want
a specific commit, replace main with the git commit SHA
Usage
Each version of the SPDX spec has a module named v{MAJOR}_{MINOR}_{MICRO}
that contains the bindings for that version under the spdx_python_model top
level. For example:
This repository has support for running tests against the bindings using pytest.
To run the tests, first setup a virtual environment and install the development
variant of the package in editable mode:
To make a new release of this repository, bump the version number found in
src/spdx_python_model/version.py, and merge it into the repo. After this,
make a new release in GitHub with the name v + VERSION, where VERSION
matches the version number specified in version.py (e.g. v1.0.0).
After this, GitHub actions will do the rest to build the package and publish it
to PyPi