PyDAL


NamePyDAL JSON
Version 20230407.2 PyPI version JSON
download
home_page
SummarypyDAL is a Database Abstraction Layer. It generates queries for SQlite, PotsgreSQL, MySQL, and other backends. It was originally part of the web2py frameworks but it is not an independent project. Example: db.define_table("thing",Field("name")) and db.thing.insert(name="Pizza")
upload_time2023-05-07 23:30:10
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            # pyDAL

pyDAL is a pure Python Database Abstraction Layer.

It dynamically generates the SQL/noSQL in realtime using the specified dialect for the database backend, 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 compatible with any Python program. pyDAL doesn't require web2py and can be used in any Python context.

[![pip version](https://img.shields.io/pypi/v/pydal.svg?style=flat-square)](https://pypi.python.org/pypi/pydal)
[![Build Status](https://img.shields.io/travis/web2py/pydal/master.svg?style=flat-square&label=Travis-CI)](https://travis-ci.com/web2py/pydal)
[![Coverage Status](https://img.shields.io/codecov/c/github/web2py/pydal.svg?style=flat-square)](https://codecov.io/github/web2py/pydal)
[![API Docs Status](https://readthedocs.org/projects/pydal/badge/?version=latest&style=flat-square)](http://pydal.rtfd.org/)

## Installation

You can install pyDAL using `pip`:

```bash
pip install pyDAL
```

## Usage and Documentation

Here is a quick example:

```pycon
>>> 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 supports the following databases:

* SQLite
* MySQL
* PostgreSQL
* MSSQL
* FireBird
* Oracle
* DB2
* Ingres
* Sybase
* Informix
* Teradata
* Cubrid
* SAPDB
* IMAP
* MongoDB

## License

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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "PyDAL",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Massimo Di Pierro <massimo.dipierro@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/32/be/05cc12598b83b2a070bb06be1d391a26ac19be9ca477d051156645f89502/PyDAL-20230407.2.tar.gz",
    "platform": null,
    "description": "# pyDAL\n\npyDAL is a pure Python Database Abstraction Layer.\n\nIt dynamically generates the SQL/noSQL in realtime using the specified dialect for the database backend, 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.\n\npyDAL comes from the original web2py's DAL, with the aim of being compatible with any Python program. pyDAL doesn't require web2py and can be used in any Python context.\n\n[![pip version](https://img.shields.io/pypi/v/pydal.svg?style=flat-square)](https://pypi.python.org/pypi/pydal)\n[![Build Status](https://img.shields.io/travis/web2py/pydal/master.svg?style=flat-square&label=Travis-CI)](https://travis-ci.com/web2py/pydal)\n[![Coverage Status](https://img.shields.io/codecov/c/github/web2py/pydal.svg?style=flat-square)](https://codecov.io/github/web2py/pydal)\n[![API Docs Status](https://readthedocs.org/projects/pydal/badge/?version=latest&style=flat-square)](http://pydal.rtfd.org/)\n\n## Installation\n\nYou can install pyDAL using `pip`:\n\n```bash\npip install pyDAL\n```\n\n## Usage and Documentation\n\nHere is a quick example:\n\n```pycon\n>>> from pydal import DAL, Field\n>>> db = DAL('sqlite://storage.db')\n>>> db.define_table('thing', Field('name'))\n>>> db.thing.insert(name='Chair')\n>>> query = db.thing.name.startswith('C')\n>>> rows = db(query).select()\n>>> print rows[0].name\nChair\n>>> db.commit()\n```\n\nThe complete documentation is available on http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer\n\n## What's in the box?\n\nA little *taste* of pyDAL features:\n\n* Transactions\n* Aggregates\n* Inner Joins\n* Outer Joins\n* Nested Selects\n\n## Which databases are supported?\n\npyDAL supports the following databases:\n\n* SQLite\n* MySQL\n* PostgreSQL\n* MSSQL\n* FireBird\n* Oracle\n* DB2\n* Ingres\n* Sybase\n* Informix\n* Teradata\n* Cubrid\n* SAPDB\n* IMAP\n* MongoDB\n\n## License\n\npyDAL is released under the BSD-3c License.  For further details, please check the `LICENSE` file.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "pyDAL is a Database Abstraction Layer. It generates queries for SQlite, PotsgreSQL, MySQL, and other backends. It was originally part of the web2py frameworks but it is not an independent project. Example: db.define_table(\"thing\",Field(\"name\")) and db.thing.insert(name=\"Pizza\")",
    "version": "20230407.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/web2py/pydal/issues",
        "Documentation": "https://py4web.com/_documentation/static/en/chapter-07.html",
        "Homepage": "https://github.com/web2py/pydal"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a3b33d2e6d409f47ad8fd2c489cb84dfcac15245bbd918d6da2119c8862d701",
                "md5": "fe3731cb465df5e9f8fe50582c69bbdd",
                "sha256": "d4ca57af8f6fe8e55cfb77aeb832a31b5fb6f47e6b04db05204320d9b5146c20"
            },
            "downloads": -1,
            "filename": "PyDAL-20230407.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fe3731cb465df5e9f8fe50582c69bbdd",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 243095,
            "upload_time": "2023-05-07T23:30:08",
            "upload_time_iso_8601": "2023-05-07T23:30:08.392146Z",
            "url": "https://files.pythonhosted.org/packages/1a/3b/33d2e6d409f47ad8fd2c489cb84dfcac15245bbd918d6da2119c8862d701/PyDAL-20230407.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "32be05cc12598b83b2a070bb06be1d391a26ac19be9ca477d051156645f89502",
                "md5": "eb243e0c5e8f7f34ab95242af62b5c4b",
                "sha256": "2677d12b3e5939b89ee950c5a6357cee057c3579aa69d18d33d2c74e3976819c"
            },
            "downloads": -1,
            "filename": "PyDAL-20230407.2.tar.gz",
            "has_sig": false,
            "md5_digest": "eb243e0c5e8f7f34ab95242af62b5c4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 405031,
            "upload_time": "2023-05-07T23:30:10",
            "upload_time_iso_8601": "2023-05-07T23:30:10.253611Z",
            "url": "https://files.pythonhosted.org/packages/32/be/05cc12598b83b2a070bb06be1d391a26ac19be9ca477d051156645f89502/PyDAL-20230407.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-07 23:30:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "web2py",
    "github_project": "pydal",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": false,
    "appveyor": true,
    "tox": true,
    "lcname": "pydal"
}
        
Elapsed time: 0.07348s