{ "info": { "author": "Mikhail Volkov", "author_email": "freylis2@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries" ], "description": "# yadisk-api\nYandex.disk HTTP API Python library\n\nGet your access token [here](https://tech.yandex.ru/disk/api/concepts/quickstart-docpage/)\n\nExample usage:\n\n import yadisk_api\n\n disk = yadisk_api.YandexDisk('my_token')\n\n # get info about my disk\n info = disk.get_disk_info()\n\n # get meta info about file/directory in my app directory/trash\n meta_info = disk.get_meta_info(\n path='path/to/my/file.jpg',\n preview_size='100x100',\n )\n\n # get audio files list in my disk\n files_info = disk.get_files_list(\n limit=50,\n media_type='audio',\n )\n\n # get last uploaded files list\n last_uploaded = disk.get_last_uploaded(\n limit=10,\n media_type='video',\n )\n\n # set meta data to file in your app directory\n setted_result = disk.set_meta_to_resource(\n 'my/file/to/extra/meta/data.txt,\n data={'Custom Header': 'custom value'},\n )\n\n # upload file to yandex disk\n with open('/path/to/my/file.txt', 'rb') as f:\n disk.upload_file(\n f,\n path='app:/directory/file.txt',\n overwrite=True\n )\n\n # upload file to disk by url\n disk.upload_file_from_url(\n 'http://example.com/sitemap.xml',\n path='app:/sitemap_example.xml',\n )\n\n # download file content from yandex.disk\n content = disk.download_file(\n 'app:/sitemap_example.xml',\n stream=False,\n )\n\n # copy resource in disk\n disk.copy_resource(\n from_path='app:/sitemap_example.xml',\n to_path='app:/sitemap_example_copy.xml',\n )\n\n # move resource in your disk\n disk.move_resource(\n from_path='app:/sitemap_example_copy.xml',\n to_path='app:/sitemap_example_movied_copy.xml',\n )\n\n # delete resource\n disk.delete_resource(\n 'app:/sitemap_example_movied_copy.xml',\n permanently=False, # to trash\n )\n\n # create folder in your disk\n disk.create_folder(\n 'app:/new_folder',\n )\n\n # publish\n disk.publish_resource('app:/new_folder')\n\n # unpublish\n disk.unpublish_resource('app:/new_folder')\n\n # fully empty trash\n disk.empty_trash()\n # or remove file from trash\n disk.empty_trash('app:/sitemap_example_movied_copy.xml')\n\n # restore resource from trash\n disk.restore_from_trash('app:/sitemap_example_movied_copy.xml')\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/freylis/yadisk-api", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "yadisk-api", "package_url": "https://pypi.org/project/yadisk-api/", "platform": "", "project_url": "https://pypi.org/project/yadisk-api/", "project_urls": { "Homepage": "https://github.com/freylis/yadisk-api" }, "release_url": "https://pypi.org/project/yadisk-api/1.0/", "requires_dist": null, "requires_python": "", "summary": "Yandex.disk http api client", "version": "1.0" }, "last_serial": 3641267, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "f20890baf5a4407fcfe855254b27a6c6", "sha256": "6ef22d7c88e1bde27286d02039df530d38ea703b3a043a6247fcc574ff80dd63" }, "downloads": -1, "filename": "yadisk-api-1.0.tar.gz", "has_sig": false, "md5_digest": "f20890baf5a4407fcfe855254b27a6c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5345, "upload_time": "2018-03-05T17:39:09", "url": "https://files.pythonhosted.org/packages/3d/a6/6b763f9708085676ec0eb4acc5b07d920d2d26bef557b96ba438680429a0/yadisk-api-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f20890baf5a4407fcfe855254b27a6c6", "sha256": "6ef22d7c88e1bde27286d02039df530d38ea703b3a043a6247fcc574ff80dd63" }, "downloads": -1, "filename": "yadisk-api-1.0.tar.gz", "has_sig": false, "md5_digest": "f20890baf5a4407fcfe855254b27a6c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5345, "upload_time": "2018-03-05T17:39:09", "url": "https://files.pythonhosted.org/packages/3d/a6/6b763f9708085676ec0eb4acc5b07d920d2d26bef557b96ba438680429a0/yadisk-api-1.0.tar.gz" } ] }