Simple mysql database library
Project description
Mysqllib
Simple mysql database
Connect
connect(
user: str,
password: str,
database: str,
host: str='127.0.0.1',
port: int=3306
)
Fetch one
fetchone(query, args=None) -> Optional[dict]
Fetch all
fetchall(query, args=None) -> Optional[list]:
Execute
execute(query, args=None) -> bool:
find
def find(
table: str,
conditions: Dict[str, Union[str, List]] = None,
columns='*',
joins: Optional[List[Tuple[str, str, str]]] = None,
order_by=None
) -> dict
findall
def findall(
table: str,
conditions: Dict[str, Union[str, List]] = None,
columns='*',
joins: Optional[List[Tuple[str, str, str]]] = None,
group_by=None,
order_by=None,
limit=None
) -> list
update
def update(
table: str,
data: Dict[str, any],
conditions: Optional[Dict[str, any]] = None
) -> bool
delete
def delete(
table: str,
conditions: Optional[Dict[str, any]] = None
)
insert
def create(
table: str,
data: Dict[str, any]
) -> bool
Mirations
Run
import mysqllib.migration
mysqllib.migration.run_migration('./path/to/migration/directory/')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mysqllib-1.0.6.tar.gz
(6.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mysqllib-1.0.6.tar.gz.
File metadata
- Download URL: mysqllib-1.0.6.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9c3d8c8f91d0942b5e8109b25952c8ad35daacecaa03b8868308d3faaec1f14
|
|
| MD5 |
4b3b99e45706831ed500ee3a60c641af
|
|
| BLAKE2b-256 |
2bbbbdf507fdde686a91844cecfb935a1a09bfcbc130de1734f216d9ec2699e2
|
File details
Details for the file mysqllib-1.0.6-py3-none-any.whl.
File metadata
- Download URL: mysqllib-1.0.6-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
079af8a0db416c86ee6cb97871dcc600711b469ef7fc74c7b9bade81b7a266de
|
|
| MD5 |
db1af18a56d03d6aeba18b94f1653e8f
|
|
| BLAKE2b-256 |
b494708876ec9f4f3620de20ebd65dcd2cf3c200d91c2ca77bb66a7185251715
|