{ "info": { "author": "Steven Walker", "author_email": "walker@mfgis.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "=============================\nRest Framework Factory (DRFF)\n=============================\n\n\n.. image:: https://img.shields.io/pypi/v/rest_framework_factory.svg\n :target: https://pypi.python.org/pypi/rest_framework_factory\n\n.. image:: https://img.shields.io/travis/MiddleFork/rest_framework_factory.svg\n :target: https://travis-ci.org/MiddleFork/rest_framework_factory\n\n.. image:: https://readthedocs.org/projects/rest-framework-factory/badge/?version=latest\n :target: https://rest-framework-factory.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n.. image:: https://pyup.io/repos/github/MiddleFork/rest_framework_factory/shield.svg\n :target: https://pyup.io/repos/github/MiddleFork/rest_framework_factory/\n :alt: Updates\n\n\n\nA factory for creating Django Rest Framework APIs\n\n\n\n* Documentation: https://rest-framework-factory.readthedocs.io.\n\n\nFeatures\n--------\n\n* Create a DRF API painlessly, without needing to repeat boilerplate code\n\nInstallation\n------------\n\n* ``pip install rest_framework_factory``\n\nRequirements\n------------\n\n* A Django project with at least one app' from which you wish to build an DRF API included in INSTALLED_APPS, and with at least one model defined in models.py\n\n\nHow it Works\n------------\n\n* The Factory works because a model itself contains all the information required in order to generate an API for it, including a Serializer, a Viewset, URL(s) and other optional (e.g. Forms, Filters) content\n\n* Template files contain variable placeholders referencing the name and attributes of a model\n\nTODOs\n-----\n\n* WEB UI interface to generate factory apis interactively\n\n* Configuration files (YML?) to allow fine-grained control of the factory API, e.g. by including/excluding individual models and/or fields, setting allowed methods, etc.\n\n* Swagger\n\n* Sphinx\n\nUsage\n-----\n\nBasic Usage - Manual Creation\n+++++++++++++++++++++++++++++\n\n* It is not necessary to add rest_framework_factory to INSTALLED_APPS\n\n* One common use case is to build a factory using all the models defined in an app::\n\n from rest_framework_factory import factory\n drff = factory.Factory()\n drff.build_from_app('my_app')\n content = drff.apis['app']['my_app']\n with open('/tmp/drff_api.py')), 'w') as f:\n f.write(data)\n\n* Once the factory file is built, it should be placed into the apps' folder, added to INSTALLED_APPS, and have its urls wired into the project::\n\n mkdir my_app/drff; touch my_app/drff/__init__.py; cp /tmp/drff_api.py ./my_app/drff/api.py\n\n\n * settings.py::\n\n INSTALLED_APPS += 'my_app.drff'\n\n * urls.py::\n\n from my_app.drff.api import urlpatterns as drff_urls\n urlpatterns += drff_urls\n\n\n\nUsing the Factory UI\n++++++++++++++++++++\n\n* TODO\n\n * Scan all the apps, the models therein, and their fields\n\n * Build forms for each model/app\n\n * Toggle desired models/fields on-off\n\n * Select serializer type (ie ModelSerializer vs ReadOnlyModelSerializer\n\n * Select allowed API endpoint methos (ie GET, POST)\n\nConfiguring the factory via YML\n+++++++++++++++++++++++++++++++\n\n* TODO\n\n * Initiallize: Scan all apps, the models therein, and their fields; write structure to file\n\n * Manually edit file, comment out undesired fields and models, change permissions, etc\n\n * Implement: Read yml file, generate factory\n\nCredits\n-------\n\nDjango_\n\n\n\nPackage created with Cookiecutter_.\n\n.. _Django: https://github.com/django/django\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n\n\n\n=======\nHistory\n=======\n\n0.1.0 (2019-01-22)\n------------------\n\n* First release on PyPI.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MiddleFork/rest_framework_factory", "keywords": "rest_framework_factory", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "rest-framework-factory", "package_url": "https://pypi.org/project/rest-framework-factory/", "platform": "", "project_url": "https://pypi.org/project/rest-framework-factory/", "project_urls": { "Homepage": "https://github.com/MiddleFork/rest_framework_factory" }, "release_url": "https://pypi.org/project/rest-framework-factory/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "A factory for createing Django Rest Framework APIs", "version": "0.2.1" }, "last_serial": 4741309, "releases": { "0.1.40": [ { "comment_text": "", "digests": { "md5": "684278fba428ee353e9d069b91266b1b", "sha256": "c9df63d4a703855ac781b15c7ecef7ecd94f65401d3e8f9d32316dc47f55fa4a" }, "downloads": -1, "filename": "rest_framework_factory-0.1.40.tar.gz", "has_sig": false, "md5_digest": "684278fba428ee353e9d069b91266b1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15111, "upload_time": "2019-01-23T23:10:56", "url": "https://files.pythonhosted.org/packages/ae/43/be54f3d9c0909825a6f7394aa4f2ac0afa1f8e6baf5e7495c7724ea79e07/rest_framework_factory-0.1.40.tar.gz" } ], "0.1.41": [ { "comment_text": "", "digests": { "md5": "ce2b20b41b4ae5d781cadc150fad74ea", "sha256": "20b7f5bbe57ba8a307c77e1e98e0be817fa2ff8ec964daba15374d73892e7500" }, "downloads": -1, "filename": "rest_framework_factory-0.1.41.tar.gz", "has_sig": false, "md5_digest": "ce2b20b41b4ae5d781cadc150fad74ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16416, "upload_time": "2019-01-25T18:30:13", "url": "https://files.pythonhosted.org/packages/59/15/e2a6561b94d1e861e74c2fd22e069ae777bb4e6f0462b6e38372fc53fd01/rest_framework_factory-0.1.41.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "6ad999434104fc5dc5197c49b5dfd059", "sha256": "e0561a0ce6e366815eea543e524cece713f23dc067d52f7fdbe58c193be6a1f2" }, "downloads": -1, "filename": "rest_framework_factory-0.1.7.tar.gz", "has_sig": false, "md5_digest": "6ad999434104fc5dc5197c49b5dfd059", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8599, "upload_time": "2019-01-22T23:01:56", "url": "https://files.pythonhosted.org/packages/cf/fb/789795811dee98ce78cc7805e6e9f84ceb30824aa4c4897b51c26265c4cf/rest_framework_factory-0.1.7.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f4979d30360cac9bd3e910d8dd9325bf", "sha256": "7060e5a3ac61a427ca4de0abe5c787c70202d9e944abd335a5d6d8599eea1374" }, "downloads": -1, "filename": "rest_framework_factory-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f4979d30360cac9bd3e910d8dd9325bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16418, "upload_time": "2019-01-25T18:30:15", "url": "https://files.pythonhosted.org/packages/9d/cd/d00cb868ef67e06dbe7ebb02e5f2bcbfe560430b7710b421fae84657010a/rest_framework_factory-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "411db1e38dc256ce87f0cf8b8706a345", "sha256": "1c31ef6a245fcc2f0b71b8551bd7f13976f620eb5a164c4059d4dc77a3bc4ed6" }, "downloads": -1, "filename": "rest_framework_factory-0.2.1.tar.gz", "has_sig": false, "md5_digest": "411db1e38dc256ce87f0cf8b8706a345", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16413, "upload_time": "2019-01-25T18:35:54", "url": "https://files.pythonhosted.org/packages/51/0f/58dd35f6f3340db4cfe22b132751cfdb8299cc5575eaf5806b95d5946a2f/rest_framework_factory-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "411db1e38dc256ce87f0cf8b8706a345", "sha256": "1c31ef6a245fcc2f0b71b8551bd7f13976f620eb5a164c4059d4dc77a3bc4ed6" }, "downloads": -1, "filename": "rest_framework_factory-0.2.1.tar.gz", "has_sig": false, "md5_digest": "411db1e38dc256ce87f0cf8b8706a345", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16413, "upload_time": "2019-01-25T18:35:54", "url": "https://files.pythonhosted.org/packages/51/0f/58dd35f6f3340db4cfe22b132751cfdb8299cc5575eaf5806b95d5946a2f/rest_framework_factory-0.2.1.tar.gz" } ] }