Nitric logo

Storage

bucket.file.get()

Get a file from a bucket.

from nitric.resources import bucket

# Create a reference to an 'assets' bucket with permissions to read
assets = bucket('assets').allow('reading')

logo = assets.file('images/logo.png')

logo_data = await logo.get()

Examples

Get a file

from nitric.resources import bucket

assets = bucket('assets').allow('reading')

logo = assets.file('images/logo.png')

logo_data = await logo.get()
Previous
bucket.files()