Metadata-Version: 2.1
Name: yopass-api
Version: 0.0.4
Summary: This module will allow you to use Python and Yopass in automation projects
Home-page: https://github.com/silyashevich/yopass_api
Author: Sergey Ilyashevich
Author-email: silyashevich@gmail.com
License: UNKNOWN
Keywords: yopass,api,cryptography
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PGPy (>=0.6.0)
Requires-Dist: requests (>=2.28.2)

# yopass_api

This is a module to work with a (the) [Yopass](https://github.com/jhaals/yopass) backend created by [Johan Haals](https://github.com/jhaals).
This module will allow you to use Python and Yopass in automation projects.

## Installing

```py
pip install yopass_api
```

## Basic Example

This is a basic example of store secret, get link and fetch secret:

```py
from yopass_api import Yopass

yopass = Yopass(api="http://your.yopass.backend:1024")
secret_password = yopass.generate_passphrase(length=5)
secret_id = yopass.store(
    message="test",
    password=secret_password,
    expiration="1w",
    one_time=False,
)
secret_url = yopass.secret_url(secret_id=secret_id, password=secret_password)
print(secret_url)
message = yopass.fetch(secret_id=secret_id, password=secret_password)
print(message)

```


