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.

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.2.tar.gz (174.5 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.2-py3-none-any.whl (170.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for emmett_pydal-17.3.2.tar.gz
Algorithm Hash digest
SHA256 f0c04f4fb9926bc248e931a9f1d07c15054edd331998370b2401f4e69fc88972
MD5 533903852dda71682f5bda5ea181346d
BLAKE2b-256 0fdc15b0f7a61e166faab537b134df9d26c53176c65bd5ed53ae137e29868b2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for emmett_pydal-17.3.2.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.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for emmett_pydal-17.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da70ba62295f3b553bbd3030e420d658e1b3405d53dd342f9612a4419be5596a
MD5 fd3d97f2adb9acfdfda6de3d6d12da69
BLAKE2b-256 aac5d05fa4f1b28d2e014c752408d9f71be2da36aec3c0465e8ff3c4dd474411

See more details on using hashes here.

Provenance

The following attestation bundles were made for emmett_pydal-17.3.2-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