Skip to main content

gofile

🚀 Python wrapper for gofile.io Upload API1.

Build PyPI version Supported Python versions PEP8

Requirements

⬇️ Installation

pip install gofilepy

⬆️ Upgrade Existing Installation

pip install -U gofilepy

⌨️ Usage

usage: gofilepy [-h] [-s] [-o] [-e] [-vv] [-v] path [path ...]

Example: gofile <file/folder_path>

positional arguments:
  path                  Path to the file(s) and/or folder(s)

options:
  -h, --help            show this help message and exit
  -s, --to-single-folder
                        Upload multiple files to the same folder. All files
                        will share the same URL. This option requires a valid
                        token exported as: `GOFILE_TOKEN`
  -o, --open-urls       Open the URL(s) in the browser when the upload is
                        complete (macOS-only)
  -e, --export          Export upload response(s) to a JSON file
  -vv, --verbose        Show more information

📕 Examples

Example 1: Uploading one file

➜ gofile foo.txt
╭───────────────────────────────────────────╮
│ File: foo.txt                             │
│ Download page: https://gofile.io/d/PkdZP5 │
╰───────────────────────────────────────────╯
Uploading progress: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00

Example 2: Uploading multiple files/directories

➜ gofile foo.txt bar.txt foobar.txt foo/
╭───────────────────────────────────────────╮
│ File: foo.txt                             │
│ Download page: https://gofile.io/d/rLwQVZ │
╰───────────────────────────────────────────╯
╭───────────────────────────────────────────╮
│ File: bar.txt                             │
│ Download page: https://gofile.io/d/DdS7mZ │
╰───────────────────────────────────────────╯
╭───────────────────────────────────────────╮
│ File: foobar.txt                          │
│ Download page: https://gofile.io/d/C1VicP │
╰───────────────────────────────────────────╯
╭───────────────────────────────────────────╮
│ File: foo/foo_1.txt                       │
│ Download page: https://gofile.io/d/CkYw18 │
╰───────────────────────────────────────────╯
Uploading progress: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00

Example 3: Uploading multiple files to the same URL

This option requires a Gofile token (see: ## Misc.).

➜ gofile -s foo.txt bar.txt
╭───────────────────────────────────────────╮
│ Files:                                    │
│ foo.txt                                   │
│ bar.txt                                   │
│ Download page: https://gofile.io/d/bFwawd │
╰───────────────────────────────────────────╯
Uploading progress: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00

Example 4: Verbose output

➜ gofile -vv foo.txt
╭──────────────────────────────────────────────────────────────────────────────╮
│ {                                                                            │
│   "foo.txt": {                                                               │
│     "timestamp": "30-05-2022 18:42:15",                                      │
│     "response": {                                                            │
│       "status": "ok",                                                        │
│       "data": {                                                              │
│         "guestToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",                    │
│         "downloadPage": "https://gofile.io/d/sU4hV1",                        │
│         "code": "sU4hV1",                                                    │
│         "parentFolder": "7ad2d249-96a1-4675-b185-05665fbc9a46",              │
│         "fileId": "0e93e093-d122-4e42-a1be-2e7d34d78ffb",                    │
│         "fileName": "foo.txt",                                               │
│         "md5": "d41d8cd98f00b204e9800998ecf8427e"                            │
│       }                                                                      │
│     }                                                                        │
│   }                                                                          │
│ }                                                                            │
╰──────────────────────────────────────────────────────────────────────────────╯
Uploading progress: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00

Example 5: Exporting the API response to a JSON file

➜ gofile -e foo.txt
╭───────────────────────────────────────────╮
│ File: foo.txt                             │
│ Download page: https://gofile.io/d/8t79Lz │
╰───────────────────────────────────────────╯
Uploading progress: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Exported data to: gofile_export_1653950555.json
Content of gofile_export_1653950555.json
[
    {
        "foo.txt": {
            "timestamp": "30-05-2022 18:42:35",
            "response": {
                "status": "ok",
                "data": {
                    "guestToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "downloadPage": "https://gofile.io/d/8t79Lz",
                    "code": "8t79Lz",
                    "parentFolder": "05xd4cb-8965-417f-ae34-a116et99b798",
                    "fileId": "d1fc3a97-8xe3-486a-bc0d-edb1rb103040",
                    "fileName": "foo.txt",
                    "md5": "d41d8cd99f00b204e9810998ecf8427e"
                }
            }
        }
    }
]

Misc.

🔑 Optional: Saving uploads to your Gofile account

If you want the files to be uploaded to a specific account, you can export your gofile token, which can be retrieved from the profile page, as an environment variable GOFILE_TOKEN.

export GOFILE_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  1. Disclaimer: This tool is not associated with Gofile, WOJTEK SAS ©, or the Gofile Team. ↩

Release files for gofilepy 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gofilepy 0.3.3
File Size Uploaded
gofilepy-0.3.3.tar.gz 4.7 kB Details

Built distribution (wheel)

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

Total release size: 10.1 kB

Release files / gofilepy-0.3.3.tar.gz

Download URL gofilepy-0.3.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bf7afb431a74fff1932e7769b3aba92a4268c30bf980f23ac89364ffa42e3db4
BLAKE2b-256 checksum
How to use checksums
44d6bf42de2e75c944a01aa1bd0a57ebe4320aac9ed556dab1f1896e208af1d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.8 Darwin/23.5.0

Release files / gofilepy-0.3.3-py3-none-any.whl

Download URL gofilepy-0.3.3-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d482bd6bb28f2e4ffeaa08cce91516bb7f3c92466c81741ade18896e8919dff
BLAKE2b-256 checksum
How to use checksums
23dd43fd661eead7a453aa1c9d979880d5e4df3195064b5a3d7a46a2fb5f4b99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.8 Darwin/23.5.0

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

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