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.1.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.1-py3-none-any.whl (170.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for emmett_pydal-17.3.1.tar.gz
Algorithm Hash digest
SHA256 3aff9c73eeaeddc583372204b2164c95407ae3b30c6afa9f55539a3995cf2e23
MD5 814a1f800a845a6e3afed449844b62e8
BLAKE2b-256 e9cca2206bf033815d3ebec294ed9939c4a678cd6612e2814b6583bdc12b8899

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for emmett_pydal-17.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bda72f71f4db71defa142350b0c820e83f7831fc16995e0c984f41755d84af7
MD5 5d6b13eb89e4ef50dbd4fd2e29ea8c4e
BLAKE2b-256 0c5dd28bb04716c7db815198e4c65a997def5537678687cc840987ff52eea3bd

See more details on using hashes here.

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