Skip to content

Commit 10c8781

Browse files
committed
file updated
1 parent ed711ec commit 10c8781

File tree

3 files changed

+43
-8
lines changed

3 files changed

+43
-8
lines changed

MANIFEST.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
include CONTRIBUTING.rst
2-
include HISTORY.rst
1+
include CONTRIBUTING.md
32
include LICENSE
4-
include README.rst
3+
include README.md
54

65
recursive-include tests *
76
recursive-exclude * __pycache__

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## django-psdb-engine
2+
3+
![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)
4+
5+
This package helps you interact with your [PlanetScale](https://planetscale.com) databases in your Django projects in an easier way.
6+
7+
### Usage
8+
9+
Install the package by running the following command.
10+
11+
```sh
12+
pip install django-psdb-engine
13+
```
14+
15+
And finally, update your `DATABASES` configuration and change the `ENGINE` field.
16+
17+
```python
18+
DATABASES = {
19+
'default': {
20+
'ENGINE': 'django_psdb_engine',
21+
...
22+
'OPTIONS': {'ssl': {'ca': ...}}
23+
}
24+
}
25+
```
26+
27+
**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 chanegs with no problem.
28+
29+
```diff
30+
-'OPTIONS': {'ssl': {'ca': os.environ.get('MYSQL_ATTR_SSL_CA')}}
31+
+'OPTIONS': {'ssl': {'ca': os.environ.get('MYSQL_ATTR_SSL_CA')}, 'charset': 'utf8mb4'}
32+
```
33+
34+
### Requirements
35+
- django >= 2.2
36+
- mysqlclient >= 2.1.0
37+
38+
### License
39+
Free software: [MIT license](LICENSE)

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44

55
from setuptools import find_packages, setup
66

7-
with open("README.rst") as readme_file:
7+
with open("README.md") as readme_file:
88
readme = readme_file.read()
99

10-
with open("HISTORY.rst") as history_file:
11-
history = history_file.read()
12-
1310
requirements = [
1411
"django>=2.2",
1512
"mysqlclient>=2.1.0",
@@ -34,7 +31,7 @@
3431
description="Django PlanetScale database engine.",
3532
install_requires=requirements,
3633
license="MIT license",
37-
long_description=readme + "\n\n" + history,
34+
long_description=readme,
3835
include_package_data=True,
3936
keywords="django_psdb_engine",
4037
name="django_psdb_engine",

0 commit comments

Comments
 (0)