Fake django database backends to generate sql without real database
Project description
=============================
django-fake-database-backends
=============================
.. image:: https://travis-ci.org/David-Wobrock/django-fake-database-backends.svg?branch=master
:target: https://travis-ci.org/David-Wobrock/django-fake-database-backends
.. image:: https://img.shields.io/pypi/v/django-fake-database-backends.svg
:target: https://pypi.python.org/pypi/django-fake-database-backends/
Motivations
-----------
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 ``manage.py 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.
.. _`django-migration-linter`: https://github.com/3YOURMIND/django-migration-linter
Installation
------------
::
pip install django-fake-database-backends
Usage
-----
In your project settings file, presumably ``settings.py``, use one of the available backends::
DATABASES = {
'default': {
'ENGINE': 'django_fake_database_backends.backends.mysql',
}
}
Available backends
------------------
* ``django_fake_database_backends.backends.mysql``
More will come in the future.
Tests
-----
The test suite uses `tox`_ and can be invoked using::
tox
django-fake-database-backends
=============================
.. image:: https://travis-ci.org/David-Wobrock/django-fake-database-backends.svg?branch=master
:target: https://travis-ci.org/David-Wobrock/django-fake-database-backends
.. image:: https://img.shields.io/pypi/v/django-fake-database-backends.svg
:target: https://pypi.python.org/pypi/django-fake-database-backends/
Motivations
-----------
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 ``manage.py 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.
.. _`django-migration-linter`: https://github.com/3YOURMIND/django-migration-linter
Installation
------------
::
pip install django-fake-database-backends
Usage
-----
In your project settings file, presumably ``settings.py``, use one of the available backends::
DATABASES = {
'default': {
'ENGINE': 'django_fake_database_backends.backends.mysql',
}
}
Available backends
------------------
* ``django_fake_database_backends.backends.mysql``
More will come in the future.
Tests
-----
The test suite uses `tox`_ and can be invoked using::
tox
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-fake-database-backends-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56ffc57ad2930eb3a4b87b83465ae468364def4e73cd5baf5bd8dd0e81609dfd |
|
MD5 | 400bb941468002dde2fc83c002250788 |
|
BLAKE2b-256 | 1e37404733024d709ec9f77c93c61eb64e3e9ad9db2f34bef581a40eaf9e8bfa |
Close
Hashes for django_fake_database_backends-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fa869156b3390d21bee43c491699ecc437e94d6fa617dbbf0a0e8d2580e89e8 |
|
MD5 | 18c5cdb9c8df581065a6b7805ffcfb26 |
|
BLAKE2b-256 | 57f9c4a5cc7289baeda96129f685343de50c87adcc0d2474b4e949973e75d019 |