No project description provided
Project description
Upload Files to GitHub
This package provides a simple way to upload multiple files or directories to a GitHub repository using a command-line interface.
Installation
You can install this package using pip:
pip install upload-files-to-github
Usage - CLI
To upload files using the CLI, run the upload_files_to_github.py
script with the following arguments:
python upload_files_to_github.py --files <file_or_directory_paths> --repo <user/repo> --token <github_token>
<file_or_directory_paths>
: a list of file or directory paths to upload, separated by spaces.<user/repo>
: the GitHub repository where you want to upload the files.<github_token>
: your GitHub personal access token.
For example, to upload all the files in the current directory to a repository myuser/myrepo
, you can run:
python upload_files_to_github.py --files . --repo myuser/myrepo --token <github_token>
Usage - Module
You can also use this package as a module in your Python code. After installing the package, you can import the upload_files_to_github
function and use it as follows:
from upload_files_to_github import upload_files_to_github
files = ['path/to/file1', 'path/to/file2']
repo = 'myuser/myrepo'
token = 'mygithubtoken'
upload_files_to_github(files, repo, token)
The upload_files_to_github
function takes the same arguments as the CLI script, but files
should be a list of file paths instead of a space-separated string.
Alternatively, you can also use the package as a module from the command line:
python -m upload_files_to_github --files <file_or_directory_paths> --repo <user/repo> --token <github_token>
This will run the upload_files_to_github
function with the same arguments as the CLI script.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file upload-files-to-github-1.3.tar.gz
.
File metadata
- Download URL: upload-files-to-github-1.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28a063fe96c95d5ea2f5fe1a21e519a2c68bdff90211f2a6f8dc60a4ddbafc4a |
|
MD5 | d80480b9ae74296a258b2b6ae907d30b |
|
BLAKE2b-256 | b24393ba190171bf46b5efdec856cf21c2537cd5a2fb68cc3ed2d06ec52f5a55 |
File details
Details for the file upload_files_to_github-1.3-py3-none-any.whl
.
File metadata
- Download URL: upload_files_to_github-1.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 995012e88a3262a4d451d4f4da1930022cda4997b1a0e512df9d40e106c938b7 |
|
MD5 | bb0513566af30906d0fff3f3218b6a99 |
|
BLAKE2b-256 | 573db376625dc8a56ea759d7bdc15439fbfc58532d2c41845c05ac3a28c4b5d9 |