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: 2 months 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 (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T21:27:32.000Z (10 months ago)
- Last Synced: 2025-02-27T14:31:02.657Z (3 months 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
   [](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)