Gen3 File Class

class gen3.file.Gen3File(endpoint=None, auth_provider=None)[source]

Bases: object

For interacting with Gen3 file management features.

A class for interacting with the Gen3 file download services. Supports getting presigned urls right now.


auth_provider (Gen3Auth) – A Gen3Auth class instance.


This generates the Gen3File class pointed at the sandbox commons while using the credentials.json downloaded from the commons profile page.

>>> auth = Gen3Auth(refresh_file="credentials.json")
... file = Gen3File(auth)
get_presigned_url(guid, protocol=None)[source]

Generates a presigned URL for a file.

Retrieves a presigned url for a file giving access to a file for a limited time.

  • guid (str) – The GUID for the object to retrieve.

  • protocol (str, optional) – The protocol to use for picking the available URL for generating the presigned URL.


>>> Gen3File.get_presigned_url(query)