Skip to main content

Better than sqlite3

Project description

sqllex logo

SQLLEX v0.1.10 📚

python-3-9 lgtm-quality-img lgtm-alerts-img

pypi-version-img pypi-downloads-img

Wiki telegram-group-img


Better than sqlite3. Seriously, try it out

Installation

pip install sqllex

If you need most stable version install sqllex==0.1.10.5

Version Status Tests, and actions
0.1.10.5 ✔️ stable (testing)
✔️ supported
code-ql-img
sqlite3x-test-img
pypi-upload-img
0.1.9.10 ✔️ stable
❌️ outdated
✔️Mostly passing
<= 0.1.9.9 ⚠️ unstable
❌️ outdated
~

About

Use databases without thinking about SQL. Let me show you how sqllex ORM makes your life easier. Imagine you need create some database, save some data into it and take it back. That's how your easy to code with sqllex.

from sqllex import *

db = SQLite3x(                              
    path='my_database.db',                      
    template={                              
        "users": {                          
            "username": [TEXT, NOT_NULL],   
            "age": INTEGER,                 
        }                                   
    }                                       
)

users = db["users"]

users.insert('Sqllex', 33)

users_33 = users.find(age=33)

print(users_33)  # [['Sqllex', 33]]

WHAT IS GOING ON THERE?!
from sqllex import *

# Create some database, with simple structure
db = SQLite3x(                              # create database 
    path='my_data.db',                      # path to your database, or where you would like it locate
    template={                              # schema for tables inside your database                              
        "users": {                          # name for the 1'st table
            "username": [TEXT, NOT_NULL],   # 1'st column of table, named "username", contains text-data, can't be NULL
            "age": INTEGER,                 # 2'nd column of table, named "age", contains integer value
        }                                   # end of table
    }                                       # end of schema (template)
)

# Ok, now you have database with table inside it.
# Let's take this table as variable
users = db["users"]

# Now add record of 33 years old user named 'Sqllex' into it
# Dear table, please insert ['Sqllex', 33] values 
users.insert('Sqllex', 33)

# Dear table, please find records where_ column 'age' == 33
users_33 = users.find(age=33)

# Print results
print(users_33)  # [['Sqllex', 33]]

If you never used SQLite before read this awesome example #0 instead

Examples

Not enough? Read more in Sqllex Documentation!


Other

UPDATES

WARNING

LICENSE

DOCUMENTATION

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sqllex, version 0.1.10.5
Filename, size File type Python version Upload date Hashes
Filename, size sqllex-0.1.10.5-py3-none-any.whl (39.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sqllex-0.1.10.5.tar.gz (37.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page