{ "info": { "author": "Tarvitz", "author_email": "tarvitz@blacklibrary.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "===============================\nUnity Assets Server http client\n===============================\n.. image:: https://badge.fury.io/py/django-unity-asset-server-http-client.svg\n :target: http://badge.fury.io/py/django-unity-asset-server-http-client\n\n.. contents:: :local:\n :depth: 2\n\n\nLICENSE\n-------\nMIT\n\nRequirements\n------------\n\n- python 2.7\n- django 1.6+\n- djangorestframework 2.4.3+\n- django-filter 0.8\n\nQuick start\n-----------\n\n1. Add \"duashttp\" to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = (\n ...\n 'duashttp',\n )\n\n2. Add unity asset server router in your INSTALLED_APPS settings and configure\naccess to unity asset server access.\n\n.. code-block:: python\n\n DATABASE_ROUTERS = ['duashttp.router.UnityAssetServerRouter', ]\n\n.. code-block:: python\n\n DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n },\n 'unity_asset_server': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'game_project_database_name',\n 'USER': 'admin',\n 'PASSWORD': 'admin_password',\n 'HOST': '192.168.0.1', # There UNITY asset server is placed on\n 'PORT': '10733' # standard unity asset server port number\n }\n }\n\n\n3. Manage your ``settings.py`` with django restframe work settings to\nget optimal config:\n\n.. code-block:: python\n\n\n REST_FRAMEWORK = {\n 'PAGINATE_BY': 10,\n 'PAGINATE_BY_PARAM': 'page_size',\n # Maximum limit allowed when using `?page_size=xxx`.\n 'MAX_PAGINATE_BY': 100,\n 'DEFAULT_AUTHENTICATION_CLASSES': (\n 'rest_framework.authentication.BasicAuthentication',\n 'rest_framework.authentication.SessionAuthentication',\n ),\n 'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',)\n }\n\n4. Apply your custom view sets or use existent and include them in \"urls.py\":\n\n.. code-block:: python\n\n # -*- views.py -*-\n from duashttp.views.api import AssetVersionViewSetBase\n\n from rest_framework.decorators import list_route\n from rest_framework.response import Response\n\n from django.db.models import Q\n\n\n class AssetVersionViewSet(AssetVersionViewSetBase):\n \"\"\" AssetVersion view set \"\"\"\n @list_route()\n def configs(self, request):\n \"\"\"get xml configs with their last revision\"\"\"\n qset = (\n Q(name__icontains='.xml') &\n ~Q(name__icontains='(DEL_') &\n ~Q(name__icontains='~$')\n )\n xml_docs = self.queryset.filter(qset).order_by(\n 'name', '-revision').distinct('name')\n docs = self.filter_queryset(xml_docs)\n page = self.paginate_queryset(docs)\n serializer = self.get_pagination_serializer(page)\n return Response(serializer.data)\n\n.. code-block:: python\n\n # -*- urls.py -*-\n from django.conf.urls import patterns, include, url\n from views import *\n from rest_framework import routers\n\n router = routers.DefaultRouter()\n router.register(r'asset_versions', AssetVersionViewSet)\n\n\n urlpatterns = patterns('',\n # Examples:\n url(r'^api/', include(router.urls)),\n url(r'^api/', include(router.urls, namespace='api')),\n )\n\n5. Start the development server and visit http://127.0.0.1:8000/api/\n to see available api calls.\n\nModels\n------\nYou can fetch data from unity asset server (based on posgres 8.3) using this:\n\n.. code-block:: python\n\n >>> from duashttp.models import AssetVersion\n >>> versions = AssetVersion.objects.filter(name__icontains='Actions.xml')\n >>> versions\n ... [, ,\n ... , ,\n ... , ,\n ... , ,\n ... , ,\n ... , ,\n ... , '...(remaining elements truncated)...']\n >>> version = versions.get(revision=45)\n >>> print(version.get_blob_data())\n ... \n ... \n ... \n ... 1\n ... 1\n ... \n ... SmallAction_gems_3_dollar\n ... lucky_gem\n ... 1\n ... \n ... \n ... \n ... \n ... 27/10/2014 08:00\n ... 27/10/2014 08:00\n ... 31/10/2014 08:00\n ... 31/10/2014 08:00\n ... \n ... \n ... \n ... \n ... ", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/tarvitz/django-unity-asset-server-http-client/archive/v0.1.5.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tarvitz/django-unity-asset-server-http-client", "keywords": null, "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "django-unity-asset-server-http-client", "package_url": "https://pypi.org/project/django-unity-asset-server-http-client/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-unity-asset-server-http-client/", "project_urls": { "Download": "https://github.com/tarvitz/django-unity-asset-server-http-client/archive/v0.1.5.tar.gz", "Homepage": "https://github.com/tarvitz/django-unity-asset-server-http-client" }, "release_url": "https://pypi.org/project/django-unity-asset-server-http-client/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "REST-api bases over unity asset server for some routines.", "version": "0.1.5" }, "last_serial": 1579920, "releases": { "0.1": [], "0.1.1": [], "0.1.2": [], "0.1.3": [ { "comment_text": "", "digests": { "md5": "f904292a829fecdd3c1b7e25606e1a1d", "sha256": "01ead208efc1be88f1c9f2c5242ba509c6c769b8af7235ed5ae76907d52d5d0b" }, "downloads": -1, "filename": "django-unity-asset-server-http-client-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f904292a829fecdd3c1b7e25606e1a1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9675, "upload_time": "2014-10-31T14:21:16", "url": "https://files.pythonhosted.org/packages/82/89/6d22b63435367b6ab1da5f68ae43581fded887f710c949caee9f9f7988f8/django-unity-asset-server-http-client-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "a5856bddce2d8488853d1481cd05aa2b", "sha256": "0117a93374d11134d0be2a0ca767044a12a5128f890f2d1499cbae287528522e" }, "downloads": -1, "filename": "django-unity-asset-server-http-client-0.1.4.tar.gz", "has_sig": false, "md5_digest": "a5856bddce2d8488853d1481cd05aa2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9711, "upload_time": "2014-11-26T14:47:53", "url": "https://files.pythonhosted.org/packages/a9/91/efdff9db7a87d9a3235a326cdd814eea9579605908571878e2825f75dc2e/django-unity-asset-server-http-client-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "built for Linux-3.13.0-53-generic-x86_64-with-glibc2.4", "digests": { "md5": "c50c69c8c94744d3a9d248be98df91ad", "sha256": "e96714dec53543ef36a87f37770a6af5f1df08de5cc2fe84f219209808c0841f" }, "downloads": -1, "filename": "django-unity-asset-server-http-client-0.1.5.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "c50c69c8c94744d3a9d248be98df91ad", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13820, "upload_time": "2015-06-05T13:34:04", "url": "https://files.pythonhosted.org/packages/8d/ca/33a8348d1276ec2c662584ff6cd4cf3d69d658487e8919206bbf57d8049d/django-unity-asset-server-http-client-0.1.5.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "7c8d251382ec9aea85f58925c667c0c3", "sha256": "59dec887ff89874f74a3350054a023995894f373206f58f6aefd8bbfdd3720a9" }, "downloads": -1, "filename": "django_unity_asset_server_http_client-0.1.5-py2-none-any.whl", "has_sig": false, "md5_digest": "7c8d251382ec9aea85f58925c667c0c3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 16261, "upload_time": "2015-06-05T13:34:07", "url": "https://files.pythonhosted.org/packages/4d/31/8cbd409cb3021374e0736223920f5aa4209c17c16bafe21bed81ae3e7ce5/django_unity_asset_server_http_client-0.1.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef859d48eafaaeb445b80075c81342a0", "sha256": "a639e9412c8253c117d325876d4ff983f1f48d55196bd06a5c3b6e43bcab3a9c" }, "downloads": -1, "filename": "django-unity-asset-server-http-client-0.1.5.tar.gz", "has_sig": false, "md5_digest": "ef859d48eafaaeb445b80075c81342a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9980, "upload_time": "2015-06-05T13:34:00", "url": "https://files.pythonhosted.org/packages/d2/22/bf6426784de35d31a5b0f02cbfaacaec2fe0c371cc2603fd910f52dd0629/django-unity-asset-server-http-client-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-3.13.0-53-generic-x86_64-with-glibc2.4", "digests": { "md5": "c50c69c8c94744d3a9d248be98df91ad", "sha256": "e96714dec53543ef36a87f37770a6af5f1df08de5cc2fe84f219209808c0841f" }, "downloads": -1, "filename": "django-unity-asset-server-http-client-0.1.5.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "c50c69c8c94744d3a9d248be98df91ad", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13820, "upload_time": "2015-06-05T13:34:04", "url": "https://files.pythonhosted.org/packages/8d/ca/33a8348d1276ec2c662584ff6cd4cf3d69d658487e8919206bbf57d8049d/django-unity-asset-server-http-client-0.1.5.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "7c8d251382ec9aea85f58925c667c0c3", "sha256": "59dec887ff89874f74a3350054a023995894f373206f58f6aefd8bbfdd3720a9" }, "downloads": -1, "filename": "django_unity_asset_server_http_client-0.1.5-py2-none-any.whl", "has_sig": false, "md5_digest": "7c8d251382ec9aea85f58925c667c0c3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 16261, "upload_time": "2015-06-05T13:34:07", "url": "https://files.pythonhosted.org/packages/4d/31/8cbd409cb3021374e0736223920f5aa4209c17c16bafe21bed81ae3e7ce5/django_unity_asset_server_http_client-0.1.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef859d48eafaaeb445b80075c81342a0", "sha256": "a639e9412c8253c117d325876d4ff983f1f48d55196bd06a5c3b6e43bcab3a9c" }, "downloads": -1, "filename": "django-unity-asset-server-http-client-0.1.5.tar.gz", "has_sig": false, "md5_digest": "ef859d48eafaaeb445b80075c81342a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9980, "upload_time": "2015-06-05T13:34:00", "url": "https://files.pythonhosted.org/packages/d2/22/bf6426784de35d31a5b0f02cbfaacaec2fe0c371cc2603fd910f52dd0629/django-unity-asset-server-http-client-0.1.5.tar.gz" } ] }