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
Automatically Edits Videos and Uploads to Tiktok with 1 line of code.

TiktokAutoUploader - Open to code contributions Automatically Edits Videos and Uploads to Tiktok with 1 line of code. Setup pip install -r requirement

Michael Peres 199 Dec 27, 2022
Yes, it's true :revolving_hearts: This repository has 301 stars.

Yes, it's true! Inspired by a similar repository from @RealPeha, but implemented using a webhook on AWS Lambda and API Gateway, so it's serv

511 Dec 30, 2022
Proxy-Bot - Python proxy bot for telegram

Proxy-Bot 🤖 Proxy bot between the main chat and a newcomer, allows all particip

Anton Shumakov 3 Apr 01, 2022
Discord bot developed by Delhi University Student Community!

DUSC-Bot Discord bot developed by Delhi University Student Community! Libraries Used Pycord - Documentation Features Can purge messages in bulk Drop-D

professor 1 Jan 29, 2022
EduuRobot Telegram bot source code.

EduuRobot A multipurpose Telegram Bot made with Pyrogram and asynchronous programming. Requirements Python 3.6+ An Unix-like operating system (Running

Amano Team 119 Dec 23, 2022
Telegram bot to stream videos in telegram Voice Chat for both groups and channels

Telegram bot to stream videos in telegram Voice Chat for both groups and channels. Supports live steams, YouTube videos and telegram media. Supports scheduling streams, recording and many more.

Akki ThePro 2 Sep 11, 2022
This is a telegram bot built using the Oxford Dictionary API

Oxford Dictionaries Telegram Bot This is a telegram bot built using the Oxford Dictionary API Source: Oxford Dictionaries API Documentation Install En

Abhijith N T 2 Mar 18, 2022
ETL for tononkira.serasera.org

python-tononkiramalagasy-api Api Endpoints: ### get artists - /artists/int:page [page_offset = 20] ### get artist's songs, index was given by

Titosy Manankasina 1 Dec 24, 2021
CSUL Discord Bot

Cruzeiro This is the same old bot running on the Discord Server of CSUL, but i've changed the code. It's better now. Discord.py Heroku How i did The b

Operaho 6 Jan 31, 2022
A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

Amazon Web Services - Labs 1.9k Jan 07, 2023
Sample code helps get you started with a simple Python web service using AWS Lambda and Amazon API Gateway

Welcome to the AWS CodeStar sample web service This sample code helps get you started with a simple Python web service using AWS Lambda and Amazon API

0 Jan 20, 2022
This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, having fun :) Creator: Marlon Zanardi

🚀 Space Crypto auto click bot ready-to-use 🚀 This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, ha

170 Dec 20, 2022
A GUI Weather Application written with Python

weather-box - A GUI Weather Application written with Python Made with ❤️ by Suresh Mishra

Suresh Mishra 2 Dec 18, 2021
A simple Telegram bot, written in Python, that you can use to shill (i.e. send messages) your token, or whatever, to channels.

Telegram Shill Bot Ever wanted a Shill Bot but wankers keep scamming for one OR wanted to charge you an arm and a leg? This is a simple bot written in

53 Nov 25, 2022
THERE IS AN IMPOSTER AMONG US. VOTE HIM OUT BEFORE HE [ R E D A C T E D ].

🛡️ Guardian There is an impostor among us. Can you help us find out who it is? ⚙️ Installation and Usage Make sure to install Tesseract-OCR before ru

Catus Magnus 1 Jan 06, 2022
Utility for downloading fanfiction in bulk from the Archive of Our Own

What is this? This is a program intended to help you download fanfiction from the Archive of Our Own in bulk. This program is primarily intended to wo

73 Dec 30, 2022
A simple terminal UI for viewing fund P/L analysis through TEFAS

Tefas UI A simple terminal UI for viewing fund P/L analysis through TEFAS. Features (that my own bank's UI lack): Daily and weekly P/L FX comparisons

Batuhan Taskaya 4 Mar 14, 2022
Shuffle and add items from jellyfin to mpd (use in tandem with jellyfin-mopidy and mpd-mopidy). Similar to ncmpcpp's "Add random" feature..

jellyshuf Essentially implements ncmpcpp's add random feature (default hotkey: `) through a script which grabs info from jellyfin api itself. jellyfin

Ethan Djeric 2 Dec 14, 2021
GitHub Actions Poll Mode AutoScaler (GAPMAS)

GitHub Actions Poll Mode AutoScaler, or GAPMAS, is a simple tool that helps you run ephemeral GitHub Actions self-hosted runners on your own infrastructure.

Frode Nordahl 4 Nov 04, 2022
A file-based quote bot written in Python

Let's Write a Python Quote Bot! This repository will get you started with building a quote bot in Python. It's meant to be used along with the Learnin

1 Oct 28, 2021