Skip to main content

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 page.

Installation

anonpy is available on PyPI:

pip install anonpy

Release candidates (preview versions) of this library can be installed with:

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 command.

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.

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:

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:

anonpy --gui

Acknowledgements

Historically speaking, this module can be considered a continuation of the 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 for passing on the PyPI name anonpy to @StefanGreve.

See also the list of contributors who participated in the development of this project.

Further Reading

This Project is licensed under the MIT license. Check out the Contributing Guidelines to learn more about how you can help this project grow. Navigate to the Discussions panel to ask questions or make feature requests.

Release files for anonpy 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anonpy 1.0.0
File Size Uploaded
anonpy-1.0.0.tar.gz 26.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anonpy 1.0.0
File Interpreter ABI Platform
anonpy-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.2 kB

Release files / anonpy-1.0.0.tar.gz

Download URL anonpy-1.0.0.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5d92f9bcc246fc94b7a3391932f1300e0d5c53f1d9161c40fac8bbc97d26f021
BLAKE2b-256 checksum
How to use checksums
10e189d5d762bd8603d12e0e3e282716163fa86e8a44be6eb98c89062c7dae73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / anonpy-1.0.0-py3-none-any.whl

Download URL anonpy-1.0.0-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8304dda428ef1a3b30929d9c33a8ba866204dd10a38de01cdcf6706988b166a1
BLAKE2b-256 checksum
How to use checksums
e3acaa4dbd6f921f8c2614aac331a84c1256cc453d1a715b8fbfb80df552c12f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page