Skip to main content

About

A simple and lightweight ORM that facilitate some operations on MySQL using of pymysql.

How to use

Preparation

# Single call it once to setup the inner settings
BetterMYSQL.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("*").limit("15").run() # returns a row list

# Select all data from the top 15 fruits
Fruits().select("*").limit("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 bettermysql 0.0.5

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

Source distribution (sdist)

Source distribution for bettermysql 0.0.5
File Size Uploaded Provenance Actions
bettermysql-0.0.5.tar.gz 3.4 kB Without provenance Details for bettermysql-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bettermysql 0.0.5
File Interpreter ABI Platform Actions
bettermysql-0.0.5-py3-none-any.whl Python 3 none any Details for bettermysql-0.0.5-py3-none-any.whl

Total release size: 7.0 kB

Release files / bettermysql-0.0.5.tar.gz

Download URL bettermysql-0.0.5.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
342a2a6d392039e4b354dfdd567ccd188faea0dde71866526b6bbeffe0d38822
BLAKE2b-256 checksum
How to use checksums
6523c09cb15a9b876cd0e97ca68c2e9231d6a8ed5dd9c8c158ff3f7043f67d9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.18

Release files / bettermysql-0.0.5-py3-none-any.whl

Download URL bettermysql-0.0.5-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b21776e5969c388a45bbb4c68e175e71ab8bd530ac6ff93cfdec9020fab9a546
BLAKE2b-256 checksum
How to use checksums
e0f86f6f2fb96464a116f42227ace689156234988aeb6c0c6218ad1420ea1216
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.18

Security for bettermysql 0.0.5

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.

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