# yopass_api
[![codecov](https://codecov.io/github/silyashevich/yopass_api/branch/main/graph/badge.svg?token=YDY235VL6Q)](https://codecov.io/github/silyashevich/yopass_api)
![PyPI - Downloads](https://img.shields.io/pypi/dm/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 self-hosted 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="https://api.yopass.se")
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)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/silyashevich/yopass_api",
"name": "yopass-api",
"maintainer": "Sergey Ilyashevich",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "silyashevich@gmail.com",
"keywords": "api,cryptography,yopass",
"author": "Sergey Ilyashevich",
"author_email": "silyashevich@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/0d/49/164679c7f5dd7ca67f4173daca6fa2ebb952dc650f60eee88ed48687ad14/yopass_api-0.0.8.tar.gz",
"platform": null,
"description": "# yopass_api\n\n[![codecov](https://codecov.io/github/silyashevich/yopass_api/branch/main/graph/badge.svg?token=YDY235VL6Q)](https://codecov.io/github/silyashevich/yopass_api)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/yopass_api)\n\nThis is a module to work with a (the) [Yopass](https://github.com/jhaals/yopass) backend created by [Johan Haals](https://github.com/jhaals).\nThis module will allow you to use Python and self-hosted Yopass in automation projects.\n\n## Installing\n\n```py\npip install yopass_api\n```\n\n## Basic Example\n\nThis is a basic example of store secret, get link and fetch secret:\n\n```py\nfrom yopass_api import Yopass\n\nyopass = Yopass(api=\"https://api.yopass.se\")\nsecret_password = yopass.generate_passphrase(length=5)\nsecret_id = yopass.store(\n message=\"test\",\n password=secret_password,\n expiration=\"1w\",\n one_time=False,\n)\nsecret_url = yopass.secret_url(secret_id=secret_id, password=secret_password)\nprint(secret_url)\nmessage = yopass.fetch(secret_id=secret_id, password=secret_password)\nprint(message)\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "This module will allow you to use Python and Yopass in automation projects",
"version": "0.0.8",
"split_keywords": [
"api",
"cryptography",
"yopass"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cc54e90276756e3c70e0da6feda3215651ec7ebec969e9f8c9ddef2297955ea1",
"md5": "dbce365106aa102c21c48145a084f459",
"sha256": "a9395ac6e076e0cd9ad8c53da7e5959b2d16121ecfcbe632635b5ef09fdac722"
},
"downloads": -1,
"filename": "yopass_api-0.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dbce365106aa102c21c48145a084f459",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 4317,
"upload_time": "2023-04-20T19:25:23",
"upload_time_iso_8601": "2023-04-20T19:25:23.223660Z",
"url": "https://files.pythonhosted.org/packages/cc/54/e90276756e3c70e0da6feda3215651ec7ebec969e9f8c9ddef2297955ea1/yopass_api-0.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0d49164679c7f5dd7ca67f4173daca6fa2ebb952dc650f60eee88ed48687ad14",
"md5": "b885ebc1e2b13646a4a1f9cb5eee5af6",
"sha256": "5af30b4a654891f88c27fe70c0f3e343c12c771a2fe892acbee758c137f20664"
},
"downloads": -1,
"filename": "yopass_api-0.0.8.tar.gz",
"has_sig": false,
"md5_digest": "b885ebc1e2b13646a4a1f9cb5eee5af6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 3911,
"upload_time": "2023-04-20T19:25:24",
"upload_time_iso_8601": "2023-04-20T19:25:24.938671Z",
"url": "https://files.pythonhosted.org/packages/0d/49/164679c7f5dd7ca67f4173daca6fa2ebb952dc650f60eee88ed48687ad14/yopass_api-0.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-20 19:25:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "silyashevich",
"github_project": "yopass_api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "yopass-api"
}