Skip to main content

a pure Python Database Abstraction Layer

Project description

pyDAL

pyDAL is a pure Python Database Abstraction Layer.

It dynamically generates the SQL in real time using the specified dialect for the database back end, so that you do not have to write SQL code or learn different SQL dialects (the term SQL is used generically), and your code will be portable among different types of databases.

pyDAL comes from the original web2py's DAL, with the aim of being wide-compatible. pyDAL doesn't require web2py and can be used in any Python context.

pip version Build Status MS Build Status Coverage Status API Docs Status

Installation

You can install pyDAL using pip:

pip install pyDAL

Usage and documentation

Here is a quick example:

>>> from pydal import DAL, Field
>>> db = DAL('sqlite://storage.db')
>>> db.define_table('thing',Field('name'))
>>> db.thing.insert(name='Chair')
>>> query = db.thing.name.startswith('C')
>>> rows = db(query).select()
>>> print rows[0].name
Chair
>>> db.commit()

The complete documentation is available on http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer

What's in the box?

A little taste of pyDAL features:

  • Transactions
  • Aggregates
  • Inner Joins
  • Outer Joins
  • Nested Selects

Which databases are supported?

pyDAL actually support these databases:

  • sqlite
  • postgresql
  • mysql
  • mssql
  • db2
  • firebird
  • sybase
  • oracle
  • informix
  • teradata
  • sapdb
  • ingres
  • cubrid
  • imap
  • mongodb

License

pyDAL is released under the BSD-3c License. For further details, please check the LICENSE file.

Project details


Download files

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

Source Distribution

emmett_pydal-17.3.3.tar.gz (174.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emmett_pydal-17.3.3-py3-none-any.whl (170.7 kB view details)

Uploaded Python 3

File details

Details for the file emmett_pydal-17.3.3.tar.gz.

File metadata

  • Download URL: emmett_pydal-17.3.3.tar.gz
  • Upload date:
  • Size: 174.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for emmett_pydal-17.3.3.tar.gz
Algorithm Hash digest
SHA256 37e584c94bb1d91731b895be0135b8ef674dee051133cbf835a5fd82080009be
MD5 568444a892ac6b6be741d2daecd3044a
BLAKE2b-256 9c5b5df1ca8f9f0632ea94ac2c8fdbd4b8ee1da06cdafef34acf1cad18d86b5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for emmett_pydal-17.3.3.tar.gz:

Publisher: publish.yml on gi0baro/pydal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file emmett_pydal-17.3.3-py3-none-any.whl.

File metadata

  • Download URL: emmett_pydal-17.3.3-py3-none-any.whl
  • Upload date:
  • Size: 170.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for emmett_pydal-17.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af6d4f66e820eecda9792646c5e15dea13907642a474c5175542c4de137cdbea
MD5 12678a1b975bfa7e65eb5b12d607601e
BLAKE2b-256 d26ad30f6e97c47d629ce1e9e56056a56bfc065624762f1835be93effe6bf07a

See more details on using hashes here.

Provenance

The following attestation bundles were made for emmett_pydal-17.3.3-py3-none-any.whl:

Publisher: publish.yml on gi0baro/pydal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page