Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
packed_directory = {}
for root, dirs, files in os.walk(directory):
for f in files:
relative_path = os.path.join(test_dir_name, f)
packed_directory[relative_path] = open(os.path.join(root, f), 'rb')
r = requests.post(
url=URL,
auth=HTTPDigestAuth('user', 'password'),
files=files,
data={
'foo': 'bar',
},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.