<div align="center">
<a href="https://github.com/advanced-systems/anonpy" title="Project Logo">
<img height="150" style="margin-top:15px" src="https://raw.githubusercontent.com/advanced-systems/anonpy/master/logo.svg">
</a>
<h1>AnonPy</h1>
<div>
<a href="https://github.com/Advanced-Systems/anonpy/actions/workflows/python-build-test.yml" target="_blank" title="Python Build Test">
<img src="https://github.com/Advanced-Systems/anonpy/actions/workflows/python-build-test.yml/badge.svg">
</a>
<a href="https://github.com/Advanced-Systems/anonpy/actions/workflows/codeql.yml" target="_blank" title="Code QL">
<img src="https://github.com/Advanced-Systems/anonpy/actions/workflows/codeql.yml/badge.svg">
</a>
<a href="https://codecov.io/gh/Advanced-Systems/anonpy" target="_blank" title="Code Coverage">
<img src="https://codecov.io/gh/Advanced-Systems/anonpy/graph/badge.svg?token=64NLA38DP4">
</a>
<a href="https://pypistats.org/packages/anonpy" target="_blank" title="Downloads per Month">
<img src="https://img.shields.io/pypi/dm/anonpy?label=Downloads">
</a>
<a href="https://www.python.org/downloads/release/python-3120/" target="_blank" title="Supported Python Version">
<img src="https://img.shields.io/pypi/pyversions/anonpy?label=Python">
</a>
<a href="https://github.com/Advanced-Systems/anonpy" target="_blank" title="Release Version">
<img src="https://img.shields.io/pypi/v/anonpy?color=blue&label=Release">
</a>
<a href="https://github.com/Advanced-Systems/anonpy/blob/master/LICENSE" target="_blank" title="License">
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
</a>
</div>
</div>
## About
The `anonpy` module makes it easier to communicate with REST APIs for anonymously
uploading and downloading files. It implements an extensible provider-independent
class system and also comes with an intuitive CLI or lightweight GUI for interactive
usage.
Documentation for this project is located on the GitHub
[Wiki](https://github.com/Advanced-Systems/anonpy/wiki)
page.
## Installation
`anonpy` is available on PyPI:
```powershell
pip install anonpy
```
Release candidates (preview versions) of this library can be installed with:
```powershell
pip install -i https://test.pypi.org/simple/ anonpy
```
To ensure a clean and isolated environment for running `anonpy`'s CLI, it is
recommended to install it with the [`pipx`](https://pypa.github.io/pipx/) command.
```powershell
pipx install anonpy
```
## Library
`anonpy` can be used to interface with a wide variety of REST services by
building a contract with the `Endpoint` class.
```python
from anonpy import AnonPy, Endpoint
api = "https://pixeldrain.com/api/"
endpoint = Endpoint(upload="/file", download="file/{}", preview="/file/{}/info")
anon = AnonPy(api, endpoint)
# retrieve resource meta data without committing to a download
preview = anon.preview("LNcXZ9UM")
print(f"{preview=}")
# download a resource to the current working directory
download = anon.download("LNcXZ9UM", progressbar=True)
print(f"{download=}")
# upload a file
upload = anon.upload("homework.docx", progressbar=True)
print(f"{upload=}")
```
## Command Line Interface
Read the help manual:
```powershell
anonpy --help
```
## Graphical User Interface
> ⚠ This feature is currently not implemented yet, but is expected to be released
> in version 1.2.0
Launch a graphical user interface for uploading and downloading files:
```powershell
anonpy --gui
```
## Acknowledgements
Historically speaking, this module can be considered a continuation of the
[`anonfile-api`](https://github.com/nstrydom2/anonfile-api/) project, although
any resemblance of compatibility may only be temporary. On 16 August 2023, the
anonymous file sharing website <https://anonfiles.com> shut down due to overwhelming
abuse by the community, which was the driving factor for creating a backend-agnostic
library that can stand the test of time. That's why to this day, `anonpy` still
uses the anonfiles logo as a small nod to its past.
Special thanks to [@aaronlyy](https://github.com/aaronlyy) for passing on the
PyPI name [`anonpy`](https://pypi.org/project/anonpy/) to [@StefanGreve](https://github.com/aaronlyy).
See also the list of
[contributors](https://github.com/Advanced-Systems/anonpy/contributors)
who participated in the development of this project.
## Further Reading
This Project is licensed under the
[MIT](https://github.com/Advanced-Systems/anonpy/blob/master/LICENSE)
license.
Check out the
[Contributing Guidelines](https://github.com/Advanced-Systems/anonpy/blob/master/CONTRIBUTING.md)
to learn more about how you can help this project grow.
Navigate to the
[Discussions](https://github.com/Advanced-Systems/anonpy/discussions)
panel to ask questions or make feature requests.
Raw data
{
"_id": null,
"home_page": "https://github.com/advanced-systems/anonpy",
"name": "anonpy",
"maintainer": "Stefan Greve",
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": "greve.stefan@outlook.jp",
"keywords": "advanced systems anonpy rest api anonymous file sharing",
"author": "Stefan Greve",
"author_email": "greve.stefan@outlook.jp",
"download_url": "https://files.pythonhosted.org/packages/10/e1/89d5d762bd8603d12e0e3e282716163fa86e8a44be6eb98c89062c7dae73/anonpy-1.0.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <a href=\"https://github.com/advanced-systems/anonpy\" title=\"Project Logo\">\n <img height=\"150\" style=\"margin-top:15px\" src=\"https://raw.githubusercontent.com/advanced-systems/anonpy/master/logo.svg\">\n </a>\n <h1>AnonPy</h1>\n <div>\n <a href=\"https://github.com/Advanced-Systems/anonpy/actions/workflows/python-build-test.yml\" target=\"_blank\" title=\"Python Build Test\">\n <img src=\"https://github.com/Advanced-Systems/anonpy/actions/workflows/python-build-test.yml/badge.svg\">\n </a>\n <a href=\"https://github.com/Advanced-Systems/anonpy/actions/workflows/codeql.yml\" target=\"_blank\" title=\"Code QL\">\n <img src=\"https://github.com/Advanced-Systems/anonpy/actions/workflows/codeql.yml/badge.svg\">\n </a>\n <a href=\"https://codecov.io/gh/Advanced-Systems/anonpy\" target=\"_blank\" title=\"Code Coverage\">\n <img src=\"https://codecov.io/gh/Advanced-Systems/anonpy/graph/badge.svg?token=64NLA38DP4\">\n </a>\n <a href=\"https://pypistats.org/packages/anonpy\" target=\"_blank\" title=\"Downloads per Month\">\n <img src=\"https://img.shields.io/pypi/dm/anonpy?label=Downloads\">\n </a>\n <a href=\"https://www.python.org/downloads/release/python-3120/\" target=\"_blank\" title=\"Supported Python Version\">\n <img src=\"https://img.shields.io/pypi/pyversions/anonpy?label=Python\">\n </a>\n <a href=\"https://github.com/Advanced-Systems/anonpy\" target=\"_blank\" title=\"Release Version\">\n <img src=\"https://img.shields.io/pypi/v/anonpy?color=blue&label=Release\">\n </a>\n <a href=\"https://github.com/Advanced-Systems/anonpy/blob/master/LICENSE\" target=\"_blank\" title=\"License\">\n <img src=\"https://img.shields.io/badge/License-MIT-blue.svg\">\n </a>\n </div>\n</div>\n\n## About\n\nThe `anonpy` module makes it easier to communicate with REST APIs for anonymously\nuploading and downloading files. It implements an extensible provider-independent\nclass system and also comes with an intuitive CLI or lightweight GUI for interactive\nusage.\n\nDocumentation for this project is located on the GitHub\n[Wiki](https://github.com/Advanced-Systems/anonpy/wiki)\npage.\n\n## Installation\n\n`anonpy` is available on PyPI:\n\n```powershell\npip install anonpy\n```\n\nRelease candidates (preview versions) of this library can be installed with:\n\n```powershell\npip install -i https://test.pypi.org/simple/ anonpy\n```\n\nTo ensure a clean and isolated environment for running `anonpy`'s CLI, it is\nrecommended to install it with the [`pipx`](https://pypa.github.io/pipx/) command.\n\n```powershell\npipx install anonpy\n```\n\n## Library\n\n`anonpy` can be used to interface with a wide variety of REST services by\nbuilding a contract with the `Endpoint` class.\n\n```python\nfrom anonpy import AnonPy, Endpoint\n\napi = \"https://pixeldrain.com/api/\"\nendpoint = Endpoint(upload=\"/file\", download=\"file/{}\", preview=\"/file/{}/info\")\n\nanon = AnonPy(api, endpoint)\n\n# retrieve resource meta data without committing to a download\npreview = anon.preview(\"LNcXZ9UM\")\nprint(f\"{preview=}\")\n\n# download a resource to the current working directory\ndownload = anon.download(\"LNcXZ9UM\", progressbar=True)\nprint(f\"{download=}\")\n\n# upload a file\nupload = anon.upload(\"homework.docx\", progressbar=True)\nprint(f\"{upload=}\")\n```\n\n## Command Line Interface\n\nRead the help manual:\n\n```powershell\nanonpy --help\n```\n\n## Graphical User Interface\n\n> \u26a0 This feature is currently not implemented yet, but is expected to be released\n> in version 1.2.0\n\nLaunch a graphical user interface for uploading and downloading files:\n\n```powershell\nanonpy --gui\n```\n\n## Acknowledgements\n\nHistorically speaking, this module can be considered a continuation of the\n[`anonfile-api`](https://github.com/nstrydom2/anonfile-api/) project, although\nany resemblance of compatibility may only be temporary. On 16 August 2023, the\nanonymous file sharing website <https://anonfiles.com> shut down due to overwhelming\nabuse by the community, which was the driving factor for creating a backend-agnostic\nlibrary that can stand the test of time. That's why to this day, `anonpy` still\nuses the anonfiles logo as a small nod to its past.\n\nSpecial thanks to [@aaronlyy](https://github.com/aaronlyy) for passing on the\nPyPI name [`anonpy`](https://pypi.org/project/anonpy/) to [@StefanGreve](https://github.com/aaronlyy).\n\nSee also the list of\n[contributors](https://github.com/Advanced-Systems/anonpy/contributors)\nwho participated in the development of this project.\n\n## Further Reading\n\nThis Project is licensed under the\n[MIT](https://github.com/Advanced-Systems/anonpy/blob/master/LICENSE)\nlicense.\nCheck out the\n[Contributing Guidelines](https://github.com/Advanced-Systems/anonpy/blob/master/CONTRIBUTING.md)\nto learn more about how you can help this project grow.\nNavigate to the\n[Discussions](https://github.com/Advanced-Systems/anonpy/discussions)\npanel to ask questions or make feature requests.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A slick and modern Python package for anonymous file sharing",
"version": "1.0.0",
"project_urls": {
"Bug Reports": "https://github.com/advanced-systems/anonpy/issues",
"Changelog": "https://github.com/advanced-systems/anonpy/blob/master/README.md",
"Documentation": "https://github.com/advanced-systems/anonpy/wiki",
"Homepage": "https://github.com/advanced-systems/anonpy",
"Source Code": "https://github.com/advanced-systems/anonpy"
},
"split_keywords": [
"advanced",
"systems",
"anonpy",
"rest",
"api",
"anonymous",
"file",
"sharing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e3acaa4dbd6f921f8c2614aac331a84c1256cc453d1a715b8fbfb80df552c12f",
"md5": "773028f04cdbb60c77ccf128a50b8511",
"sha256": "8304dda428ef1a3b30929d9c33a8ba866204dd10a38de01cdcf6706988b166a1"
},
"downloads": -1,
"filename": "anonpy-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "773028f04cdbb60c77ccf128a50b8511",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 32103,
"upload_time": "2023-10-18T21:25:49",
"upload_time_iso_8601": "2023-10-18T21:25:49.625095Z",
"url": "https://files.pythonhosted.org/packages/e3/ac/aa4dbd6f921f8c2614aac331a84c1256cc453d1a715b8fbfb80df552c12f/anonpy-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "10e189d5d762bd8603d12e0e3e282716163fa86e8a44be6eb98c89062c7dae73",
"md5": "cb381cb22a4d399fdec5c7e380f5493f",
"sha256": "5d92f9bcc246fc94b7a3391932f1300e0d5c53f1d9161c40fac8bbc97d26f021"
},
"downloads": -1,
"filename": "anonpy-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "cb381cb22a4d399fdec5c7e380f5493f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 26094,
"upload_time": "2023-10-18T21:25:51",
"upload_time_iso_8601": "2023-10-18T21:25:51.244659Z",
"url": "https://files.pythonhosted.org/packages/10/e1/89d5d762bd8603d12e0e3e282716163fa86e8a44be6eb98c89062c7dae73/anonpy-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-18 21:25:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "advanced-systems",
"github_project": "anonpy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "anonpy"
}