Skip to content

Publicador is a Python tools that let you upload documents to cloud platforms such as Google Drive and Dropbox.

License

Notifications You must be signed in to change notification settings

instituciones-abiertas/publicador

Repository files navigation

IA² | publicador

IA²

File publisher for IA²


PyPI version PyPI version License Contributor Covenant

About

The publicador package helps with the uploading files process. It currently supports the following platforms:

  • Googledrive
  • Dropbox

Pre-requisites

In order to use you need to setup a few credentials for the platform you need:

Install package via pip

pip install publicador

Usage

This example publishes an input.docx file to Googledrive and Dropbox

from publicador import Publicador
from publicador import GoogleDrive
from publicador import DropboxApi

google_credentials = 'path/to/credentials.json'
drivepath = '/example-dir'

context = Publicador('./input.docx', GoogleDrive(google_credentials, drivepath))
context.publicar()

token = 'app_token_from_dropbox'
dropxbox_path= '/example-dir'
context.strategy = DropboxApi(token, dropxbox_path)
context.publicar()

License

GNU General Public License version 3