shimmers
Project description
shimmers
simple client to upload files to / from an office 365 sharepoint site using waddle to provide credential management. named after the group of hummingbirds. pax avium.
based on office365-rest-python-client
quick start
pip install shimmers
usage
uploading a file
from waddle import load_config
from shimmers import Sharepoint
from io import BytesIO
conf = load_config('path/to/conf.yml')
sharepoint = Sharepoint(conf=conf, site_name='my_site')
buff = new BytesIO()
buff.write('hello, shimmers!\n'.encode('utf-8'))
sharepoint.upload(buff, 'Documents/hello_shimmers.txt')
downloading a file
from waddle import load_config
from shimmers import Sharepoint
conf = load_config('path/to/conf.yml')
sharepoint = Sharepoint(conf=conf, site_name='my_site')
buff = sharepoint.download('Documents/hello_shimmers.txt')
st = buff.getvalue().decode('utf-8')
print(st)
uploading a set of dataframes as a single excel spreadsheet
from waddle import load_config
from pandas import DataFrame
from shimmers import Sharepoint
conf = load_config('path/to/conf.yml')
sharepoint = Sharepoint(conf=conf, site_name='my_site')
df1 = DataFrame([dict(pet='sesame', type='cat'), dict(pet='peanut', type='dog')])
df2 = DataFrame([dict(pet='cody', owner='will'), dict(pet='kho', owner='boris')])
sharepoint.upload_dataframes('Documents/pets.xlsx', df1, 'names', df2, 'owners')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shimmers-0.3.tar.gz
(3.9 kB
view details)
File details
Details for the file shimmers-0.3.tar.gz
.
File metadata
- Download URL: shimmers-0.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
75fc73a6ef506274836f103a898d4955786e8f64da34f64e664ca89cb99dbcff
|
|
MD5 |
dfd24d10b36d4862ed038aa0d987d0c7
|
|
BLAKE2b-256 |
e4ac12f376a86a2670dfe07b6df682ce58d81741c94a2aa2777e4dc4371a2cb6
|