Skip to main content

An unofficial library that wraps the anonfile.com REST API.

Project description

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 <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.7+ 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, use

pip install -e .

instead. It is recommended to create an virtual environment prior to installing this library.

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
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')
filename = anon.download("https://anonfiles.com/9ee1jcu6u9/test_txt", path=target_dir)
print(filename)

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anonfile-0.2.7.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anonfile-0.2.7-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file anonfile-0.2.7.tar.gz.

File metadata

  • Download URL: anonfile-0.2.7.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.11

File hashes

Hashes for anonfile-0.2.7.tar.gz
Algorithm Hash digest
SHA256 25357970d0e567208f4b07f6ebf036c4934b78f04f991b271bf89fe13252359d
MD5 205fcfe553a2f92f28887d9f20ab3d70
BLAKE2b-256 7c948525c929091ecba494c9b0c5ca711d3581abeb0ee6cb460277f8c07b4f31

See more details on using hashes here.

File details

Details for the file anonfile-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: anonfile-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.11

File hashes

Hashes for anonfile-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 feacde7567481b38dcc403109a1dc6dff1cac2fdef396022db10a6cf3dd41744
MD5 4afbdfbdba6f63ce6bc0565d1413746e
BLAKE2b-256 996d278c9e019396cad732e8dfb3e9d5839ecd5dc40878c0e9702a26a1ffbef0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page