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.
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
django_fake_database_backends.backends.sqlite3
django_fake_database_backends.backends.postgresql
More will come in the future.
Tests
The test suite uses tox and can be invoked using.
Metadata
Release files for django-fake-database-backends 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_fake_database_backends-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / django_fake_database_backends-0.1.1-py2.py3-none-any.whl
| Download URL | django_fake_database_backends-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
360a30a9548a9c24ba11379ecfd208b9ccb7a6ae98ccf2e945094557ac34d1fe
|
|
BLAKE2b-256 checksum How to use checksums |
f65fe3aecd223d3c9d8bd003193fdb32ce668df7b927be0ea3527c026d144c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-fake-database-backends 0.1.1
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.