| 8 | |
| 9 | |
| 10 | class UserSessionClient(): |
| 11 | GET_SOURCE_ENDPOINT = '/requests/GetKernelRunSourceForCaipRequest' |
| 12 | |
| 13 | def __init__(self): |
| 14 | self.web_client = KaggleWebClient() |
| 15 | |
| 16 | def get_exportable_ipynb(self): |
| 17 | """Fetch the .ipynb source of the current notebook session. |
| 18 | |
| 19 | If Kaggle datasets are attached to the notebook, the source will |
| 20 | include an additonnal cell with logic to download the datasets |
| 21 | outside the Kaggle platform. |
| 22 | """ |
| 23 | request_body = { |
| 24 | 'UseDraft': True, |
| 25 | } |
| 26 | return self.web_client.make_post_request(request_body, self.GET_SOURCE_ENDPOINT) |
no outgoing calls