geraldoj
Posts: 5
Joined: Sat Mar 20, 2021 8:16 pm
Location: Limeira SP/Brazil

Writing to a file at OneDrive with Raspberry Pico W

Sun Aug 14, 2022 9:55 pm

Hello Colleagues,

I need to open a file at OneDrive for writing with Pico W. Could anyone give me some hints how to do it?
Thanks in advance!!!

User avatar
neilgl
Posts: 4958
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Writing to a file at OneDrive with Raspberry Pico W

Mon Aug 15, 2022 12:12 pm

We would usually use the API for Microsoft OneDrive, but I do not think any of the existing python libraries for OneDrive have been ported to pico MicroPython, unless someone knows better?

User avatar
aallan
Raspberry Pi Employee & Forum Moderator
Raspberry Pi Employee & Forum Moderator
Posts: 298
Joined: Mon Feb 09, 2015 11:30 am
Location: Exeter, UK

Re: Writing to a file at OneDrive with Raspberry Pico W

Tue Aug 16, 2022 9:21 am

geraldoj wrote:
Sun Aug 14, 2022 9:55 pm
I need to open a file at OneDrive for writing with Pico W. Could anyone give me some hints how to do it?

Doubtful that the OneDrive library has been ported to MicroPython. However, you should be able to use the urequests library to talk to the OneDrive service directly using the REST API, see https://docs.microsoft.com/en-us/onedri ... aph-online for documentation around that.
Head of Documentation
Raspberry Pi Ltd
About me, http://alasdairallan.com

bls
Posts: 2596
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA

Re: Writing to a file at OneDrive with Raspberry Pico W

Tue Aug 16, 2022 1:48 pm

Another approach would be to write to an intermediate system (a Pi, for instance) and use the onedrive app https://github.com/abraunegg/onedrive on that system to copy the file(s) to OneDrive.

I use that app to back up all my stuff to a OneDrive account. Getting everything uploaded the first time took a while, but now the nightly backups are pretty quick.
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo

Return to “MicroPython”