{ "info": { "author": "\u674e\u79d1\u71c3", "author_email": "969543965@qq.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP" ], "description": "# django-db-introspection\n```\npip3 install django-db-introspection\n```\nDjango \u6570\u636e\u5e93\u5185\u7701\u5de5\u5177, \u901a\u8fc7\u6570\u636e\u8868\u540d\u5c31\u53ef\u4ee5\u52a8\u6001\u521b\u5efa\u4e00\u4e2a\u5373\u65f6\u53ef\u7528\u7684Django models\u5bf9\u8c61\u3002\n\u4ec5\u4ec5\u9700\u8981\u4e00\u4e2a\u8868\u540d\uff0c\u4f60\u5c31\u53ef\u4ee5\u7acb\u5373\u5f97\u5230\u4e00\u4e2a\u53ef\u7528\u7684Django \u6a21\u578b\uff0c\u5e76\u7acb\u5373\u8fdb\u884c\u67e5\u8be2\uff0c\u66f4\u65b0\u7b49\u64cd\u4f5c\uff0c\u5f00\u7bb1\u5373\u7528\u3002\n\u76ee\u524d\u7248\u672c\u6682\u65f6\u4e0d\u652f\u6301\u5916\u952e\u5173\u8054\u5173\u7cfb\u3002\n# -------------------------------\nDjango database introspection tool, through the data table name can dynamically create a Django models ready-to-use objects.\nJust need a table name, you can immediately get a usable Django model, and immediately query, update and other operations, out of the box.\nThe current version does not support foreign key relationships.\n# -------------------------------\n```\nIn [4]: from django-db-introspection.introspection import get_my_models\n\nIn [5]: client_device_user = ModelFactory('monkey_king', 'client_device_user').models\nclass ClientDeviceUser(models.Model):\n box_id = models.CharField(max_length=20)\n device_id = models.CharField(max_length=50, blank=True, null=True)\n user_id = models.CharField(max_length=37)\n name4user = models.CharField(max_length=50, blank=True, null=True)\n email = models.IntegerField(blank=True, null=True)\n sms = models.IntegerField(blank=True, null=True)\n voice = models.IntegerField(blank=True, null=True)\n push = models.IntegerField(blank=True, null=True)\n master = models.IntegerField(blank=True, null=True)\n agent = models.IntegerField(blank=True, null=True)\n class Meta:\n db_table='client_device_user'\n/usr/local/lib/python3.5/dist-packages/django/db/models/base.py:325: RuntimeWarning: Model 'monkey_king.clientdeviceuser' wasalready registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models.\n new_class._meta.apps.register_model(new_class._meta.app_label, new_class)\n0.019804232000751654\n\nIn [6]: client_device_user.objects.first().box_id\nOut[6]: '01J01ELQ15'\n\nIn [7]:\n```\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hawkli-1994/django-db-introspection", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-db-introspection", "package_url": "https://pypi.org/project/django-db-introspection/", "platform": "", "project_url": "https://pypi.org/project/django-db-introspection/", "project_urls": { "Homepage": "https://github.com/hawkli-1994/django-db-introspection" }, "release_url": "https://pypi.org/project/django-db-introspection/0.2/", "requires_dist": null, "requires_python": "", "summary": "Django database introspection tool, through the data table name can dynamically create a Django models ready-to-use objects.", "version": "0.2" }, "last_serial": 3489947, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5a31be2888f1d6455746e05b507e79ee", "sha256": "f4148a404968e9461d1485bf02a866b9a07652be1ec3aa68c44304f96508a918" }, "downloads": -1, "filename": "django_db_introspection-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5a31be2888f1d6455746e05b507e79ee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4439, "upload_time": "2018-01-13T10:28:27", "url": "https://files.pythonhosted.org/packages/af/fd/7a0f1b555e57e2acdfd39a3eb8320f7935d8bb787c3dcbeb99f79c05c065/django_db_introspection-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e311c30ef70def42caf3fa4dabd5f5ea", "sha256": "bea57f90b955981c7643b1e1bdab87d4b11db794c7f6db809b5fa6114e87025f" }, "downloads": -1, "filename": "django-db-introspection-0.1.tar.gz", "has_sig": false, "md5_digest": "e311c30ef70def42caf3fa4dabd5f5ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2343, "upload_time": "2018-01-13T10:28:28", "url": "https://files.pythonhosted.org/packages/fa/0f/2d842c75fd5bcc1b2a41ace15c68c5bef8fe377a0ee55dd529bd2088f5cb/django-db-introspection-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a37f1100950c115d3d654ef079dd9a94", "sha256": "413db9c31d075f5860c4b6ccb602e2f6e6df0b5b5c7e1d7757df6cb9c4060e00" }, "downloads": -1, "filename": "django_db_introspection-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a37f1100950c115d3d654ef079dd9a94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4466, "upload_time": "2018-01-15T03:18:46", "url": "https://files.pythonhosted.org/packages/e5/f4/87bd438452374985d796f56775fcb830f60c8828b84f838973ca3a925390/django_db_introspection-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4460db4614bb11447c1f0181cb50c879", "sha256": "1dac7a331989d3b475e4c3f07bed9b77613876ac339576e505adfd60f15b5a1d" }, "downloads": -1, "filename": "django-db-introspection-0.2.tar.gz", "has_sig": false, "md5_digest": "4460db4614bb11447c1f0181cb50c879", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2365, "upload_time": "2018-01-15T03:18:47", "url": "https://files.pythonhosted.org/packages/9d/1c/3135bc8df3a00b7ca118c140626e0dad07ca8b6e28837e6782f10a0795e9/django-db-introspection-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a37f1100950c115d3d654ef079dd9a94", "sha256": "413db9c31d075f5860c4b6ccb602e2f6e6df0b5b5c7e1d7757df6cb9c4060e00" }, "downloads": -1, "filename": "django_db_introspection-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a37f1100950c115d3d654ef079dd9a94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4466, "upload_time": "2018-01-15T03:18:46", "url": "https://files.pythonhosted.org/packages/e5/f4/87bd438452374985d796f56775fcb830f60c8828b84f838973ca3a925390/django_db_introspection-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4460db4614bb11447c1f0181cb50c879", "sha256": "1dac7a331989d3b475e4c3f07bed9b77613876ac339576e505adfd60f15b5a1d" }, "downloads": -1, "filename": "django-db-introspection-0.2.tar.gz", "has_sig": false, "md5_digest": "4460db4614bb11447c1f0181cb50c879", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2365, "upload_time": "2018-01-15T03:18:47", "url": "https://files.pythonhosted.org/packages/9d/1c/3135bc8df3a00b7ca118c140626e0dad07ca8b6e28837e6782f10a0795e9/django-db-introspection-0.2.tar.gz" } ] }