Skip to main content

Fixture Generator for Fixture

Build StatusCoverage Status

Supports only SQLAlchemy

Install

Using pip

pip install fixturegen

Or using easy_install

easy_install fixturegen

Usage

Basic

$ fixturegen-sqlalchemy mysql://user:password@localhost/your_db user
from fixture import DataSet

class UserData(DataSet):
    class user_1:
        id = 1
        name = u'first'
    class user_2:
        id = 2
        name = u'second'
    class user_3:
        id = 3
        name = u'third'

Limiting

$ fixturegen-sqlalchemy mysql://user:password@localhost/your_db user --limit=2
from fixture import DataSet

class UserData(DataSet):
    class user_1:
        id = 1
        name = u'first'
    class user_2:
        id = 2
        name = u'second'

Ordering

$ fixturegen-sqlalchemy mysql://user:password@localhost/your_db user --order-by='id DESC'
from fixture import DataSet

class UserData(DataSet):
    class user_3:
        id = 3
        name = u'third'
    class user_2:
        id = 2
        name = u'second'
    class user_1:
        id = 1
        name = u'first'

Filtering

$ fixturegen-sqlalchemy mysql://user:password@localhost/your_db user --where='id > 1'
from fixture import DataSet

class UserData(DataSet):
    class user_2:
        id = 2
        name = u'second'

Hide import statement

$ fixturegen-sqlalchemy mysql://user:password@localhost/your_db user --limit=1 --without-import
class UserData(DataSet):
    class user_1:
        id = 1
        name = u'first'

Custom fixture class name:

$ fixturegen-sqlalchemy mysql://user:password@localhost/your_db user --fixture-class-name DummyData --limit=1
class Dummy(DataSet):
    class user_1:
        id = 1
        name = u'first'

Custom row class naming:

$ fixturegen-sqlalchemy mysql://user:password@localhost/your_db user --naming-row-columns=id,name --limit=1
class Dummy(DataSet):
    class user_1_first:
        id = 1
        name = u'first'

Help

$ fixturegen-sqlalchemy --help

Metadata

Release files for fixturegen 0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fixturegen 0.8
File Size Uploaded Provenance
fixturegen-0.8.tar.gz 4.3 kB Without provenance Details

Release files / fixturegen-0.8.tar.gz

Download URL fixturegen-0.8.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e995c609011cbd62a5168b4f33777bb2438ef5e4e4b9b8842f0195dff0a22328
BLAKE2b-256 checksum
How to use checksums
39a1611fed03d0ce5e916390b6559d9f38cbcc6dc33d8e8f628620f8e8c2f870
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for fixturegen 0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page