Skip to main content

Fake django database backends to generate sql without a real database

Project description


This project intends to propose django database backends which can be used to generated SQL, without actually having the databases set up. The main use case is using the built-in django command sqlmigrate.

These backends are not intended to be used for any production, migration or storage. They will nicely fail when you try to actually establish an actual database connection.

The need for this library comes from the tests of django-migration-linter which needed to generate SQL from a backend that was not sqlite3, but without having to install a database client library.


pip install django-fake-database-backends


In your project settings file, presumably, use one of the available backends:

    'default': {
        'ENGINE': 'django_fake_database_backends.backends.mysql',

Available backends

  • django_fake_database_backends.backends.mysql
  • django_fake_database_backends.backends.sqlite3
  • django_fake_database_backends.backends.postgresql

More will come in the future.


The test suite uses tox and can be invoked using.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_fake_database_backends-0.1.1-py2.py3-none-any.whl (30.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page