I have a notebook(jupyter lab) that is hosted on server at 0.0.0.0:8888 and password is enabled.
I can access its notebook via its local ip: 192.168.1.12:8888 from my laptop.
In there there is a file called
In my laptop local instance I would like to get/download/read that file.
url=‘http : / / 192.168.1.12:8888/files/projects/data/data.json’
df = pd.read_json(url)
How can I authenticate to get this file read?
Can you send sample or pseudo code.
The closest one is the 2nd link, but in this case password based notebooks don’t have username:
api_url = ‘http : / / 192.168.1.12:8888/files/projects/data/data.json’
#/files is an endpoint I presume? or should that be /api/files?
result = requests.get(api_url, auth=(‘username’, ‘password’))
#this is password protected notebook, so how do I just authenticate with password?