semvec/pypi-packages huggingface dataset:
xbwt 0.0.7
Construction of the xbw transform
Keywords: python,xbwt,compression and indexing of labeled trees

# XBWT
[![PyPI version](https://badge.fury.io/py/xbwt.svg)](https://pypi.org/project/xbwt/)

This library allows to compute the xbwt transform. The following link refers to the article in which it was defined: https://www.semanticscholar.org/paper/Compressing-and-indexing-labeled-trees%2C-with-Ferragina-Luccio/8c4f49913e8db00dc09c31af480bf4dc37a853d9.

## Documentation

https://htmlpreview.github.io/?https://github.com/dolce95/xbw-transform/blob/main/doc/xbwt.html

## Installation

```bash
pip install xbwt
```

## Usage from Python as a module
It is possible to use `xbwt` directly in a python script by import it.

```python
import xbwt

xbwt_obj = xbwt.readAndImportTree(r'C:\Users\dolce\OneDrive\Desktop\tree.txt')
xbwt = xbwt_obj.computeXBWT()
xbwt_obj.printXBWT(xbwt)

"""
*** XBW TRANSFORM OF THE TREE T *** 

[S_LAST, S_ALPHA]

[0, ['A', 0]]
[0, ['C', 0]]
[0, ['D', 0]]
[1, ['D', 0]]
[1, ['a', 1]]
[1, ['a', 1]]
[1, ['c', 1]]
[0, ['C', 0]]
[0, ['a', 1]]
[1, ['B', 0]]
[1, ['b', 1]]
[1, ['E', 0]]
[0, ['B', 0]]
[0, ['a', 1]]
[1, ['B', 0]]
[1, ['c', 1]]
"""
```

## Input format

The trees to be imported to build the xbw transform must comply with the format below. In particular, nodes must be specified through the [NODE] ... [\NODE] tag. It is important that the root node has the identifier "root" in its definition. Instead, the edges are specified via the [EDGE] ... [\EDGES] tag. In the latter case, for each node it is necessary to insert the respective nodes with which the edge is formed in the respective order.

```
[NODES]
root = 'label1'
n1 = 'label2'
n2 = 'label3'
n3 = 'label4'
n4 = 'label5'
[\NODES]

[EDGES]
root = [n1, n2]
n1 = [n3, n5]
[\EDGES]
```
aws-nsm-interface-verifiably 1.0.1
Native Python interface for the AWS Nitro Secure Module (NSM)
Requires Python: >=3.6

# AWS Nitro Secure Module (NSM) interface in native Python 

This library offers a native Python interface to the `/dev/nsm` device in AWS Nitro Enclaves. This is an updated version from [aws-nsm-interface](https://github.com/donkersgoed/aws-nsm-interface).

## Installation
To install `aws_nsm_interface_verifiably`, run:

```
pip install aws_nsm_interface_verifiably
```

### Requirements
* To install: python>=3.6
* To run: a Python application running in an AWS Nitro Enclave

## Quickstart
```python
import base64
import aws_nsm_interface_verifiably

file_desc = aws_nsm_interface_verifiably.open_nsm_device()

rand_bytes = aws_nsm_interface_verifiably.get_random(file_desc, 12) # Get 12 random bytes from /dev/nsm
print(rand_bytes)

public_rsa_key = b'1234' # An RSA public key exported as DER

attestation_doc = aws_nsm_interface_verifiably.get_attestation_doc(
    file_desc,
    public_key=public_rsa_key
)['document']

attestation_doc_b64 = base64.b64encode(attestation_doc).decode('utf-8')

aws_nsm_interface_verifiably.close_nsm_device(file_desc)

# Use `attestation_doc_b64` in your AWS KMS Decrypt call
```