Skip to content

Instantly share code, notes, and snippets.

@aeshirey
Created March 9, 2020 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aeshirey/315d4931d824df46986f8245045aec86 to your computer and use it in GitHub Desktop.
Save aeshirey/315d4931d824df46986f8245045aec86 to your computer and use it in GitHub Desktop.
Code to read an adl:// file in Python
import fsspec
filename = 'adl://path/to/file.csv'
adl_auth = {
'tenant_id': "<tenant_id>",
'client_id': "<client_id>",
'client_secret': "PGNsaWVudF9zZWNyZXQ+"
}
fs_file = fsspec.open(filename, **adl_auth)
with fs_file.open() as fh:
for line in fh:
print(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment