Çöó½ºÅ© - µå·Ó ¹Ú½º

Çöó½ºÅ© ÀÀ¿ë ÇÁ·Î±×·¥¿¡ Dropbox API Áö¿øÀ» Ãß°¡ÇϽʽÿÀ.
Áö±Ý ´Ù¿î·Îµå

Çöó½ºÅ© - µå·Ó ¹Ú½º ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • BSD License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Igor Davydenko
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://github.com/playpauseandstop/

Çöó½ºÅ© - µå·Ó ¹Ú½º ű×


Çöó½ºÅ© - µå·Ó ¹Ú½º ¼³¸í

Flask-dropbox´Â Çöó½ºÅ© ÀÀ¿ë ÇÁ·Î±×·¥¿¡ Dropbox API¸¦ Áö¿øÇÏ´Â Çöó½ºÅ© È®ÀåÀÔ´Ï´Ù .InstallationPIP ¼³Ä¡ Çöó½ºÅ© -PropboxConfigurationsecret_KeyRequired. ÅäÅ«Àº Çöó½ºÅ©ÀÇ ¼¼¼Ç ÀνºÅϽº¿¡ ÀúÀåµÇ¹Ç·Î Application.DropBox_KeyRequiredÀÇ ºñ¹Ð Å°¸¦ ±¸¼ºÇؾßÇÕ´Ï´Ù. Dropbox Developer Site.DropBox_SecretRequiredÀÇ App Å°. Dropbox Developer Site.DropBox_Access_TypeRequiredÀÇ ºñ¹Ð Å°. app.dropbox_callback_urlby ±âº»°ªÀ¸·Î ±¸¼ºµÈ 'dropbox'¶Ç´Â 'app_folder'À̾î¾ßÇÕ´Ï´Ù.ÀÌ ¼³Á¤À» Á¦°ø ÇÒ ÇÊ¿ä°¡ ¾øÀ¸¹Ç·Î flask-dropbox°¡ Äݹé URLÀ» ÀÚµ¿À¸·Î usign ÇöÀç È£½ºÆ® ¹× ¿äû À¯ÇüÀ» ¼³Á¤ÇÕ´Ï´Ù.ÇÏÁö¸¸ t ¿ì¸®¸¦ ½Å·Ú Çϸ鼭ÀÌ ¼³Á¤À» ¼öµ¿À¸·Î ´Ù½Ã ÀÛ¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù. Dropbox API¿¡¼­ OAuth CallbackÀ» ó¸®ÇÏ´Â µ¿¾È ¿À·ù¸¦ Ç¥½ÃÇÏ´Â µ¥ »ç¿ëÇÒ Dropbox_Callback_templateTemplateÀÔ´Ï´Ù. ±âº»ÀûÀ¸·Î : 'dropbox / callback.html'.next boolean vars°¡ ÅÛÇø´À¸·Î Àü¼Û µÉ ¼ö ÀÖ½À´Ï´Ù. - error_oauth_token - dropbox api´Â OAuth ÅäÅ«À» ¸®ÅÏÇÏÁö ¾Ê¾Ò½À´Ï´Ù .- error_not_equal_tokens - Dropbox¿¡¼­ ÀúÀåµÈ ¿äû ÅäÅ«ÀÌ µ¿ÀÏÇÏÁö ¾Ê½À´Ï´Ù. ¼¼¼Ç .- ERROR_RESPONSE - DROPBOX API´Â errorresponse ÀνºÅϽº¸¦ ¹ÝȯÇÕ´Ï´Ù. ¶ÇÇÑ ¿À·ù var°¡ ÅÛÇø®Æ® torives·Î ¹­¿©ÀÖ´Â ½ÇÁ¦ ¿¹¿Ü´Â »ç¿ëÀÚ°¡ Dropbox °èÁ¤À¸·Î ¼º°øÀûÀ¸·Î ·Î±×ÀÎ ÇÑ ÈÄ¿¡ »ç¿ëÀÚ°¡ ¼º°øÀûÀ¸·Î ·Î±×ÀÎ ÇÑ ÈÄ¿¡ ¸®µð·º¼ÇÀ» ¼öÇàÇÕ´Ï´Ù. ±âº»ÀûÀ¸·Î »ç¿ëÀÚ°¡ ÀÎÁõ µÈ Dropbox ¼¼¼Ç¿¡¼­ ·Î±× ¾Æ¿ô ÇÑ ÈÄ¿¡ ¸®µð·º¼ÇÀ» ´­·¯¾ßÇÕ´Ï´Ù. ±âº»ÀûÀ¸·Î ´ÙÀ½ : /.usageapp.py:From Çöó½ºÅ© °¡Á® ¿À±â flaskfrom flask.ext.dropbox import dropbox, dropboxblueprintimport settingsApp = flaxch (__ name __) app.config.from_object (¼³Á¤) dropbox = dropbox (app) dropbox_blueprint (dropbox) ¾Û. register_blueprint (dropbox_blueprint, url_prefix = '/ dropbox') setting.py-secret_key = 'secret-key'dropbox_key ='dropbox-app-key'key = 'dropbox-app-key'dropbox_secret ='dropbox-app-secret'dropbox_access_type = 'app_folder'views.py : Çöó½ºÅ© °¡Á® ¿À±â URL_ForFrom Werkzeug °¡Á® ¿À±â Secure_FilenameFrom App °¡Á® ¿À±â ¾Û, dropbox@app.route ( '/') def home () : return u'click dropbox·Î ·Î±×ÀÎÇÏ·Á¸é % \ dropbox.login_url@app.route ( '/ success /') def ¼º°ø (filename) : return u'fileÀÌ / % s '% filename@app.route ('/ upload ', methods = (' ','post ')) def upload () : dobbox.is_authenticated°¡ ¾Æ´Ñ °æ¿ì, RETURN REATILECT (URL_FOR ('Ȩ ') : client = dropbox.client filename = secure_filename (file.filename) # ½ÇÁ¦ ÇÁ·Î¼¼½º °á°ú = client.put_file ( '/'+ filename, file_obj.read ()) °æ·Î = °á°ú . lstrip ( '/' ) ¸®ÅÏ ¸®µð·º¼Ç (URL_FOR ( '¼º°ø', filename = °æ·Î)) u '

'\ u ''\ u ''\ u ''¹ö±×, ±â´É ¿äû? Flask-dropbox ¶óÀ̺귯¸®ÀÇ ¹ö±×¸¦ ¹ß°ßÇϸé ÇÁ·ÎÁ§Æ®ÀÇ github ¹®Á¦¿¡ »õ·Î¿î ¹®Á¦¸¦ Ãß°¡ÇϽʽÿÀ. Á¦Ç° ȨÆäÀÌÁö


Çöó½ºÅ© - µå·Ó ¹Ú½º °ü·Ã ¼ÒÇÁÆ®¿þ¾î