diff --git a/README.md b/README.md index 43a28cc..d402c22 100644 --- a/README.md +++ b/README.md @@ -84,22 +84,22 @@ That's all. ## Parameters for the pool initial: -- `host`: Host of MySQL server -- `port`: Port of MySQL server -- `user`: User of MySQL server -- `password`: Password of MySQL server -- `db`: Database of MySQL server -- `charset`: Charset of MySQL server -- `cursorclass`: Class of MySQL Cursor -- `autocommit`: auto commit mode -- `min_size`: Minimum size of connection pool -- `max_size`: Maximum size of connection pool -- `timeout`: Watting time in the multi-thread environment -- `interval`: Statistical cycle time -- `stati_mun`: Statistical frequency -- `multiple`: Regulation standard -- `counter`: Counter -- `accumulation`: Statiscal result +- `host`: Host of MySQL server, default for localhost +- `port`: Port of MySQL server, default for 3306 +- `user`: User of MySQL server, default for None +- `password`: Password of MySQL server, default for None +- `db`: Database of MySQL server, default for None +- `charset`: Charset of MySQL server, default for utf8 +- `cursorclass`: Class of MySQL Cursor, default for pymysql.cursors.DictCursor +- `autocommit`: auto commit mode, default for False +- `min_size`: Minimum size of connection pool, default for 1 +- `max_size`: Maximum size of connection pool, default for 3 +- `timeout`: Watting time in the multi-thread environment, default for 10.0 +- `interval`: Statistical cycle time, default for 600.0 +- `stati_mun`: Statistical frequency, default for 3 +- `multiple`: Regulation standard, default for 4 +- `counter`: Counter, default for 0 +- `accumulation`: Statiscal result, default for 0 ## Roadmap @@ -122,3 +122,5 @@ PyMySQLPool is released under the MIT License. See LICENSE for more information. Thank you for your interest in contribution of PyMySQLPool, your help and contribution is very valuable. You can submit issue and pull requests, please submit an issue before submitting pull requests. + +At last if the project is helpful to you, please click a star, thank you so much. \ No newline at end of file diff --git a/pymysqlpool/pool.py b/pymysqlpool/pool.py index 26abbfd..f465f3e 100644 --- a/pymysqlpool/pool.py +++ b/pymysqlpool/pool.py @@ -58,16 +58,16 @@ class Pool(object): """ def __init__(self, - host='localhost', + host="localhost", port=3306, - user='root', + user=None, password=None, db=None, - charset='utf8', + charset="utf8", cursorclass=pymysql.cursors.DictCursor, autocommit=False, min_size=1, - max_size=1, + max_size=3, timeout=10.0, interval=600.0, stati_num=3, diff --git a/setup.py b/setup.py index 3fcfb04..d35f657 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pymysql-pooling", - version="0.9.9", + version="1.0.0", author="prprprus", author_email="huangzongzhuan@gmail.com", description="pymysql-based database connection pool",