Skip to main content

Anonfiles.com Unofficial Python API

PyPI version shields.io CI PyPI download total PyPI pyversions PyPI license

This unofficial Python API was created to make uploading and downloading files from https://anonfiles.com simple and effective for programming in Python. The goal of the project is to create an intuitive library for anonymous file sharing.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Python 3.8+ is required to run this application, other than that there are no prerequisites for the project, as the dependencies are included in the repository.

Installing

To install the library is as simple as running

pip install anonfile

from the command line. To install this library in debug mode with dev dependencies, use

pip install -e .[dev]

instead. It is recommended to create an virtual environment prior to installing this library. If you only intend to use this library from the CLI, use pipx for the installation instead:

pipx install anonfile

Dev Notes

Run unit tests locally:

pytest --verbose -s [--token "REDACTED"]

Add the -k test_* option if you want to test only a single function.

Usage

Import the module and instantiate the AnonFile() constructor. Setting the download directory in path is optional. Using the API token in the constructor is optional as well. A valid token registers all file uploads online, i.e. a list of all uploaded files is made accessible to any user that signs into your account.

from anonfile import AnonFile

anon = AnonFile()

# upload a file and enable progressbar terminal feedback (off by default)
upload = anon.upload('/home/guest/jims_paperwork.doc', progressbar=True)
print(upload.url.geturl())

# download a file and set the download directory
from pathlib import Path
target_dir = Path.home().joinpath('Downloads')
download = anon.download("https://anonfiles.com/9ee1jcu6u9/test_txt", path=target_dir)
print(download.file_path)

And voilà, pain-free anonymous file sharing. If you want more information about the AnonFile API visit anonfiles.com.

Command Line Interface

# open help page for specific commands
anonfile [download|upload|preview|log] --help

# note: both methods expect at least one argument, but can take on more
anonfile download --url https://anonfiles.com/93k5x1ucu0/test_txt
anonfile upload --file ./test.txt

Built With

Versioning

Navigate to tags on this repository to see all available versions.

Authors

Name Mail Address GitHub Profile
Nicholas Strydom nstrydom@gmail.com nstrydom2
hentai-chan dev.hentai-chan@outlook.com hentai-chan
Stefan Greve greve.stefan@outlook.jp StefanGreve

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

License

This project is licensed under the MIT License - see the LICENSE file for more details.

Acknowledgments

  • Joseph Marie Jacquard
  • Charles Babbage
  • Ada Lovelace
  • My Dad
  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

Release files for anonfile 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 anonfile 1.0.0
File Size Uploaded
anonfile-1.0.0.tar.gz 14.1 kB Details

Built distribution (wheel)

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

Total release size: 25.7 kB

Release files / anonfile-1.0.0.tar.gz

Download URL anonfile-1.0.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d64f5180d6d400098ae32eeb62a0b82b7095f1cdcda0bcacfe71d91ac3bc03ec
BLAKE2b-256 checksum
How to use checksums
e18fe1be335debd44eebc7f64528f6b486ba1386eb7d5bd87acf5313d88ba5d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

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

Download URL anonfile-1.0.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ced0a6d495d11ae20d41450184fffb84f8228bd0ccb147edaad0ec8a8d60fbd
BLAKE2b-256 checksum
How to use checksums
198fde483fef542f524bd9cb7feaec0c3ff3f5778535a07a5c06dec358661d01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.1.3

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1

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