Skip to content

Commit

Permalink
Add a higher level API. (#323)
Browse files Browse the repository at this point in the history
* Add a higher level API.

Currently, this only supports Sigstore (and only DSSE on verification).
I want to push this now so that people can start playing with it while I
update the Colab demo and try to make the API more uniform and add
support for the missing cases.

With this, the default signing should be as simple as

```
from model_signing import api as model_signing_api

model_signing_api.sign(model_path, signature_path)
```

And verification would be as simple as:

```
from model_signing import api as model_signing_api

model_signing_api.verify(
  model_path, signature_path,
  expected_identity, expected_oidc_provider
)
```

Will think on how to simplify this even further..

Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>

* Handle review comments

Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>

---------

Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>
  • Loading branch information
mihaimaruseac authored Nov 19, 2024
1 parent 4bf6566 commit 76cfac8
Show file tree
Hide file tree
Showing 2 changed files with 584 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/model_signing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""For the stable high-level API, see model_signing.api."""

__version__ = "0.0.2-alpha"
Loading

0 comments on commit 76cfac8

Please sign in to comment.