{ "info": { "author": "Tobin Brown", "author_email": "tobin@brobin.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "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", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "|seed-logo|\n\n===========\n\n*Django-seed* uses the `faker`_ library to generate test data for your Django models. This has been \"hard-forked\" from `django_faker`_ in order to support newer versions of Python and Django\n\nDjango-seed allows you to write code to generate models, and seed your database with one simple ``manage.py`` command!\n\n---------------\n\n|python| |pypi| |travis| |coveralls| |license|\n\n---------------\n\n* `Installation`_\n* `Configuration`_\n* `Usage`_\n* `Using with command`_\n* `Using with code`_\n* `Tests`_\n* `License`_\n\n---------------\n\n------------\nInstallation\n------------\n\nTo install django-seed, use pip::\n\n pip install django-seed\n\nOr to install from source::\n\n python setup.py install\n\n\n-------------\nConfiguration\n-------------\n\nAdd it to your installed apps in ``settings.py``::\n\n INSTALLED_APPS = (\n ...\n 'django_seed',\n )\n\n-----\nUsage\n-----\n\n**Note**: When seeding models with Foreign Keys, you need to make sure that those models are seeded first. For example, if a model in app `A` has a foreign key to a model in app `B`, you must seed app `B` first.\n\nUsing with command\n------------------\n\nWith *django-seed*, you can seed your database with test data from the command line using the ``manage.py seed`` command.\n\nEx: Seed 15 of each model for the app ``api``:\n\n.. code-block:: bash\n\n $ python manage.py seed api --number=15\n \nThat's it! Now you have 15 of each model seeded into your database.\n\n\nUsing with code\n----------------\n\n*django-seed* provides methods to easily seed test databases for your Django models. To seed your database with Model instances, import ``Seed``, get a ``seeder`` instance, and use the `add_entity` method.\n\nEx: seeding 5 ``Game`` and 10 ``Player`` objects:\n\n.. code-block:: python\n\n from django_seed import Seed\n\n seeder = Seed.seeder()\n\n from myapp.models import Game, Player\n seeder.add_entity(Game, 5)\n seeder.add_entity(Player, 10)\n\n inserted_pks = seeder.execute()\n\nThe seeder uses the name and column type to populate the Model with relevant data. If django-seed misinterprets a column name, you can still specify a custom function to be used for populating a particular column, by adding a third argument to the ``add_entity()`` method:\n\n.. code-block:: python\n\n seeder.add_entity(Player, 10, {\n 'score': lambda x: random.randint(0,1000),\n 'nickname': lambda x: seeder.faker.email(),\n })\n seeder.execute()\n\nDjango-seed does not populate auto-incremented primary keys, instead ``seeder.execute()`` returns the list of inserted PKs, indexed by class:\n\n.. code-block:: python\n\n print inserted_pks\n {\n : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n : [1, 2, 3, 4, 5]\n }\n\n\n-----\nTests\n-----\n\nTo run django tests in a django environment, first make sure you have the packages from `requirement-test.txt` installed, then run the following:\n\n.. code-block:: bash\n\n $ python runtests.py\n\nor if you have ``django_seed`` in INSTALLED_APPS:\n\n.. code-block:: bash\n\n $ python manage.py test django_seed\n \n\n------- \nLicense\n-------\n\nMIT. See `LICENSE`_ for more details.\n\n\n.. _faker: https://www.github.com/joke2k/faker/\n.. _django_faker: https://www.github.com/joke2k/django-faker/\n.. _LICENSE: https://github.com/Brobin/django-seed/blob/master/LICENSE\n\n.. |pypi| image:: https://img.shields.io/pypi/v/django-seed.svg?style=flat-square\n :target: https://pypi.python.org/pypi/django-seed\n :alt: pypi\n\n.. |travis| image:: https://img.shields.io/travis/Brobin/django-seed.svg?style=flat-square\n :target: http://travis-ci.org/Brobin/django-seed\n :alt: Travis Build\n \n.. |coveralls| image:: https://img.shields.io/coveralls/Brobin/django-seed.svg?style=flat-square\n :target: https://coveralls.io/r/Brobin/django-seed\n :alt: coverage\n\n.. |license| image:: https://img.shields.io/github/license/Brobin/django-seed.svg?style=flat-square\n :target: https://github.com/Brobin/django-seed/blob/master/LICENSE\n :alt: MIT License\n\n.. |python| image:: https://img.shields.io/pypi/pyversions/django-seed.svg?style=flat-square\n :target: https://pypi.python.org/pypi/django-seed\n :alt: Python 2.7, 3.x\n\n.. |seed-logo| image:: assets/django_seed.png\n :alt: Django Seed\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/brobin/django-seed", "keywords": "faker fixtures data test django seed", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-seed", "package_url": "https://pypi.org/project/django-seed/", "platform": "", "project_url": "https://pypi.org/project/django-seed/", "project_urls": { "Homepage": "http://github.com/brobin/django-seed" }, "release_url": "https://pypi.org/project/django-seed/0.1.9/", "requires_dist": null, "requires_python": "", "summary": "Seed your Django project with fake data", "version": "0.1.9" }, "last_serial": 3861949, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "01e00937c0146d840f330b366aaab560", "sha256": "363a1fc39e36005f05167db7397bf2382f155466c06f498333e3b86462acacaf" }, "downloads": -1, "filename": "django-seed-0.1.0.tar.gz", "has_sig": false, "md5_digest": "01e00937c0146d840f330b366aaab560", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6467, "upload_time": "2015-04-21T18:49:31", "url": "https://files.pythonhosted.org/packages/2a/92/8e2986daea690bdc03bc6686ca5e241bd6601ee8e7bfd7992bd9d5d4c745/django-seed-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3f27bf8753e1804d78de89e0dc197f25", "sha256": "4f54ededd4da11b21e0bbcf40230a90493c4c3f8dc07347613e666969f834a28" }, "downloads": -1, "filename": "django-seed-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3f27bf8753e1804d78de89e0dc197f25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6622, "upload_time": "2015-04-22T20:47:09", "url": "https://files.pythonhosted.org/packages/45/c9/ef2e1f91e35992c62f302e11c7ae4fec01cefaf072a2df8ae192a4a7cb28/django-seed-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "367a3ba16e7d5071fd3937b954852c17", "sha256": "66728fb943b140cc5d0e0f165660ef8ae23fb83ecb72bb2fc14ff70de7308869" }, "downloads": -1, "filename": "django-seed-0.1.2.tar.gz", "has_sig": false, "md5_digest": "367a3ba16e7d5071fd3937b954852c17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8265, "upload_time": "2015-04-24T21:42:43", "url": "https://files.pythonhosted.org/packages/b5/ee/c54f467aeb2c0334ba03e4dac0204d3cc4a3d28c0489c4e5a6239186c65a/django-seed-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "242a68a3fe6f354bce1fded3e98fcf2a", "sha256": "751268fb7dacdf53f19003ef437a4fb503223a6fcd695fccc0696059a51e1612" }, "downloads": -1, "filename": "django-seed-0.1.3.tar.gz", "has_sig": false, "md5_digest": "242a68a3fe6f354bce1fded3e98fcf2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9184, "upload_time": "2015-07-09T04:09:01", "url": "https://files.pythonhosted.org/packages/db/26/7d1ddc6bfbdea89a15c6d4cc131da673658cfe786de0f25c3937305e9677/django-seed-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "3a5a98eb11ac4e652f1145151600ece7", "sha256": "17d5d9096409edc3fef10591ec266eac0901ca441c77bbab0c4180283f8c5b72" }, "downloads": -1, "filename": "django-seed-0.1.4.tar.gz", "has_sig": false, "md5_digest": "3a5a98eb11ac4e652f1145151600ece7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9914, "upload_time": "2015-10-10T17:41:02", "url": "https://files.pythonhosted.org/packages/a0/63/709266f8b74536362b726e89b26c05744d00ae09eb095cc33552bc3b4b85/django-seed-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "dbd4262469dbc26b37c15a648e918e1e", "sha256": "402a90806eddab61868855cb6433b30b1792672d5d190dab3c8f210f3d4f3894" }, "downloads": -1, "filename": "django-seed-0.1.5.tar.gz", "has_sig": false, "md5_digest": "dbd4262469dbc26b37c15a648e918e1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11277, "upload_time": "2015-11-18T19:19:42", "url": "https://files.pythonhosted.org/packages/42/f8/d9c0211e50b125a170b8a2671a0e7b31f83f34108fd9448b5195b265ae3c/django-seed-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "1a3dfc7feced328b65446c806625c3ee", "sha256": "f8907e17892dadd7a9437cacf55f99ca5bd15c42bd548460fa42507c906fe327" }, "downloads": -1, "filename": "django-seed-0.1.6.tar.gz", "has_sig": false, "md5_digest": "1a3dfc7feced328b65446c806625c3ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11297, "upload_time": "2016-02-01T02:19:50", "url": "https://files.pythonhosted.org/packages/2d/97/ad36a640d12f3c7c62bf7efc44643e4e499758b80005ea72f7347cc094f5/django-seed-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "e5a45dc198c983709f46ec7c1337aec5", "sha256": "03ca45a6aafae18d66a9fc9cb51d43aec67412c3171f51c42d03e42417645d00" }, "downloads": -1, "filename": "django-seed-0.1.7.tar.gz", "has_sig": false, "md5_digest": "e5a45dc198c983709f46ec7c1337aec5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12326, "upload_time": "2017-01-18T16:25:15", "url": "https://files.pythonhosted.org/packages/aa/90/36e0b7b08896ada0134c622f6a6329e0aa7cfa328fa84296a71a37c867e9/django-seed-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "c776d0ed727749daa8d9addf8e4b642a", "sha256": "7086102c6b0bb313d4b58f55cf440d35aed9a28304ece390f1ea451485288fc6" }, "downloads": -1, "filename": "django-seed-0.1.8.tar.gz", "has_sig": false, "md5_digest": "c776d0ed727749daa8d9addf8e4b642a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10778, "upload_time": "2018-01-15T19:59:15", "url": "https://files.pythonhosted.org/packages/13/7e/f9a33d4d0ba7a8e1eb2ab8c2334feec829069bc6ab596d00c2ebfe7f2ee0/django-seed-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "15df0865d5dab6eaed02ebb91cb09a66", "sha256": "da5dc54494c2d4274a6b9f9a2aea69cb15c3cce80777e2d30b3a5a082c0a7ee8" }, "downloads": -1, "filename": "django-seed-0.1.9.tar.gz", "has_sig": false, "md5_digest": "15df0865d5dab6eaed02ebb91cb09a66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11221, "upload_time": "2018-05-14T18:29:21", "url": "https://files.pythonhosted.org/packages/43/7e/bfc2e3af78d49d3ff89d50b90619787ab9c5b0569188e559dbbcacdf283a/django-seed-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "15df0865d5dab6eaed02ebb91cb09a66", "sha256": "da5dc54494c2d4274a6b9f9a2aea69cb15c3cce80777e2d30b3a5a082c0a7ee8" }, "downloads": -1, "filename": "django-seed-0.1.9.tar.gz", "has_sig": false, "md5_digest": "15df0865d5dab6eaed02ebb91cb09a66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11221, "upload_time": "2018-05-14T18:29:21", "url": "https://files.pythonhosted.org/packages/43/7e/bfc2e3af78d49d3ff89d50b90619787ab9c5b0569188e559dbbcacdf283a/django-seed-0.1.9.tar.gz" } ] }