=================
XYZ RestFul API
=================
XYZ RestFul API provides a way to register django-rest-framework apis as easy as Django admins.
Usage Example
-------------
First, add 'xyz_restful' into django settings's INSTALLED_APPS
::
INSTALLED_APPS = [
...
'xyz_restful',
...
]
Then, register url router in project's ``"urls.py"``
::
from xyz_restful.helper import router
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^api/', include(router.urls)),
...
]
Then, in an app for example: comment , create a file ``"comment/apis.py"``
::
from xyz_restful.decorators import register
@register()
class PostViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PostSerializer
queryset = models.Post.objects.all()
then, full api url just like :
``http://127.0.0.1:8000/api/comment/post/``
Enjoyed!
Raw data
{
"_id": null,
"home_page": "https://github.com/szuprefix/py-xyz-restful",
"name": "xyz-restful",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "szuprefix",
"author_email": "szuprefix@126.com",
"download_url": null,
"platform": null,
"description": "=================\nXYZ RestFul API\n=================\n\nXYZ RestFul API provides a way to register django-rest-framework apis as easy as Django admins.\n\nUsage Example\n-------------\n\nFirst, add 'xyz_restful' into django settings's INSTALLED_APPS\n::\n\n INSTALLED_APPS = [\n ...\n 'xyz_restful',\n ...\n ]\n\nThen, register url router in project's ``\"urls.py\"``\n::\n\n from xyz_restful.helper import router\n\n urlpatterns = [\n url(r'^admin/', admin.site.urls),\n url(r'^api/', include(router.urls)),\n ...\n ]\n\nThen, in an app for example: comment , create a file ``\"comment/apis.py\"``\n::\n\n from xyz_restful.decorators import register\n\n @register()\n class PostViewSet(viewsets.ModelViewSet):\n serializer_class = serializers.PostSerializer\n queryset = models.Post.objects.all()\n\nthen, full api url just like :\n``http://127.0.0.1:8000/api/comment/post/``\n\nEnjoyed!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "restful utils",
"version": "0.3.2",
"project_urls": {
"Homepage": "https://github.com/szuprefix/py-xyz-restful"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "83e7e96014f41e444b6b046647d5d6d1640d96d2773d3eb148f29daf56454a02",
"md5": "3dd42ad9c0f1669a39b551fe77889c96",
"sha256": "feb2470166696eb9954316b42ca8b26521af68d3f5a0793e69b2b3566974be9c"
},
"downloads": -1,
"filename": "xyz_restful-0.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3dd42ad9c0f1669a39b551fe77889c96",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9627,
"upload_time": "2025-07-27T03:23:40",
"upload_time_iso_8601": "2025-07-27T03:23:40.883260Z",
"url": "https://files.pythonhosted.org/packages/83/e7/e96014f41e444b6b046647d5d6d1640d96d2773d3eb148f29daf56454a02/xyz_restful-0.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-27 03:23:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "szuprefix",
"github_project": "py-xyz-restful",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "xyz-restful"
}