An API Wrapper for Gofile API

Overview

Gofile2

from gofile2 import Gofile

g_a = Gofile()
print(g_a.upload(file="/home/itz-fork/photo.png"))

An API Wrapper for Gofile API.

About API

Gofile is in BETA version and this API will evolve over time. Check regularly if changes have been made.

Current version is compatible with 2021-06-22

Installation

Install via pypi

pip3 install gofile2

To install development version Gofile2, run the following command

pip install git+https://github.com/Itz-fork/Gofile2.git

Usage

1. Import Gofile2 in your python file

from gofile2 import Gofile

2. Create an instance of Gofile2

g_a = Gofile()

Above code will login as guest account (Some functions won't work in this mode). If you need to login to your own account then pass your api token as token argument like below code.

g_a = Gofile(token="your_gofile_api_token_here")

3. Everything Done! Now Play with it!

# Get current server
g_a.get_Server()

# Get account info
g_a.get_Account()

# Upload a file
g_a.upload(file="path_to_your_file")

# Create folder
g_a.create_folder(parentFolderId="your_root_folder_id", folderName="Folder Name")

# Set folder options
g_a.set_folder_options(folderId="id_of_the_folder", option="your_option", value="your_value")

# Delete file or folder
g_a.delete_content(contentId="id_of_the_file_or_folder")

Docs

For now there is no documentation for Gofile2. However you can get some help from Docstrings using,

from gofile2 import Gofile

print(help(Gofile().upload))

Thanks to

  • gofile - Base Project & Inspiration ❤️ (Gofile2 is a Re-built version of this)
  • Itz-fork (me) - For Fixing & Improving this project
You might also like...
A simple API wrapper for the Tenor API

Gifpy A simple API wrapper for the Tenor API Installation Python 3.9 or higher is recommended python3 -m pip install gifpy Clone repository: $ git cl

A Python API wrapper for the Twitter API!

PyTweet PyTweet is an api wrapper made for twitter using twitter's api version 2! Installation Windows py3 -m pip install PyTweet Linux python -m pip

Python API wrapper library for Convex Value API

convex-value-python Python API wrapper library for Convex Value API. Further Links: Convex Value homepage @ConvexValue on Twitter JB on Twitter Authen

An API wrapper around Discord API.

NeoCord This project is work in progress not for production use. An asynchronous API wrapper around Discord API written in Python. Features Modern API

This an API wrapper library for the OpenSea API written in Python 3.

OpenSea NFT API Python 3 wrapper This an API wrapper library for the OpenSea API written in Python 3. The library provides a simplified interface to f

YARSAW is an Async Python API Wrapper for the Random Stuff API.

Yet Another Random Stuff API Wrapper - YARSAW YARSAW is an Async Python API Wrapper for the Random Stuff API. This module makes it simpler for you to

A wrapper for The Movie Database API v3 and v4 that only uses the read access token (not api key).

fulltmdb A wrapper for The Movie Database API v3 and v4 that only uses the read access token (not api key). Installation Use the package manager pip t

EpikCord.py - This is an API Wrapper for Discord's API for Python

EpikCord.py - This is an API Wrapper for Discord's API for Python! We've decided not to fork discord.py and start completely from scratch for a new, better structuring system!

An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% API coverage Most of the codebase is documented

Comments
  • folder upload

    folder upload

    Hello, I encountered the following error while uploading a folder. I was using venv and I redacted full paths in the error log below.

    Traceback (most recent call last):
      File "...\lib\site-packages\gofile2\gofile2.py", line 144, in upload
        return self._api_resp_handler(upload_file)
      File "...\lib\site-packages\gofile2\gofile2.py", line 37, in _api_resp_handler
        raise ResponseError(error)
    gofile2.errors.ResponseError: parentFolder
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "...\gofile.io\test.py", line 10, in <module>
        g_a.upload_folder(path="test_folder/test_folder_2pic")
      File "...\lib\site-packages\gofile2\gofile2.py", line 101, in upload_folder
        udt = self.upload(file, folderId)
      File "...\lib\site-packages\gofile2\gofile2.py", line 146, in upload
        raise JobFailed(
    gofile2.errors.JobFailed: Error Happend: Error Happend: parentFolder
    
    Report this at ----> https://github.com/Itz-fork/Gofile2/issues
    
    Report this at ----> https://github.com/Itz-fork/Gofile2/issues
    

    My thoughts: There is no mechanism to upload a folder to the server. They suggest uploading a file once and with using the id of the automatically created folder, uploading other files sequentially. Did you realize this mechanism or I am missing something?

    Thank you for the lib.

    opened by h-enes-simsek 2
  • Program doesn't preserve the folder structure

    Program doesn't preserve the folder structure

    This is actually almost not an issue, but a feature. I don't know if you want to add a feature to support recursive folder upload.

    At the moment assume you have a folder like this: _ parent ___ pic1.jpg ___ child _____ pic2.jpg

    And you upload the parent folder to gofile server. It ends up like this in the gofile server: _ longBoringGenericName _ pic1.jpg _ pic2.jpg

    So it does not preserve the folder structure. I don't need it personally but this feature could be added.

    Thank you for your effort to open source.

    opened by h-enes-simsek 0
  • fix import error and fix syntax error in strftime function

    fix import error and fix syntax error in strftime function

    There is a problem with the new version. You successfully solve the folder uploading problem but somehow made a syntax mistake. v1.4.3 code cannot be compiled at the moment. I fix the problem. Briefly:

    • You want to use time.sleep(x) but you import time wrongly
    • You mistakenly write %l instead of %I in strftime function. ( /L/ouisiana instead of /I/ndiana )

    Thank you for the nice lib.

    opened by h-enes-simsek 0
  • RuntimeWarning: Enable tracemalloc to get the object allocation traceback

    RuntimeWarning: Enable tracemalloc to get the object allocation traceback

    C:\Users\MSI\AppData\Roaming\JetBrains\PyCharmCE2022.2\scratches\testtt.py:7: RuntimeWarning: coroutine 'Async_Gofile.get_Account' was never awaited print(g_a.get_Account()) RuntimeWarning: Enable tracemalloc to get the object allocation traceback <coroutine object Async_Gofile.get_Account at 0x00000217AEF70CF0>

    Process finished with exit code 0

    opened by Tux-MacG1v 0
Releases(Gofile2-v1.4.3)
Owner
I'm Not A Bot #Left_TG
Everything is impossible until You use Your Brain
I'm Not A Bot #Left_TG
Simple spam bot made in python

Simple Spam Bot A Simple and easy way to be the most hated person between your friends, All you have to do is spam the group chat using this bot until

Kareem Osama 6 Sep 05, 2022
A updated and improved version from the original Discord-Netflix from Nirewen.

Discord-Netflix A updated version from the original Discord-Netflix from nirewen A Netflix wrapper that uses Discord RPC to show what you're watching

Void 42 Jan 02, 2023
Wechat-file-cleaner - Clean files in PC WeChat FileStorage directory

Wechat-file-cleaner - Clean files in PC WeChat FileStorage directory

Xingjian Zhang 1 Feb 06, 2022
Bypass Hcaptcha Purely based on http requests, Creates unlocked discord accounts if used correctly

hcaptcha-bypass-discord Bypass HCAPTCHA purely based on http requests Works for discord dosen't create locked accounts :)) HOW TO USE ◉ add the hcapby

Avenger 80 Dec 22, 2022
Savecontentbot - Telegram Save Content Bot With Same more Features

Save Restricted Content Bot A simple telegram bot to save restricted content wit

Group Dc Bots 3 Jan 26, 2022
A part of HyRiver software stack for accessing hydrology data through web services

Package Description Status PyNHD Navigate and subset NHDPlus (MR and HR) using web services Py3DEP Access topographic data through National Map's 3DEP

Taher Chegini 51 Dec 10, 2022
Buy early bsc gems with custom gas fee, slippage, amount. Auto approve token after buy. Sell buyed token with custom gas fee, slippage, amount. And more.

Pancakeswap Sniper bot Full version of Pancakeswap sniping bot used to snipe during fair coin launches. With advanced options and a graphical user int

Jesus Crypto 204 Apr 27, 2022
ClassesMD5-64 - Get whatsapp md5 code using python

Hello Installation Clone Repo & install bash $ git clone https://github.com/Pito

PitoDev 1 Jan 03, 2022
A Python app which retrieves the rank and players' equipped skins during a match

VALORANT rank yoinker About The Project Usage Contributing Contact Acknowledgements Disclaimer About The Project Their Queue Current Skin Current Rank

Isaac Kenyon 270 Jan 04, 2023
The successor of GeoSnipe, a pythonic Minecraft username sniper based on AsyncIO.

OneSnipe The successor of GeoSnipe, a pythonic Minecraft username sniper based on AsyncIO. Documentation View Documentation Features • Mojang & Micros

1 Jan 14, 2022
This is an implementation example of a bot that periodically sends predictions to the alphasea-agent.

alphasea-example-model alphasea-example-modelは、 alphasea-agent に対して毎ラウンド、予測を投稿するプログラムです。 Numeraiのexample modelに相当します。 準備 alphasea-example-modelの動作には、

AlphaSea 11 Jul 28, 2022
Telegram Bot for generating and decoding QR-codes

Telegram openqrgen_bot Telegram Bot that generates from user's messages and decodes QR-codes from photos. Also contains rickroll detection :) Just typ

2 Nov 14, 2021
An Anime Theme Telegram group management bot. With lot of features.

Emilia Project Emilia-Prjkt is a modular bot running on python3 with anime theme and have a lot features. Easiest Way To Deploy On Heroku This Bot is

ZenitsuID #M•R•T™ 3 Feb 03, 2022
✖️ Unofficial API of 1337x.to

✖️ Unofficial Python API Wrapper of 1337x This is the unofficial API of 1337x. It supports all proxies of 1337x and almost all functions of 1337x. You

Hemanta Pokharel 71 Dec 26, 2022
Python client for Midea dhumidifier

This is a library that allows communication with Midea dehumidifier appliances via the local area network. midea-beautiful-dehumidifier This library a

Nenad Bogojevic 42 Dec 22, 2022
A Simple Telegram Bot that can Download Files From Mega.nz and Upload It to Telegram

MegaDL-Bot A Simple Telegram Bot By @mrkpbots to Download Files From Mega.nz and Upload It to Telegram Features No Login Required All Mega.nz File Lin

MRKP BOTS 5 Feb 20, 2022
Simple discord token generator good for memberboosting your server! Uses Hcaptcha bypass

discord-tokens-generator INFO This is a Simple Discord Token Generator which creates unverified discord accounts These accounts are good for member bo

Avenger 41 Dec 20, 2022
um simples script para localizar IP

um simples script para localizar IP pkg install git (apt-get install git) pkg install python (apt-get install python) git clone https://github.com/byd

bydeathlxncer 4 Nov 29, 2021
Python client for the LightOn Muse API

lightonmuse Python bindings to production-ready intelligence primitives powered by state-of-the-art language models. Create. Process. Understand. Lear

LightOn 12 Apr 10, 2022
fbchat - Facebook Messenger for Python

A powerful and efficient library to interact with Facebook's Messenger, using just your email and password.

1.1k Dec 23, 2022