Skip to content

Small MySQL class for doing simple database operations.

License

Notifications You must be signed in to change notification settings

diversen/python-mysql-object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python mysql object

Simple Python Sqlite3 CRUD and query tool

The main usage is probably if you don't use a ORM, but query the database directly.

Install python-mysql-object

pip install git+https://github.com/diversen/python-sqlite-object

Or using a tag (latest):

pip install git+https://github.com/diversen/[email protected]

Usage

See example.py for an example.

Tests

The following SQL creates the database and the test table:

CREATE TABLE IF NOT EXISTS tests (
    test_id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(255) NOT NULL,
    description TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)

To run the tests:

python -m unittest discover -s tests

License

MIT

python-sqlite-object

About

Small MySQL class for doing simple database operations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published