xyz-restful


Namexyz-restful JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/szuprefix/py-xyz-restful
Summaryrestful utils
upload_time2024-02-01 09:30:34
maintainer
docs_urlNone
authorszuprefix
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =================
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": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "szuprefix",
    "author_email": "szuprefix@126.com",
    "download_url": "",
    "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\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "restful utils",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/szuprefix/py-xyz-restful"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d89ff63191b09a94c6be316af6c67dde686ed237d454b097aaa75cf85bd5c9aa",
                "md5": "1378ddacf93cd69c5b2f92996ce835cf",
                "sha256": "764714bcc7f3b940a48030aadc41b7070fa2774cc1fc14ecf8adf49f9fd0a50f"
            },
            "downloads": -1,
            "filename": "xyz_restful-0.1.8-py2-none-any.whl",
            "has_sig": false,
            "md5_digest": "1378ddacf93cd69c5b2f92996ce835cf",
            "packagetype": "bdist_wheel",
            "python_version": "py2",
            "requires_python": null,
            "size": 9368,
            "upload_time": "2024-02-01T09:30:34",
            "upload_time_iso_8601": "2024-02-01T09:30:34.054628Z",
            "url": "https://files.pythonhosted.org/packages/d8/9f/f63191b09a94c6be316af6c67dde686ed237d454b097aaa75cf85bd5c9aa/xyz_restful-0.1.8-py2-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "411c1f3cf32834169084a7d700c3ea11dcf4dfdddcc9b0b77bf00445c5013d48",
                "md5": "75001490322cf566ab9358a519a58fea",
                "sha256": "7acd4fcdc285fd10c6ea797823ced7be04a46a44df0efc7202ed3ea3d278f150"
            },
            "downloads": -1,
            "filename": "xyz_restful-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75001490322cf566ab9358a519a58fea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9354,
            "upload_time": "2024-02-01T09:30:36",
            "upload_time_iso_8601": "2024-02-01T09:30:36.123112Z",
            "url": "https://files.pythonhosted.org/packages/41/1c/1f3cf32834169084a7d700c3ea11dcf4dfdddcc9b0b77bf00445c5013d48/xyz_restful-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-01 09:30:34",
    "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"
}
        
Elapsed time: 0.23876s