Anonfile Uploader
Anonfile Uploader is a simple Python library to upload files to Anonfile.la, including its temporary storage feature.
Installation
pip install anonfile-uploader
Use Without Login Example
from anonfile import Anonfile
anonfile = Anonfile()
link = anonfile.upload_file('path/to/your/file.jpg')
print(f"Uploaded File: {link['url']}")
Error Handling
The library comes with built-in exception handling to manage common errors such as timeouts, connection issues, or Json errors, others errors.
from anonfile import Anonfile
from anonfile.exceptions import TimeoutError, ConnectionError, JsonDecodeError, AnonfileError
uploader = Anonfile(email="your_email@example.com", password="your_password")
try:
file_path = "path/to/your/file.txt"
response = uploader.upload_file(file_path)
print(f"Upload File: response['url']")
except TimeoutError:
print("The upload took too long and timed out.")
except ConnectionError:
print("Failed to connect to the server.")
except JsonDecodeError as e:
print(f"Error: {str(e)}")
except AnonfileError as e:
print(e)
Handling Timeout
If the upload takes too long and exceeds the specified timeout, a TimeoutError will be raised.
from anonfile import Anonfile
from anonfile.exceptions import TimeoutError
uploader = Anonfile(email="your_email@example.com", password="your_password")
try:
link = uploader.upload_file('path/to/your/file.jpg', timeout=10)
print(f"Uploaded file: {link['url']}")
except TimeoutError:
print("The upload took too long and timed out.")
Handling Connection Issues
If there's a problem connecting to the anonfile.la , a ConnectionError will be raised.
from anonfile import Anonfile
from anonfile.exceptions import ConnectionError
uploader = Anonfile(email="your_email@example.com", password="your_password")
try:
link = uploader.upload_file('path/to/your/file.jpg')
print(f"Uploaded file: {link['url']}")
except ConnectionError:
print("Failed to connect to the server.")
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for anonfile-uploader 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anonfile_uploader-0.1.5.tar.gz | 4.6 kB | Without provenance | Details for anonfile_uploader-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anonfile_uploader-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for anonfile_uploader-0.1.5-py3-none-any.whl |
Total release size: 10.3 kB
Release files / anonfile_uploader-0.1.5.tar.gz
| Download URL | anonfile_uploader-0.1.5.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ca506fbf08710f1949eba6a4a397e7999497d92c27a1be1841904a4819805a8
|
|
BLAKE2b-256 checksum How to use checksums |
e5d38e802e5f697304e1c1ba03cdbb1388c15e5a733248483a01cb9e25de41e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / anonfile_uploader-0.1.5-py3-none-any.whl
| Download URL | anonfile_uploader-0.1.5-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
641b12a665db0ac29962b9843f12e88d4258630f215c3ce7a6868d6970dd48a6
|
|
BLAKE2b-256 checksum How to use checksums |
11def81a23ffefea59f3d1259a7d3f1eb56a77e23e7b65c9cb62653cdc8eb9b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for anonfile-uploader 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.