{"id":16299605,"url":"https://github.com/dcwatson/dorm","last_synced_at":"2025-04-09T21:28:50.701Z","repository":{"id":57423672,"uuid":"181599234","full_name":"dcwatson/dorm","owner":"dcwatson","description":"A tiny SQLite ORM for Python.","archived":false,"fork":false,"pushed_at":"2019-07-21T03:38:56.000Z","size":39,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T13:47:56.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcwatson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-16T02:25:53.000Z","updated_at":"2025-01-01T21:33:08.000Z","dependencies_parsed_at":"2022-08-30T02:11:42.707Z","dependency_job_id":null,"html_url":"https://github.com/dcwatson/dorm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcwatson%2Fdorm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcwatson%2Fdorm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcwatson%2Fdorm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcwatson%2Fdorm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcwatson","download_url":"https://codeload.github.com/dcwatson/dorm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114223,"owners_count":21049997,"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-10-10T20:48:42.291Z","updated_at":"2025-04-09T21:28:50.679Z","avatar_url":"https://github.com/dcwatson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dorm\n\n[![Build Status](https://travis-ci.org/dcwatson/dorm.svg?branch=master)](https://travis-ci.org/dcwatson/dorm)\n\nA small SQLite ORM for Python 3. You probably shouldn't use this, but if you want to anyway, `pip install dorm`\nand look at the [tests](https://github.com/dcwatson/dorm/blob/master/tests.py) for how to do so.\n\n\n## Migrations\n\nDorm has the most basic migration support imaginable:\n\n```\n# Generates a schema migration if it detects any changes.\npython -m dorm --db=books.db --models=project.models --migrations=project.migrations generate\n\n# Migrates to the latest migration (sorted by filename in the --migrations module).\npython -m dorm --db=books.db --models=project.models --migrations=project.migrations migrate\n```\n\nExisting migrations are run automatically when calling `dorm.setup` with the `migrations` argument set. This\nis to ensure a good first-run experience and automatic upgrades for end users. If `migrations` is not set,\nany detected schema changes will be applied automatically to the database.\n\n\n## Asynchronous Tables\n\nDorm can be used with `asyncio` by simply subclassing `AsyncTable` instead of `Table`. The `insert` class method,\nand `save` and `refresh` instance methods become coroutines in that case. Also, the `query` class method will return\nan `AsyncQuery` instance, with coroutines for `count`, `values`, `get`, `update`, and iteration via `__aiter__`\n(i.e. `async for obj in MyTable.query()`).\n\nMigrations and introspection still happen synchronously, since they tend not to happen during times where they would\nbenefit from being asyncronous.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcwatson%2Fdorm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcwatson%2Fdorm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcwatson%2Fdorm/lists"}