Skip to content

Commit

Permalink
docs: docstrings for blob_feature.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pbullhove committed Aug 21, 2023
1 parent 219748f commit b03fdad
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/features/blob/blob_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@
@create_response(PlainTextResponse)
def get_by_id(data_source_id: str, blob_id: str, user: User = Depends(auth_w_jwt_or_pat)):
"""Get blob from id.
A blob (binary large object) can be anything from video to text file.
A blob file is a binary object, which can be any kind of data object.
Args:
- data_source_id (str): The ID of the data source in which to find the blob.
- blob_id (str): The ID of the requested blob.
- user (User): The authenticated user accessing the endpoint, automatically generated from provided bearer token or Access-Key.
Returns:
- Filestream: The requested blob.
"""
return get_blob_use_case(user=user, data_source_id=data_source_id, blob_id=blob_id)

Expand All @@ -37,7 +46,17 @@ def upload(
file: UploadFile = File(...),
user: User = Depends(auth_w_jwt_or_pat),
):
"""Upload a new blob.
"""Upload a new blob or modify an existings blob.
A blob (binary large object) can be anything from video to text file.
If you give an ID to a blob that already exists, the old blob will be updated in place.
Args:
- data_source_id (str): The ID of the data source in which to store the blob.
- blob_id (str): The ID that the blob should be stored under.
- user (User): The authenticated user accessing the endpoint, automatically generated from provided bearer token or Access-Key.
Returns:
- str: OK (200)
"""
return upload_blob_use_case(user=user, data_source_id=data_source_id, blob_id=blob_id, file=file)

0 comments on commit b03fdad

Please sign in to comment.