Skip to main content
sqllex logo

SQLLEX ORM v0.3.0

python-auto-ver lgtm-quality-img lgtm-alerts-img

pypi-version-img pypi-downloads-img

wiki-img docs-dark-img telegram-group-img


The most pythonic ORM. Seriously, try it out!

Installation

pip install sqllex
Version Status Tests, and actions
==0.2.3 ✔️ supported
✔️ stable
code-ql-img
sqllex-tests-img
pypi-upload-img
<=0.2.0.4 ⚠️ outdated
⚠️ Security issue
CVE-2022-0329
⚠️ Mostly passing
<=0.1.10.4 ❌️ outdated ❌
Databases Support
SQLite ✔️
PostgreSQL ✔️*

* - partially support

About

Use databases without thinking about SQL.

Interact with a database as python object by intuitive methods just like .insert(), .select() or .find().

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

SQLite3

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)]

Examples

DMS Example
SQLite3 "Zero level" (v0.2+)
SQLite3 "Pre-Intermediate" (v0.2+)
SQLite3 Data Science (v0.1.8.4)
SQLite3 Project Showcase
PostgreSQL -

Community

stars-image

Not enough? Read more in Sqllex Documentation!

Wiki contents


Other

UPDATES

WARNING

LICENSE

DOCUMENTATION

Metadata

Release files for sqllex 0.3.0.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqllex 0.3.0.post2
File Size Uploaded Provenance
sqllex-0.3.0.post2.tar.gz 44.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sqllex 0.3.0.post2
File Interpreter ABI Platform
sqllex-0.3.0.post2-py3-none-any.whl Python 3 none any Details

Total release size: 99.0 kB

Release files / sqllex-0.3.0.post2.tar.gz

Download URL sqllex-0.3.0.post2.tar.gz
Size 44.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6f1ee484b36b4b992267e98d4d9aa131c70a48209c1e36827df3217a1103de25
BLAKE2b-256 checksum
How to use checksums
488009ea3923e85c7a5b1555d6f09c97e7be38b2d4722f6840a325fd816d6c1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.2

Release files / sqllex-0.3.0.post2-py3-none-any.whl

Download URL sqllex-0.3.0.post2-py3-none-any.whl
Size 54.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71c2a61d18474f578ea830614624905087a977775200e17f2a3f111812686bd9
BLAKE2b-256 checksum
How to use checksums
9f5c4643087d90a63b0a4a8fb8f894ae08819d6a0b06ad39349eec111586316b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.2

Security for sqllex 0.3.0.post2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page