-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Sum Function (#13) * Changed columns to fields in increment function * PostgreSQL support. (#17) * Missing default settings variable added for connection with json file * Version 2.0 Changelog and version update for files.
- Loading branch information
Showing
15 changed files
with
215 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dbConnect: MySQL for Humans | ||
dbConnect: Database for Humans | ||
=========================== | ||
.. image:: https://readthedocs.org/projects/dbconnect/badge/?version=latest | ||
:target: http://dbconnect.readthedocs.org/?badge=latest | ||
|
@@ -9,11 +9,22 @@ dbConnect: MySQL for Humans | |
:target: https://landscape.io/github/mastizada/dbConnect/master | ||
:alt: Code Health | ||
|
||
|
||
WHY? | ||
==== | ||
|
||
dbConnect was made as a little module to be used in small projects | ||
that need to do some interactions with MySQL or PostgreSQL databases. | ||
|
||
It's just a big time saver for developers specially for making data analyzing and data scraping | ||
and it helps to keep your code clean and readable by using python-like structure. | ||
|
||
|
||
Installation | ||
============= | ||
requirements: | ||
^^^^^^^^^^^^^ | ||
dbConnect uses mysql.connector module, install it using: | ||
dbConnect uses mysql.connector module for mysql, install it using: | ||
|
||
.. code-block:: bash | ||
|
@@ -22,6 +33,12 @@ dbConnect uses mysql.connector module, install it using: | |
Or using offical site: `https://dev.mysql.com/downloads/connector/python/` | ||
|
||
For PostgreSQL install psycopg2 module: | ||
|
||
.. code-block:: bash | ||
$ pip install psycopg2 | ||
using pip: | ||
^^^^^^^^^^ | ||
|
||
|
@@ -36,7 +53,7 @@ from source code: | |
$ git clone [email protected]:mastizada/dbConnect.git | ||
$ cd dbConnect | ||
$ sudo pip install -r requirements.txt --allow-external mysql-connector-python | ||
$ # install required module for database | ||
$ sudo python setup.py install | ||
Usage | ||
|
@@ -53,7 +70,7 @@ Documentation | |
============= | ||
|
||
- Docs: http://dbconnect.readthedocs.org/ | ||
- Another Docs: https://pythonhosted.org/dbConnect/ | ||
- Alternate Docs: https://pythonhosted.org/dbConnect/ | ||
- Check generated documentation using: | ||
|
||
.. code-block:: bash | ||
|
@@ -64,9 +81,9 @@ Documentation | |
|
||
.. code-block:: bash | ||
$ pydoc3 -p 1994 | ||
$ pydoc3 -p 8000 | ||
and open localhost:1994/ in browser | ||
and open http://localhost:8000/ in browser | ||
|
||
Enjoy | ||
===== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
"user": "", | ||
"password": "", | ||
"database": "", | ||
"port": 3306 | ||
"port": 3306, | ||
"engine": "mysql" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"host": "", | ||
"user": "", | ||
"password": "", | ||
"dbname": "", | ||
"port": 5432, | ||
"engine": "postgres" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
""" | ||
MySQL for Humans | ||
Database for Humans | ||
""" | ||
from .dbConnect import DBConnect | ||
|
||
__description__ = 'MySQL for Humans' | ||
__description__ = 'Database for Humans' | ||
__author__ = "Emin Mastizada <[email protected]>" | ||
__version__ = '1.6.0' | ||
__version__ = '2.0' | ||
__license__ = "MPL 2.0" | ||
__help__ = """MySQL for Humans""" | ||
__help__ = """Database for Humans""" | ||
|
||
__all__ = ['DBConnect', ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.