{"id":30950933,"url":"https://github.com/imgurbot12/anysql","last_synced_at":"2026-04-29T22:36:19.964Z","repository":{"id":174928049,"uuid":"653014075","full_name":"imgurbot12/anysql","owner":"imgurbot12","description":"Lightweight, Thread-Safe, Flexible, Powerful, SQL Library","archived":false,"fork":false,"pushed_at":"2024-09-11T22:19:36.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T06:51:34.336Z","etag":null,"topics":["databases","mysql","postgres","python","python3","sql","sql-client","sqlite"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/anysql/","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/imgurbot12.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-13T08:42:39.000Z","updated_at":"2025-06-17T21:37:57.000Z","dependencies_parsed_at":"2024-09-12T07:39:29.405Z","dependency_job_id":null,"html_url":"https://github.com/imgurbot12/anysql","commit_stats":null,"previous_names":["imgurbot12/anysql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imgurbot12/anysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Fanysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Fanysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Fanysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Fanysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imgurbot12","download_url":"https://codeload.github.com/imgurbot12/anysql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Fanysql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274582530,"owners_count":25311635,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"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":["databases","mysql","postgres","python","python3","sql","sql-client","sqlite"],"created_at":"2025-09-11T05:27:15.827Z","updated_at":"2026-04-29T22:36:19.939Z","avatar_url":"https://github.com/imgurbot12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"AnySQL\n-------\nLightweight, Thread-Safe, Version-Agnostic, SQL Client Implementation\ninspired by [Databases](https://github.com/encode/databases)\n\n### Features\n\n* **Lightweight** - no use of sqlalchemy or other massive frameworks\n* **ThreadSafe**  - implements threadsafe features for fearless concurrent usage\n* **Flexible**    - acts as a standard frontend for a wide variety of SQL backends\n* **Powerful**    - simple API design with powerful utilities and quality-of-life features\n\n### Installation\n\n```bash\n$ pip install anysql           # plain install\n$ pip install anysql[mysql]    # install with mysql driver\n$ pip install anysql[postgres] # install with postgres driver\n```\n\n### Security\n\nIt should be noted that anysql implements its own query parameterization to\nallow for greater API flexibility and performance, rather than rely on\nindividual sql backends or relying on massive frameworks like sqlalchemy to\nhandle query generation.\n\nThe existing parameterization has been thoroughly tested with\n[sqlmap](https://github.com/sqlmapproject/sqlmap), the world standard of\nsql pentesting-tools, to prevent and detect any possible sql-injection\nvulnerabilities.\n\nThe test-suite used is publically available within the source-code repo\nwithin the [tests](https://github.com/imgurbot12/anysql/tree/master/tests)\nfolder.\n\n### Example\n\n```python\n# Create a database instance, and connect to it.\nfrom anysql import Database\ndatabase = Database('sqlite://:memory:')\ndatabase.connect()\n\n# Create a table.\nquery = \"\"\"CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)\"\"\"\ndatabase.execute(query=query)\n\n# Insert some data.\nquery = \"INSERT INTO HighScores(name, score) VALUES (:name, :score)\"\nvalues = [\n    {\"name\": \"Daisy\", \"score\": 92},\n    {\"name\": \"Neil\", \"score\": 87},\n    {\"name\": \"Carol\", \"score\": 43},\n]\ndatabase.execute_many(query=query, values=values)\n\n# Run a database query.\nquery = \"SELECT * FROM HighScores\"\nrows = database.fetch_all(query=query)\nprint('High Scores:', rows)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgurbot12%2Fanysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimgurbot12%2Fanysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgurbot12%2Fanysql/lists"}