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
SpautiNoFay - A simple and beautiful music player created with Python

SpautiNoFay A simple and beautiful music player created with Python Why SpautiNo

8 Jan 19, 2022
Evernote SDK for Python

Evernote SDK for Python Evernote API version 1.28 This SDK is intended for use with Python 2.X For Evernote's beta Python 3 SDK see https://github.com

Evernote 612 Dec 30, 2022
Python script that extract data via YouTube Api and manipulates it.

UNLIMITED README for the Unlimited game [Mining game] Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About The Project

Serban Chisca 1 Dec 12, 2021
Monitor your Binance portfolio

Binance Report Bot The intent of this bot is to take a snapshot of your binance wallet, e.g. the current balances and store it for further plotting. I

37 Oct 29, 2022
A secure and customizable bot for controlling cross-server announcements and interactions within Discord

DiscordBot A secure and customizable bot for controlling cross-server announcements and interactions within Discord. Within the code of the bot, you c

Jacob Dorfmeister 1 Jan 22, 2022
A simple tool that lets you know when you are out of Lost Ark's queues

Overview A simple tool that lets you know when you are out of Lost Ark's queues. You can be notified via: Sound: the app will play a sound Discord web

Nelson 3 Feb 15, 2022
=>|<= the MsgRoom bot for Windows 96

=|= bot A MsgRoom bot in Python 3 for Windows96.net. The bot joins as =|=, if parameter name_lasts is not true and default_name is =|=. The full

Larry Holst 2 Jun 07, 2022
Python SDK for accessing the Hanko Authentication API

Hanko Authentication SDK for Python This package is maintained by Hanko. Contents Introduction Documentation Installation Usage Prerequisites Create a

Hanko.io 3 Mar 08, 2022
This is a DCA crypto trading bot built for Binance written in Python

This is a DCA crypto trading bot built for Binance written in Python. It works by allowing you to DCA at an interval of your choosing and reports back on your average buy price as well as a chart con

Andrei 55 Oct 17, 2022
Many discord bots serving different purposes

Discord_Botlari Farklı amaçlara hizmet eden bir çok discord botu En kapsamlı Bot Game Bottur. bir oyun botudur discord sunucularında kullanılır. (tüm

1 Dec 21, 2021
Python script to decode the EU Covid-19 vaccine certificate

vacdec Python script to decode the EU Covid-19 vaccine certificate This script takes an image with a QR code of a vaccine certificate as the parameter

Hanno Böck 244 Nov 30, 2022
Whatsapp-bot - Whatsapp chatbot build with python and twilio

Whatsapp-bot This is a Whatsapp Chatbot that responds with quotes, reply owners

arinzejustinng 1 Jan 14, 2022
Covid19 API. (Currently Scrapes: worldometers)

Covid19-API An opensource Covid19 API (currently uses worldometer only) Output Examples Covid19 Every Country Data Request URL your-ip/api/all Resp

Amresh Prasad Sinha 14 Oct 03, 2022
One of Best renamer bot with python

🌀 One of Best renamer bot repo Please Give a ☆ if You like This Open Source and Don't Forget to Follow Me On Github For More Repos And Codes. Scrappe

1 Dec 14, 2021
Simple Telegram bot to confess to your crush this Valentine's Day

Simple Telegram bot to confess to your crush this Valentine's Day! Steps pip install python-telegram-bot Register a Telegram bot & get the token by fo

3 Mar 18, 2022
Autov2new - Pro Auto Filter Bot V2

Pro Auto Filter Bot V2 Deploy You can deploy this bot anywhere. Watch Deploying

1 Jan 06, 2022
EthSema - Binary translator for Ethereum 2.0

EthSema is a novel EVM-to-eWASM bytecode translator that can not only ensure the fidelity of translation but also fix commonly-seen vulnerabilities in smart contracts.

weimin 8 Mar 01, 2022
Telegram Music Bot for YouTube/SoundCloud/Mixcloud

Telegram Music Bot Telegram Music Bot for YouTube/SoundCloud/Mixcloud This bot downloads and sends the audio when someone send a YouTube/SoundCloud/Mi

Calls Music 76 Jan 02, 2023
Python client to do LispTick requests

lisptick-python LispTick Python client library It allows to send request and receive result from a LispTick server. Get a socket connection to a LispT

Kereon Intelligence 1 Oct 25, 2021
A Python wrapper around the Twitter API.

Python Twitter A Python wrapper around the Twitter API. By the Python-Twitter Developers Introduction This library provides a pure Python interface fo

Mike Taylor 3.4k Jan 01, 2023