smart_open icon indicating copy to clipboard operation
smart_open copied to clipboard

Updated gcs.py to work with GCS generation id

Open creativesands opened this issue 5 years ago • 2 comments

example of GCS URI with generation id: gs://bucket/file.txt#1603446325157502 with smart_open: open('gs://bucket/file.txt#1603446325157502', transport_params={'client': client})

Update to gcs.py to allow reading from URI with generation (version) ids

Motivation

Had to make smart_open be able to open specific versions of a GCS blob based on its generation id. Reads will use the generation id while writes will ignore it in the URI (a new id will be generated by GCS on write).

creativesands avatar Oct 30 '20 06:10 creativesands

I think I'd prefer to add a transport parameter for version ids instead of tacking them onto the filename. Look at version_id in s3.py for a similar example.

petedannemann avatar Oct 30 '20 15:10 petedannemann

@creativesands How's it going? Were you able to check out the suggestion from @petedannemann?

mpenkov avatar Dec 30 '20 05:12 mpenkov

superceded by https://github.com/piskvorky/smart_open/pull/817

ddelange avatar Mar 29 '24 05:03 ddelange