Skip to main content

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


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.6.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file shimmers-0.6.tar.gz.

File metadata

  • Download URL: shimmers-0.6.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for shimmers-0.6.tar.gz
Algorithm Hash digest
SHA256 569287ab80ae21fc319e682ad21ddda3d95aa68608a97da8f8b199ac0a80ceca
MD5 4393a96cd063e229b23ca314e326796e
BLAKE2b-256 77b6680288212c65e23d0a7648253ebd0fb807f0b6aaa65e444e7bfa28e78c59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page