Skip to main content

Backup GitHub projects to AWS S3

Project description

Git2S3

Backup GitHub projects to AWS S3

Python

Platform Supported

Platform

Deployments

pages pypi markdown

Pypi Pypi-format Pypi-status

Kick off

Recommendations

Install Git2S3

python -m pip install git2s3

Initiate - IDE

import git2s3


if __name__ == '__main__':
    git = git2s3.Git2S3()
    git.start()

Initiate - CLI

git2s3 start

Use git2s3 --help for usage instructions.

Environment Variables

Sourcing environment variables from an env file

By default, Git2S3 will look for a .env file in the current working directory.
Refer samples directory for examples.

  • GIT_API_URL - GitHub API endpoint. Defaults to https://api.github.com/
  • GIT_OWNER - GitHub profile owner or organization name.
  • GIT_TOKEN - GitHub token to get ALL repos (including private).
  • GIT_IGNORE - List of repositories/gists to ignore. Defaults to []
  • SOURCE - Source options [repo, gist, wiki] to back up. Defaults to all.
  • LOG - Log options to log to a file or stdout. Does not apply when custom logger is used
  • DEBUG - Boolean flag to enable debug level logging. Does not apply when custom logger is used
  • STORE_LOCAL - Boolean flag to store the backup locally. Defaults to False
  • AWS_PROFILE_NAME - AWS profile name. Uses the CLI config value AWS_DEFAULT_PROFILE by default.
  • AWS_ACCESS_KEY_ID - AWS access key ID. Uses the CLI config value AWS_ACCESS_KEY_ID by default.
  • AWS_SECRET_ACCESS_KEY - AWS secret key. Uses the CLI config value AWS_SECRET_ACCESS_KEY by default.
  • AWS_REGION_NAME - S3 bucket's region. Uses the CLI config value AWS_DEFAULT_REGION by default.
  • AWS_BUCKET_NAME - AWS bucket name to store the backups.
  • AWS_S3_PREFIX - S3 prefix (folder like) for the backup. Defaults to github
  • BOTO3_RETRY_ATTEMPTS - Number of retries for Boto3 client config. Defaults to 10
  • BOTO3_RETRY_MODE - Boto3 retry configuration for S3 client. Defaults to standard

Coding Standards

Docstring format: Google
Styling conventions: PEP 8 and isort

Release Notes

Requirement

python -m pip install gitverse

Usage

gitverse-release reverse -f release_notes.rst -t 'Release Notes'

Linting

pre-commit will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL markdown files (including Wiki pages)

Requirement

python -m pip install sphinx==5.1.1 pre-commit recommonmark

Usage

pre-commit run --all-files

Pypi Package

pypi-module

https://pypi.org/project/git2s3/

Runbook

made-with-sphinx-doc

https://thevickypedia.github.io/git2s3/

License & copyright

© Vignesh Rao

Licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

git2s3-0.0.3-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file git2s3-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: git2s3-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for git2s3-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 363fa2932251c444fa6bc775258f0e77b9bb2a655b7cc9a155c7dee4248dad92
MD5 2f4b64f11e7fbb8289d03973e8d7bc06
BLAKE2b-256 278f3c784a6cd611ba982dcf8bd7c77f1fa770969def15adbe82238dc6d2eed1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page