{"id":33930976,"url":"https://github.com/ryanfowler/async-sqlite","last_synced_at":"2026-04-06T06:03:15.737Z","repository":{"id":179281974,"uuid":"658365728","full_name":"ryanfowler/async-sqlite","owner":"ryanfowler","description":"A Rust library to interact with sqlite from an async context.","archived":false,"fork":false,"pushed_at":"2026-03-16T15:03:34.000Z","size":96,"stargazers_count":23,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-17T01:30:00.147Z","etag":null,"topics":["async","rusqlite","rust","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ryanfowler.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-06-25T14:35:53.000Z","updated_at":"2026-03-16T15:03:00.000Z","dependencies_parsed_at":"2025-02-07T22:26:31.615Z","dependency_job_id":"18bcba71-1d07-4a4f-af0e-22829d3139bc","html_url":"https://github.com/ryanfowler/async-sqlite","commit_stats":null,"previous_names":["ryanfowler/async-sqlite"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ryanfowler/async-sqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Fasync-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Fasync-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Fasync-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Fasync-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanfowler","download_url":"https://codeload.github.com/ryanfowler/async-sqlite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfowler%2Fasync-sqlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31461534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["async","rusqlite","rust","sqlite","sqlite3"],"created_at":"2025-12-12T12:24:01.916Z","updated_at":"2026-04-06T06:03:15.725Z","avatar_url":"https://github.com/ryanfowler.png","language":"Rust","readme":"# async-sqlite\n\n[![Crates.io](https://img.shields.io/crates/v/async-sqlite)](https://crates.io/crates/async-sqlite)\n[![docs.rs](https://img.shields.io/docsrs/async-sqlite)](https://docs.rs/async-sqlite)\n\nA library to interact with sqlite from an async context.\n\nThis library is tested on both [tokio](https://docs.rs/tokio/latest/tokio/)\nand [smol](https://docs.rs/smol/latest/smol/), however\nit should be compatible with all async runtimes.\n\n## Install\n\nAdd `async-sqlite` to your \"dependencies\" in your Cargo.toml file.\n\nThis can be done by running the command:\n\n```\ncargo add async-sqlite\n```\n\n## Usage\n\nA `Client` represents a single background sqlite3 connection that can be called\nconcurrently from any thread in your program.\n\nTo create a sqlite client and run a query:\n\n```rust\nuse async_sqlite::{ClientBuilder, JournalMode};\n\nlet client = ClientBuilder::new()\n                .path(\"/path/to/db.sqlite3\")\n                .journal_mode(JournalMode::Wal)\n                .open()\n                .await?;\n\nlet value: String = client.conn(|conn| {\n    conn.query_row(\"SELECT val FROM testing WHERE id=?\", [1], |row| row.get(0))\n}).await?;\n\nprintln!(\"Value is: {value}\");\n```\n\nA `Pool` represents a collection of background sqlite3 connections that can be\ncalled concurrently from any thread in your program.\n\nTo create a sqlite pool and run a query:\n\n```rust\nuse async_sqlite::{JournalMode, PoolBuilder};\n\nlet pool = PoolBuilder::new()\n              .path(\"/path/to/db.sqlite3\")\n              .journal_mode(JournalMode::Wal)\n              .open()\n              .await?;\n\nlet value: String = pool.conn(|conn| {\n    conn.query_row(\"SELECT val FROM testing WHERE id=?\", [1], |row| row.get(0))\n}).await?;\n\nprintln!(\"Value is: {value}\");\n```\n\n## Cargo Features\n\nThis library tries to export almost all features that the underlying\n[rusqlite](https://docs.rs/rusqlite/latest/rusqlite/) library contains.\n\nA notable difference is that the `bundled` feature is **enabled** by default,\nbut can be disabled with the following line in your Cargo.toml:\n\n```toml\nasync-sqlite = { version = \"*\", default-features = false }\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfowler%2Fasync-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanfowler%2Fasync-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfowler%2Fasync-sqlite/lists"}