Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ all: help

venv:
mkdir -p venv
python -m venv venv
python3 -m venv venv
. venv/bin/activate && pip install -r requirements.txt && deactivate

sample_content:
Expand Down
2 changes: 1 addition & 1 deletion examples/ingest_hls.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async def hls_ingest(
flow_params: Optional[dict]
) -> None:
"""Upload segments from the HLS playlist"""
async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=True) as session:
await put_flow(session, credentials, tams_url, flow_id, source_id, flow_params)

object_urls = get_media_storage_urls(session, credentials, tams_url, flow_id, hls_segment_count)
Expand Down
6 changes: 3 additions & 3 deletions examples/outgest_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
async def get_flow(tams_url: str, credentials: Credentials, flow_id: UUID) -> dict:
"""Returns a Flow dict for the given Flow ID"""
flow_url = f"{tams_url}/flows/{flow_id}"
async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=True) as session:
async with get_request(session, credentials, flow_url) as resp:
resp.raise_for_status()
return await resp.json()
Expand All @@ -39,7 +39,7 @@ async def get_flow_segments(
) -> AsyncGenerator[dict, None]:
"""Generator of Flow Segment dicts for the given Flow ID and timerange"""
segments_url = f"{tams_url}/flows/{flow['id']}/segments?timerange={timerange!s}&presigned=true"
async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=True) as session:
while True:
async with get_request(session, credentials, segments_url) as resp:
resp.raise_for_status()
Expand Down Expand Up @@ -253,7 +253,7 @@ async def outgest_file(

output_timerange = TimeRange.never()
with av.open(output_filename, mode="w", format="mpegts") as av_output:
async with aiohttp.ClientSession() as media_object_session:
async with aiohttp.ClientSession(trust_env=True) as media_object_session:
async for segment in get_flow_segments(tams_url, credentials, flow, timerange):
try:
download_url = segment["get_urls"][0]["url"]
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async def simple_edit(
output_source_id: UUID,
) -> None:
"""Add timerange of segments from input 1 followed by a timerange of segments from input 2"""
async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=True) as session:
await put_flow(session, credentials, tams_url, output_flow_id, output_source_id)

# Add segments from input 1 to output
Expand Down Expand Up @@ -200,7 +200,7 @@ async def interval_edit(
"_copy_edit_interval": cut_interval_ts.to_sec_nsec()
}

async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=True) as session:
# Create output Flow
await put_flow(session, credentials, tams_url, output_flow_id, output_source_id, custom_tags=custom_tags)

Expand Down
2 changes: 1 addition & 1 deletion examples/utils/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def renew_credentials(self) -> None:
}
headers = get_basic_auth_header(self.client_id, self.client_secret)

async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=True) as session:
async with session.post(self.authorization_url, data=form_data, headers=headers) as resp:
resp.raise_for_status()

Expand Down
Loading