Skip to main content

PyUploadGram

An API wrapper for UploadGram

Installation

not on pyPi soo..

git clone https://github.com/scrubjay55/PyUploadGram
pip3 install ./PyUploadGram

Usage

import PyUploadGram

pyuploadgram_sesh = PyUploadGram.Session()

b_somephoto = open(r"./somephoto.jpeg", 'rb').read()
uploaded_file = pyuploadgram_sesh.upload_file(filename="some photo.jpeg",
                                              file=b_somephoto
                                              )
# OR
uploaded_file2 = pyuploadgram_sesh.upload_file(filename="some photo2.jpeg",
                                               file=r"./somephoto.jpeg"
                                               )
print(uploaded_file)
# (UploadedFile: url=https://dl.uploadgram.me/********?raw, delete=******)

# DIRECTLY FROM THE INTERNET
some_media_u = pyuploadgram_sesh.upload_file(filename="some media.jpg",
                                             file="https://i.redd.it/xxxxxxx.jpg"
                                             )
# OR
b_some_media = requests.get("https://i.redd.it/xxxxxxx.jpg").content
some_media_u2 = pyuploadgram_sesh.upload_file(filename="some media.jpg",
                                              file=b_some_media
                                              )

is_succesfully_deleted = pyuploadgram_sesh.delete_file(uploaded_file)
print(is_succesfully_deleted)
# True
print(pyuploadgram_sesh.uploaded_files)

# ALSO POSSIBLE WITHOUT A SESSION
PyUploadGram.upload_file(filename="some file.o",
                         file=r"./someobj.o"
                         )

Metadata

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

Built distribution (wheel)

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

Total release size: 13.2 kB

Release files / PyUploadGram-1.0.0.tar.gz

Download URL PyUploadGram-1.0.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
19a1def2ea7d52b5bcc0637438161c56777207b910ca8b0882f07aaca783aceb
BLAKE2b-256 checksum
How to use checksums
474f4b6249b647a580d6115c515bcb7977fd708b6b9b699ab2b1a63ff57484e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

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

Download URL PyUploadGram-1.0.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54de13add0f9c4b974fc43304094dae61d7f6bc86c1221f415b9ac72d59529c7
BLAKE2b-256 checksum
How to use checksums
2f88d084ec303dbc1f0a05b143f0d9a9df11f7892a0e6d6debb508b069863f22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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