=================
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.2.0",
"project_urls": {
"Homepage": "https://github.com/szuprefix/py-xyz-restful"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ec44223895bd0550582145bd46151d0ab8c69a962c53016676f5193ec9656038",
"md5": "c3d959b051498ef4c8f3c11e8de43260",
"sha256": "59acfdbd0c8809e7f0189d3f91aecc1a6c07e232b1a45729fa226137c595f4e4"
},
"downloads": -1,
"filename": "xyz_restful-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c3d959b051498ef4c8f3c11e8de43260",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9327,
"upload_time": "2024-10-06T17:30:31",
"upload_time_iso_8601": "2024-10-06T17:30:31.064539Z",
"url": "https://files.pythonhosted.org/packages/ec/44/223895bd0550582145bd46151d0ab8c69a962c53016676f5193ec9656038/xyz_restful-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-06 17:30:31",
"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"
}