semvec/pypi-packages huggingface dataset:
aws-kms-crypt 3.0.0
Utility for encrypting and decrypting secrets with the AWS KMS service
License: MIT
Requires Python: >=3.8,<4.0

Utility for encrypting and decrypting secrets with the AWS KMS service.

# Installation

Install from PyPI with pip

```bash
pip install aws-kms-crypt
```

# Usage

Requires Python 3.8 or newer.

```python
import kmscrypt

# Encrypting Data
>>> result = kmscrypt.encrypt('secretp4ssw0rd!', key_id='alias/common', encryption_context={
...     'purpose': 'automation'
... })
>>> result
{
    "EncryptedDataKey": "AQIDAHhyrbU/fPcQ+a8pJiYC<snip>",
    "Iv": "689806fe9d571afeffa4c7c24247c766",
    "EncryptedData": "YRjZDQ2KzcEAZqUy7SpWWA==",
    "EncryptionContext": {
        "purpose": "automation"
    }
}

# Decrypting data
>>> kmscrypt.decrypt(result)
b'secretp4ssw0rd!'
```

# Changelog

## v3.0.0 (2024-01-31)

* Dropped Python 3.7 support.

## v2.0.0 (2022-09-15)

* Dropped Python 3.6 support.

## v1.0.0 (2021-09-25)

* Dropped Python 2.7 support.
* Replaced [pycrypto](https://www.dlitz.net/software/pycrypto/) with [cryptography](https://cryptography.io/en/latest/).

# License

MIT
seekablehttpfile 0.1.0
A lazy-loading, seekable, remote file object using http range requests
License: MIT
Requires Python: >=3.7

# seekablehttpfile

This project provides a file-like object that fetches parts of a file using HTTP
range requests as needed.

```pycon
>>> from seekablehttpfile import SeekableHttpFile
>>> from zipfile import ZipFile

>>> f = SeekableHttpFile("https://files.pythonhosted.org/packages/cb/90/599c79a248dcae6935331113649de5d75427e320efde21b583648b498584/tensorflow_intel-2.14.0-cp310-cp310-win_amd64.whl")  # 284MB
>>> # use as normal, for example with ZipFile
>>> z = ZipFile(f)
>>> len(z.namelist())
9414
>>> # find out how much we actually read
>>> f.stats
{'num_requests': 4, 'optimistic_bytes_read': 256000, 'lazy_bytes_read': 1078669, 'satisfied_from_cache': 2}

```

# Version Compatibility

Users of this library should be able to use Python 3.7 or above.  This is
validated by tests, and is the version encoded in `Requires-Python`.

Development requires Python 3.12 (or 3.13), realistically.  CI validates that it
works on 3.10 and above, but you will get less checking in flake8.  Expect older
versions to be dropped as soon as there is a version of mypy, black, etc that is
not simultaneously compatible with all development versions.

Notably, this means that while this project might function (and pass tests) on
Python 3.7, it's likely that you can't typecheck against it.

# License

seekablehttpfile is copyright [Tim Hatch](https://timhatch.com/), and licensed under
the MIT license.  I am providing code in this repository to you under an open
source license.  This is my personal repository; the license you receive to
my code is from me and not from my employer. See the `LICENSE` file for details.