smart_open
smart_open copied to clipboard
Updated gcs.py to work with GCS generation id
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).
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.
@creativesands How's it going? Were you able to check out the suggestion from @petedannemann?
superceded by https://github.com/piskvorky/smart_open/pull/817