Skip to content

Commit f8d71cb

Browse files
committed
feat(python): update readme
1 parent daec9b8 commit f8d71cb

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

lakers-python/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "lakers-python"
2+
name = "lakers-python" # this will be the name of the package on pypi
33
edition = "2021"
4-
version ="0.1.0"
4+
version ="0.1.2"
55
repository.workspace = true
66
license.workspace = true
77

@@ -14,5 +14,5 @@ lakers-shared = { path = "../shared", features = ["python-bindings"] }
1414
lakers-crypto = { path = "../crypto", default-features = false, features = ["rustcrypto"] }
1515

1616
[lib]
17-
name = "lakers" # this will be the name of the python package, and it must match the module name in lib.rs
17+
name = "lakers" # this will be the name of the python package (as in `import lakers`), and it must match the module name in lib.rs
1818
crate-type = ["cdylib"]

lakers-python/README.md

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,36 @@
11
# Lakers Python
2-
Python wrapper for the `lakers` crate.
2+
Python wrapper for the [`lakers` crate](https://github.com/openwsn-berkeley/lakers).
3+
4+
# Installation and usage
5+
6+
```console
7+
pip install lakers-python
8+
```
9+
10+
```python
11+
import lakers
12+
13+
# generate a keypair
14+
lakers.p256_generate_key_pair()
15+
16+
# instantiate a initiator and prepare EDHOC's message 1
17+
initiator = lakers.EdhocInitiator()
18+
message_1 = initiator.prepare_message_1(c_i=None, ead_1=None)
19+
20+
# for more examples, see the tests in the repository
21+
```
22+
23+
# Development
324

425
To build and test:
526
```bash
627
maturin develop
728
pytest
829
```
930

10-
# Requirements
31+
## Requirements
32+
33+
The maturin executable must be available. The recommended way is to install and use it in a virtual environment:
1134

1235
```
1336
python3 -m venv .venv

0 commit comments

Comments
 (0)