{"id":20253790,"url":"https://github.com/chanzuckerberg/gs","last_synced_at":"2025-04-10T23:44:09.349Z","repository":{"id":89777073,"uuid":"145651785","full_name":"chanzuckerberg/gs","owner":"chanzuckerberg","description":"A small, user-friendly Google Cloud Storage CLI client","archived":false,"fork":false,"pushed_at":"2020-07-15T21:34:52.000Z","size":143,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T23:43:48.879Z","etag":null,"topics":["cli","gcp","gcp-storage","google-cloud","google-storage"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chanzuckerberg.png","metadata":{"files":{"readme":"README.rst","changelog":"Changes.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-22T03:34:47.000Z","updated_at":"2022-06-10T14:58:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea5c432a-8fd0-47fd-a776-db8116a6ea6c","html_url":"https://github.com/chanzuckerberg/gs","commit_stats":null,"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanzuckerberg%2Fgs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanzuckerberg%2Fgs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanzuckerberg%2Fgs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanzuckerberg%2Fgs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chanzuckerberg","download_url":"https://codeload.github.com/chanzuckerberg/gs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317726,"owners_count":21083528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gcp","gcp-storage","google-cloud","google-storage"],"created_at":"2024-11-14T10:27:33.586Z","updated_at":"2025-04-10T23:44:09.341Z","avatar_url":"https://github.com/chanzuckerberg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"GS: A minimalistic Google Storage client\n========================================\n\n*gs* is a command line interface (CLI) and Python library that provides a set of essential commands for\n`Google Cloud Storage \u003chttps://cloud.google.com/storage/\u003e`_. It is modeled after the AWS CLI's ``aws s3`` command. Its\nfeatures are:\n\n* Python 3 compatibility\n* A minimalistic set of dependencies\n* A tiny footprint\n* Intuitive convention-driven configuration of API credentials without browser login prompts\n* Checksum validation to ensure end-to-end data integrity in uploads and downloads\n* Progress bars for long-running upload and download operations\n* Resumable uploads and downloads\n* Multithreaded directory sync and batch delete, capable of handling large numbers of objects\n* An attractive paging and table layout interface\n* A JSON object metadata output mode for feeding data to other utilities\n\nInstallation\n~~~~~~~~~~~~\n::\n\n   pip install gs\n\nSynopsis\n~~~~~~~~\nUsage:\n  ``gs [OPTIONS] COMMAND [ARGS]...``\n\nOptions:\n  --version  Show the version and exit.\n  --help     Show this message and exit.\n\nCommands:\n   +------------------+--------------------------------------------------+\n   | ``gs configure`` | Set gs config options, including the API key.    |\n   +------------------+--------------------------------------------------+\n   | ``gs ls``        | List buckets or objects in a bucket/prefix.      |\n   +------------------+--------------------------------------------------+\n   | ``gs cp``        | Copy files to, from, or between buckets.         |\n   +------------------+--------------------------------------------------+\n   | ``gs mv``        | Move files to, from, or between buckets.         |\n   +------------------+--------------------------------------------------+\n   | ``gs mb``        | Create a new Google Storage bucket.              |\n   +------------------+--------------------------------------------------+\n   | ``gs rb``        | Permanently delete an empty bucket.              |\n   +------------------+--------------------------------------------------+\n   | ``gs rm``        | Delete objects (files) from buckets.             |\n   +------------------+--------------------------------------------------+\n   | ``gs sync``      | Sync a directory of files with bucket/prefix.    |\n   +------------------+--------------------------------------------------+\n   | ``gs api``       | Use httpie to perform a raw HTTP API request.    |\n   +------------------+--------------------------------------------------+\n   | ``gs presign``   | Get a pre-signed URL for accessing an object.    |\n   +------------------+--------------------------------------------------+\n\nRun ``gs configure`` to configure Google service account access credentials that will be used by the\n``gs`` command. You can create a new service account key at https://console.cloud.google.com/iam-admin/serviceaccounts.\n\nCredentials\n~~~~~~~~~~~\nBefore making API calls, *gs* ingests API credentials in the following order of priority:\n\n- First, *gs* checks if a ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable is set. If so, it attempts to load and use\n  credentials from the service account credentials filename referenced by the variable.\n- If that varible is not set, *gs* attempts to load service account credentials previously configured with ``gs configure``\n  (stored in ``~/.config/gs/config.json``).\n- If that fails, *gs* attempts to load a service account API token from\n  `Google instance metadata \u003chttps://cloud.google.com/compute/docs/storing-retrieving-metadata\u003e`_.\n- If that fails, *gs* prints a warning and attempts to make API requests\n  `anonymously \u003chttps://cloud.google.com/storage/docs/access-public-data\u003e`_.\n\nUsing the Python library interface\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n.. code-block:: python\n\n    from gs import GSClient\n    client = GSClient()\n    object_meta = client.get(\"b/my-bucket/o/my-object\")\n    with client.get(\"b/my-bucket/o/my-object\", params=dict(alt=\"media\"), stream=True) as res:\n        object_bytes = res.raw.read()\n    presigned_url = client.get_presigned_url(\"my-bucket\", \"my-object\", expires_at=time.time()+3600)\n\nAuthors\n-------\n* Andrey Kislyuk\n\nLinks\n-----\n* `Project home page (GitHub) \u003chttps://github.com/chanzuckerberg/gs\u003e`_\n* `Package distribution (PyPI) \u003chttps://pypi.python.org/pypi/gs\u003e`_\n* `Change log \u003chttps://github.com/chanzuckerberg/gs/blob/master/Changes.rst\u003e`_\n* `GCB builds \u003chttps://console.cloud.google.com/cloud-build/builds\u003e`_\n* `Google Cloud Storage \u003chttps://cloud.google.com/storage/\u003e`_\n\nBugs\n~~~~\nPlease report bugs, issues, feature requests, etc. on `GitHub \u003chttps://github.com/chanzuckerberg/gs/issues\u003e`_.\n\nLicense\n-------\nLicensed under the terms of the MIT License.\n\n.. image:: https://travis-ci.com/chanzuckerberg/gs.png\n   :target: https://travis-ci.com/chanzuckerberg/gs\n.. image:: https://img.shields.io/pypi/v/gs.svg\n   :target: https://pypi.python.org/pypi/gs\n.. image:: https://img.shields.io/pypi/l/gs.svg\n   :target: https://pypi.python.org/pypi/gs\n.. image:: https://codecov.io/gh/chanzuckerberg/gs/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/chanzuckerberg/gs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanzuckerberg%2Fgs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchanzuckerberg%2Fgs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanzuckerberg%2Fgs/lists"}