{ "info": { "author": "James McMahon", "author_email": "james1345@googlemail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Database" ], "description": "# white-noise\n[![Build Status](https://travis-ci.org/James1345/white-noise.svg?branch=develop)](https://travis-ci.org/James1345/white-noise)\n\nTest Data generator for SQLAlchemy and Django\n\nThis package is designed to make it easy to generate test data for SQLAlchemy\nor Django applications. It was inspired after spending\nmost of a day failing to get Mixer working properly.\n\nThe aim is to have a consistant, simple API for all generation.\n\n## API overview\nFixtures define the data that should be entered into the database. Generators\ncreate the data and a fixture runner enters it.\n\n### Fixtures\n\nA fixture object takes 4 parameters.\n\n- **model** The model to be acted on. This\nshould be a direct reference to the model class that data should be created for.\n\n- **quantity** How many instances of the model need adding to the database\n\n- **dependencies** A list of fixtures that this fixture depends on. The base for fixture runners can resolve dependencies to ensure fixtures are ruin in the correct order\n\n- **fields** This is a dictionary of field names to generator instances. The field name is the field of the model to be generated, where generator is a generator to be used (it is normal to instansiate the generator in the fields list)\n\n### Generators\n\nCurrently available generators (and their options)\n\n#### LiteralGenerator\n\nReturns a literal value that is passed\n\n- **value** The value to return\n\n#### RandomGenerator\n\nCreates a random string for the field\n\n- **length** The length of the field\n\n#### LipsumGenerator\n\nCreates a semi-random string sentence of the Lorem Ipsum form\n\n#### InsultGenerator\n\nCreates a random insulting sentence string for the field\n\n#### SequenceGenerator\n\nIterates over a sequence. Loops if the end of the sequence is reached.\n\n- **values** The values to use. Can be any iterable (lists, tuples, generators, etc.)\n\n#### sqlalchemy.SelectGenerator\nSelects an object from the database and uses that as the value for the field\nThis is for creating objects with relationships to others in the database (e.g. foreign keys)\n\nThis generator only works with the SQLAlchemy fixture runner. (if writting your own fixture runner\nit must receive an SQLAlchemy session object as well as its options)\n\n- **model** The foreign model to select from\n\n- **random** Select randomly or select the first (default => random)\n\n\n### Fixture runners\n\n#### SQLAlchemyFixtureRunner\n\nRuns the fixtures using SQLAlchemy models. This class must be instantiated with\na reference to a SQLAlchemy session object to be used for accessing the database\n\n#### DjangoFixtureRunner\n\nRuns the fixtures against a Django database. It must be run in a django context\n(e.g. from a custom management command)\n\nA Django management command is included. To use it, add `'whitenoise'` to your\ninstalled apps", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/James1345/white-noise", "keywords": "fixture SQLAlchemy ORM generator", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "White-Noise", "package_url": "https://pypi.org/project/White-Noise/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/White-Noise/", "project_urls": { "Homepage": "https://github.com/James1345/white-noise" }, "release_url": "https://pypi.org/project/White-Noise/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "An SQLAlchemy test data (fixture) generator", "version": "0.1.0" }, "last_serial": 1687454, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1fc5d0c6084009b371782720fe8e6ecf", "sha256": "71624b772fe5907b29fe5d94f9ac773bf25472105cd18fae9bba063bb214a3e5" }, "downloads": -1, "filename": "White_Noise-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1fc5d0c6084009b371782720fe8e6ecf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9835, "upload_time": "2015-08-21T14:16:14", "url": "https://files.pythonhosted.org/packages/62/1d/e93fb78a1e041b8ed8602e2ec43fa23c5c5b993e6a24e7f702a4c9d5c07a/White_Noise-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5343dc46a1d75a1998766db8d3cff286", "sha256": "bfbce6c781afcd24a3dfa2a17b9be8103a6fa646a28d7babf9924a0613dd4aeb" }, "downloads": -1, "filename": "White Noise-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5343dc46a1d75a1998766db8d3cff286", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6581, "upload_time": "2015-08-21T14:16:18", "url": "https://files.pythonhosted.org/packages/13/b7/177a46ab62adbc87136a17ad7c7dc76c1be093de0258d413fedff83f1c07/White%20Noise-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1fc5d0c6084009b371782720fe8e6ecf", "sha256": "71624b772fe5907b29fe5d94f9ac773bf25472105cd18fae9bba063bb214a3e5" }, "downloads": -1, "filename": "White_Noise-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1fc5d0c6084009b371782720fe8e6ecf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9835, "upload_time": "2015-08-21T14:16:14", "url": "https://files.pythonhosted.org/packages/62/1d/e93fb78a1e041b8ed8602e2ec43fa23c5c5b993e6a24e7f702a4c9d5c07a/White_Noise-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5343dc46a1d75a1998766db8d3cff286", "sha256": "bfbce6c781afcd24a3dfa2a17b9be8103a6fa646a28d7babf9924a0613dd4aeb" }, "downloads": -1, "filename": "White Noise-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5343dc46a1d75a1998766db8d3cff286", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6581, "upload_time": "2015-08-21T14:16:18", "url": "https://files.pythonhosted.org/packages/13/b7/177a46ab62adbc87136a17ad7c7dc76c1be093de0258d413fedff83f1c07/White%20Noise-0.1.0.tar.gz" } ] }