{"id":13502173,"url":"https://github.com/web2py/pydal","last_synced_at":"2025-05-15T11:07:43.463Z","repository":{"id":24217625,"uuid":"27609645","full_name":"web2py/pydal","owner":"web2py","description":"A pure Python Database Abstraction Layer","archived":false,"fork":false,"pushed_at":"2025-05-02T07:35:10.000Z","size":33314,"stargazers_count":512,"open_issues_count":143,"forks_count":145,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-05-02T07:52:33.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web2py.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-12-05T20:51:28.000Z","updated_at":"2025-05-02T07:35:13.000Z","dependencies_parsed_at":"2023-01-14T00:35:59.243Z","dependency_job_id":"6f584c9a-f008-4990-9b3d-27801e67839c","html_url":"https://github.com/web2py/pydal","commit_stats":{"total_commits":5911,"total_committers":168,"mean_commits":35.18452380952381,"dds":0.2833699881576721,"last_synced_commit":"b171757cbd19ae6d355d5a02a87f3bdf2a1423ec"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2py%2Fpydal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2py%2Fpydal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2py%2Fpydal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2py%2Fpydal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web2py","download_url":"https://codeload.github.com/web2py/pydal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328384,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:02:04.739Z","updated_at":"2025-05-15T11:07:43.414Z","avatar_url":"https://github.com/web2py.png","language":"Python","readme":"# pyDAL\n\n[![pip version](https://img.shields.io/pypi/v/pydal.svg?style=flat-square)](https://pypi.python.org/pypi/pydal)\n[![master-test](https://github.com/web2py/pydal/actions/workflows/run_test.yaml/badge.svg)](https://github.com/web2py/pydal/actions/workflows/run_test.yaml)\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\u0026style=flat-square)](http://pydal.rtfd.org/)\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.\nWhat makes pyDAL different from most of the other DALs is the syntax: it maps records to python dictionaries, which is simpler and closer to SQL. Other famous frameworks instead strictly rely on an Object Relational Mapping (ORM) like the Django ORM or the SQL Alchemy ORM, that maps tables to Python classes and rows to Objects.\n\nHistorically pyDAL comes from the original web2py's DAL, with the aim of being compatible with any Python program. However, pyDAL nowadays is an indipendent package that can be used in any Python 3.7+ context.\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\u003e\u003e\u003e from pydal import DAL, Field\n\u003e\u003e\u003e db = DAL('sqlite://storage.db')\n\u003e\u003e\u003e db.define_table('thing', Field('name'))\n\u003e\u003e\u003e db.thing.insert(name='Chair')\n\u003e\u003e\u003e query = db.thing.name.startswith('C')\n\u003e\u003e\u003e rows = db(query).select()\n\u003e\u003e\u003e print rows[0].name\nChair\n\u003e\u003e\u003e db.commit()\n```\n\nThe complete updated documentation is available on [the py4web manual](https://py4web.com/_documentation/static/en/chapter-07.html)\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* Google Firestore\n\n## License\n\npyDAL is released under the BSD-3c License.  For further details, please check the `LICENSE` file.\n","funding_links":[],"categories":["Python","HarmonyOS","ORM","Awesome Python"],"sub_categories":["Windows Manager","ORM"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb2py%2Fpydal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb2py%2Fpydal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb2py%2Fpydal/lists"}