Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lnxpy/django-psdb-engine
PlanetScale Database Engine for Django
https://github.com/lnxpy/django-psdb-engine
database database-engine django django-packages mysql planetscale pypi pypi-package python pythonpackage
Last synced: 19 days ago
JSON representation
PlanetScale Database Engine for Django
- Host: GitHub
- URL: https://github.com/lnxpy/django-psdb-engine
- Owner: lnxpy
- License: mit
- Created: 2022-08-12T17:47:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T21:27:32.000Z (3 months ago)
- Last Synced: 2024-10-13T00:22:04.328Z (about 1 month ago)
- Topics: database, database-engine, django, django-packages, mysql, planetscale, pypi, pypi-package, python, pythonpackage
- Language: Python
- Homepage: https://pypi.org/project/django-psdb-engine/
- Size: 41 KB
- Stars: 21
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## django-psdb-engine
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-psdb-engine) ![PyPI - Downloads](https://img.shields.io/pypi/dm/django-psdb-engine) ![Made for - PlanetScale](https://img.shields.io/badge/made%20for-PlanetScale-black?style=flat&logo=planetscale) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/lnxpy/django-psdb-engine/main.svg)](https://results.pre-commit.ci/latest/github/lnxpy/django-psdb-engine/main)
This package helps you interact with your [PlanetScale](https://planetscale.com) databases in your Django projects in an easier way.
### Usage
Install the package by running the following command.
```sh
pip install django-psdb-engine
```And finally, update your `DATABASES` configuration and change the `ENGINE` field.
```python
DATABASES = {
'default': {
'ENGINE': 'django_psdb_engine',
...,
'OPTIONS': {'ssl': {'ca': ...}}
}
}
```**Note**: Since Django uses the `UTF-8` charset and it points to `utf8mb3` in MySQL and this charset is deprecated in MySQL 8, you may need to add `{"charset": "utf8mb4"}` and migrate your changes with no problem.
```diff
- 'OPTIONS': {'ssl': {'ca': ...}}
+ 'OPTIONS': {'ssl': {'ca': ...}, 'charset': 'utf8mb4'}
```### Requirements
- django >= 2.2
- mysqlclient >= 2.1.0### License
Free software: [MIT license](LICENSE)