From 673b94a7940d4f01d1bb6f69386bf56c9b47f591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Sat, 24 Aug 2024 21:19:36 +0200 Subject: [PATCH] Pre-release 0.4: support for Crypt4GH header. - add example usage to documentation - update version to 0.4 - ensure packet_header documentation is generated --- docs/implementation.md | 2 ++ docs/index.md | 12 ++++++++++++ pyproject.toml | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/implementation.md b/docs/implementation.md index 31f1b37..d7d186c 100644 --- a/docs/implementation.md +++ b/docs/implementation.md @@ -22,4 +22,6 @@ Crypt4GH Container ::: oarepo_c4gh.crypt4gh.header +::: oarepo_c4gh.crypt4gh.header_packet + ::: oarepo_c4gh.crypt4gh.util diff --git a/docs/index.md b/docs/index.md index 21cd1d4..916aaa9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -45,3 +45,15 @@ Once the key is loaded, one can always obtain its public part: print(my_key.get_public_key()) print(my_secret_key.get_public_key()) ``` + +### Loading Crypt4GH Containers + +With secret key loaded, initializing Crypt4GH container for reading +with actual container data is straightforward: + +```python +from oarepo_c4gh import Crypt4GH + +with open("hello.txt.c4gh") as f: + crypt4gh = Crypt4GH(my_secret_key, f) +``` diff --git a/pyproject.toml b/pyproject.toml index 4ea72be..af56161 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "oarepo_c4gh" -version = "0.3" +version = "0.4" authors = [ { name = "Dominik Pantůček", email = "dominik.pantucek@trustica.cz" } ]