Desde las 12:00md se comenzó a instalar el sdk y se creó la API para la llave sin embargo se encontró con ciertos problemas para crear la carpeta, no sé que estará pasando.
Los enlaces de apoyo para instalar el sdk y crear la API son los siguientes:
http://www.programmingapps.net/2013/11/dropbox-crear-aplicacion/
https://www.dropbox.com/developers/core/sdks/python
https://www.dropbox.com/developers/core/start/python
Se copió el código en Python, se introdujeron las app key y app secret, y se creó un archivo txt automáticamente. Aún se tiene la dificultad de que en la página principal del Dropbox no aparece el ícono de la aplicación creada la cual lleva por nombre TareaP2SGmail.
(Código empleado)
# Include the Dropbox SDK import dropbox # Get your app key and secret from the Dropbox developer website app_key = 'INSERT_APP_KEY' app_secret = 'INSERT_APP_SECRET' flow = dropbox.client.DropboxOAuth2FlowNoRedirect(app_key, app_secret) # Have the user sign in and authorize this token authorize_url = flow.start() print '1. Go to: ' + authorize_url print '2. Click "Allow" (you might have to log in first)' print '3. Copy the authorization code.' code = raw_input("Enter the authorization code here: ").strip() # This will fail if the user enters an invalid authorization code access_token, user_id = flow.finish(code) client = dropbox.client.DropboxClient(access_token) print 'linked account: ', client.account_info() f = open('working-draft.txt', 'rb') response = client.put_file('/magnum-opus.txt', f) print 'uploaded: ', response folder_metadata = client.metadata('/') print 'metadata: ', folder_metadata f, metadata = client.get_file_and_metadata('/magnum-opus.txt') out = open('magnum-opus.txt', 'wb') out.write(f.read()) out.close() print metadataMientras se están realizando las investigaciones respectivas para encriptar con pycrypto en Python.8:46 PMSe comenzó con la interfaz.
No hay comentarios:
Publicar un comentario