MCPcopy Create free account
hub / github.com/openai/openai-agents-python / _tar_bytes

Function _tar_bytes

tests/sandbox/test_tar_utils.py:26–34  ·  view source on GitHub ↗
(*members: _Member)

Source from the content-addressed store, hash-verified

24
25
26def _tar_bytes(*members: _Member) -> bytes:
27 buf = io.BytesIO()
28 with tarfile.open(fileobj=buf, mode="w") as tar:
29 for member in members:
30 if member.payload is None:
31 tar.addfile(member.info)
32 else:
33 tar.addfile(member.info, io.BytesIO(member.payload))
34 return buf.getvalue()
35
36
37def _dir(name: str) -> _Member:

Calls 1

openMethod · 0.80

Tested by

no test coverage detected