Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Range requests on /assets/bytes/{path} #734

Open
danielballan opened this issue May 1, 2024 · 0 comments
Open

Support Range requests on /assets/bytes/{path} #734

danielballan opened this issue May 1, 2024 · 0 comments

Comments

@danielballan
Copy link
Member

danielballan commented May 1, 2024

Use case

from tiled.client import from_profile
import pandas

c = from_profile('local', api_key='secret')
df = pandas.DataFrame({"A": [1,2,3], "B": [4,5,6], "C": [7,8,9]})
c.write_dataframe(df, key="y")

import duckdb
db = duckdb.connect(':memory:')
db.execute('install httpfs; load httpfs;')
db.execute('SELECT * FROM read_parquet("http://localhost:8000/api/v1/asset/bytes/y?id=1&api_key=secret")')  # uses Range header

Background

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Range
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206
https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests

Starlette has postponed consideration of support for this. It might make sense to vendor a copy of this approach for now: encode/starlette#1999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant