{ "info": { "author": "ramusus", "author_email": "ramusus@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Django Vkontakte Groups Migration\n\n[![Build Status](https://travis-ci.org/ramusus/django-vkontakte-groups-migration.png?branch=master)](https://travis-ci.org/ramusus/django-vkontakte-groups-migration) [![Coverage Status](https://coveralls.io/repos/ramusus/django-vkontakte-groups-migration/badge.png?branch=master)](https://coveralls.io/r/ramusus/django-vkontakte-groups-migration)\n\n\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 API \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 Django\n\n## \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\n\n pip install django-vkontakte-groups-migration\n\n\u0412 `settings.py` \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:\n\n INSTALLED_APPS = (\n ...\n 'oauth_tokens',\n 'vkontakte_api',\n 'vkontakte_users',\n 'vkontakte_groups',\n 'vkontakte_groups_migration',\n )\n\n # oauth-tokens settings\n OAUTH_TOKENS_HISTORY = True # to keep in DB expired access tokens\n OAUTH_TOKENS_VKONTAKTE_CLIENT_ID = '' # application ID\n OAUTH_TOKENS_VKONTAKTE_CLIENT_SECRET = '' # application secret key\n OAUTH_TOKENS_VKONTAKTE_SCOPE = ['ads,wall,photos,friends,stats'] # application scopes\n OAUTH_TOKENS_VKONTAKTE_USERNAME = '' # user login\n OAUTH_TOKENS_VKONTAKTE_PASSWORD = '' # user password\n OAUTH_TOKENS_VKONTAKTE_PHONE_END = '' # last 4 digits of user mobile phone\n\n## \u041f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API\n\n* [groups.getMembers](http://vk.com/developers.php?oid=-1&p=groups.getMembers) \u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b;\n\n\u0412 \u043f\u043b\u0430\u043d\u0430\u0445:\n\n* \u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e groups.getMembers \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 [`django-vkontakte-groups`](http://github.com/ramusus/django-vkontakte-groups/);\n\n## \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\n\n### \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0437\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b\n\n >>> from vkontakte_groups.models import Group\n >>> group = Group.remote.fetch(ids=[16297716])[0]\n >>> group.update_users()\n\n\u0421\u0440\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\n\n >>> migration = group.migrations.all()[0]\n >>> len(migration.members_ids)\n 5277888\n >>> migration.members_count\n 5277888\n\n\u041f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\n\n >>> group.users.count()\n 5277888", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/django-twitter-relations-history", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ramusus/django-twitter-relations-history", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-twitter-relations-history", "package_url": "https://pypi.org/project/django-twitter-relations-history/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-twitter-relations-history/", "project_urls": { "Download": "http://pypi.python.org/pypi/django-twitter-relations-history", "Homepage": "https://github.com/ramusus/django-twitter-relations-history" }, "release_url": "https://pypi.org/project/django-twitter-relations-history/0.3.8/", "requires_dist": null, "requires_python": null, "summary": "Django implementation for storing twitter user relations history", "version": "0.3.8" }, "last_serial": 790921, "releases": { "0.3.8": [ { "comment_text": "", "digests": { "md5": "43a1044a00249778b64526a3090bdcb0", "sha256": "2bc7be3d14fc9d191f44e1b4a4faf2ae7b188464a675e0d0775362864669357c" }, "downloads": -1, "filename": "django-twitter-relations-history-0.3.8.tar.gz", "has_sig": false, "md5_digest": "43a1044a00249778b64526a3090bdcb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16463, "upload_time": "2013-05-14T17:20:39", "url": "https://files.pythonhosted.org/packages/3f/43/e1d6cc328a60c9692a5d48ba7780679f02940d6379e5000150b5c29dbdd5/django-twitter-relations-history-0.3.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "43a1044a00249778b64526a3090bdcb0", "sha256": "2bc7be3d14fc9d191f44e1b4a4faf2ae7b188464a675e0d0775362864669357c" }, "downloads": -1, "filename": "django-twitter-relations-history-0.3.8.tar.gz", "has_sig": false, "md5_digest": "43a1044a00249778b64526a3090bdcb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16463, "upload_time": "2013-05-14T17:20:39", "url": "https://files.pythonhosted.org/packages/3f/43/e1d6cc328a60c9692a5d48ba7780679f02940d6379e5000150b5c29dbdd5/django-twitter-relations-history-0.3.8.tar.gz" } ] }