-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated README; Added basic connectivity test; Tweaked build_engine.
- Loading branch information
Showing
8 changed files
with
47 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
# SQLEngine | ||
|
||
SQLEngine is a basic wrapper around the SQLAlchemy library - specifically focused on simple Engine creation. | ||
|
||
## Usage | ||
|
||
```python | ||
from sqlengine import build_engine | ||
|
||
engine = build_engine( # This gives you an SQLAlchemy Engine object with which you can .connect() | ||
driver="mssql", | ||
host="127.0.0.1/DB_Server", | ||
database="DB_Name" | ||
) | ||
``` | ||
Connecting to a more obscure DBMS such as Microsoft's Access is also supported.: | ||
```python | ||
from sqlengine import build_engine | ||
|
||
# The driver, host, and database parameters are ignored when using Access. | ||
# The wrapper deals with obscure necessities such as DBMS-specific connection parameters. | ||
engine = build_engine( | ||
driver="access", | ||
local_db_filepath="C:\\Users\\User\\Desktop\\Database.accdb" | ||
) | ||
``` | ||
Whilst yet untested, connecting to pretty much any DBMS should be supported: | ||
```python | ||
from sqlengine import build_engine | ||
|
||
engine = build_engine( | ||
driver="mysql", | ||
host="https://www.mycompany.fake/DB_Server", | ||
database="DB_Name", | ||
username="my_username", # Note the additional keyword arguments | ||
password="my_password" | ||
) | ||
``` |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,6 +1,6 @@ | ||
[project] | ||
name = "SQLEngine" | ||
version = "0.1.0" | ||
version = "1.0.0" | ||
description = "A simple wrapper enabling quick SQLAlchemy Engine creation for various DBMS." | ||
authors = [ | ||
{name = "Kapparina", email = "[email protected]"}, | ||
|
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