About
A simple and lightweight ORM that facilitate some operations on SQL Server using of pyodbc.
How to use
Preparation
# Single call it once to setup the inner settings
BetterMSSQL.setup("name of the database", "db user", "db password", "host", 1234) #port
# Creating a DB Model
class Fruits():
_table = "fruit_table_name"
class People():
_table = "people_table_name"
Select
# Select the first fruit ordered by name and retrieve the first row
Fruits().select("name").order("name").row() # returns one row
# Select all data from the top 15 fruits
Fruits().select("*").top("15").run() # returns a row list
# Select all data from the top 15 fruits
Fruits().select("*").top("15").run() # returns a row list
# Select the name of the first person with 34 years old
People().select("name").where("age = ?").cell(34) # returns the first cell of the first row
Insert
# Inserting a person given its name and age
People().insert("name, age").run(["Matt", 34])
Update
# Updating all ages to 16 where the name is Matt
People().update("age = ?").where("name = ?").run([16, "Matt"])
Delete
# Delete all people
People().delete()
Metadata
Release files for bettermssql 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bettermssql-0.0.2.tar.gz | 3.5 kB | Without provenance | Details for bettermssql-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bettermssql-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for bettermssql-0.0.2-py3-none-any.whl |
Total release size: 7.3 kB
Release files / bettermssql-0.0.2.tar.gz
| Download URL | bettermssql-0.0.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
794f14c13bdb395d8d6a35062072a3413b16d112622ec64f20766aeca36b1519
|
|
BLAKE2b-256 checksum How to use checksums |
8ff3f00161e97053d4ad835ca99ce683400a5c8de93426e348706f81a625974f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.18
|
Release files / bettermssql-0.0.2-py3-none-any.whl
| Download URL | bettermssql-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04f8366a37d68f868b9406d38c35a06e0ae9589b9e100c955125a2cc935de9a6
|
|
BLAKE2b-256 checksum How to use checksums |
e05c18a023f3bbd0d4ed4ce83b0976e3602dd0feee345123c77ac0a7dee7f56e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.18
|
Security for bettermssql 0.0.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.