Sqllex
The most pythonic ORM (for SQLite and PostgreSQL). Seriously, try it out!
Install / Use
/learn @v1a0/SqllexREADME
SQLLEX ORM v0.3.0
<br> The most pythonic ORM. Seriously, try it out!<br> </div><br>Installation
pip install sqllex
| Version | Status | Tests, and actions |
|:-----------:|:-------------------------------------:|:---------------------------------------------------------------------------------------------------------------------:|
| >=0.3.0 | ✔️ Supported <br> ✔️ Stable | <br>
<br>
|
|
<=0.2.3 | ⚠️ OUTDATED | ⚠️ Mostly passing |
| <=0.2.0.4 | ❌️ Security issue <br> CVE-2022-0329 | ❌️ |
| Databases | Support | |:-----------|:-------:| | SQLite | ✔️ | | PostgreSQL | ✔️* |
<small>* - partially support</small>
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)]
<br>
<details>
<summary id="what1">WHAT IS GOING ON THERE?!</summary>
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)]
</details>
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
Not enough? Read more in Sqllex Documentation!
Wiki contents
Other
UPDATES
WARNING
LICENSE
DOCUMENTATION
<!-- ALIASES --> <!-- Images --> <!-- Sources -->Related Skills
oracle
339.3kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
prose
339.3kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
claude-opus-4-5-migration
83.9kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
Command Development
83.9kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
