{"id":21610943,"url":"https://github.com/segasai/pginpy","last_synced_at":"2026-05-11T16:36:46.941Z","repository":{"id":136724971,"uuid":"330319071","full_name":"segasai/pginpy","owner":"segasai","description":"The module to start a temporary Postgresql instance from python and run queries against it.","archived":false,"fork":false,"pushed_at":"2021-01-28T17:43:09.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T16:04:32.561Z","etag":null,"topics":["postgresql","query"],"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/segasai.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-17T05:09:37.000Z","updated_at":"2021-01-28T17:43:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f0d35a1-ab00-4587-aa4f-d9a3ae214a55","html_url":"https://github.com/segasai/pginpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/segasai/pginpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segasai%2Fpginpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segasai%2Fpginpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segasai%2Fpginpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segasai%2Fpginpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/segasai","download_url":"https://codeload.github.com/segasai/pginpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segasai%2Fpginpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32903593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"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":["postgresql","query"],"created_at":"2024-11-24T21:10:18.111Z","updated_at":"2026-05-11T16:36:46.936Z","avatar_url":"https://github.com/segasai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# pginpy\n\nPython module to start a temporary instance of postgres to run queries against\n\nAuthor: Sergey Koposov (Uni of Cambridge/CMU/Uni of Edinburgh)\n\n## Installation\nTo install the package you just need to do pip install pginpy\n\n```\npip install pginpy\n```\n\nAfter installing my suggestion is to use sqlutilpy to query the database, but you\ncan use standard psycopg2\n\n\n```python\nimport pginpy\nimport sqlutilpy \n# start server in the temp directory, we specifiy the prefix to PG binaries if needed\nS = pginpy.PGServer(prefix='/home/koposov/bighome/soft/pginstall13/bin/')\n# get the connection\nconn=S.getConnection()\n# upload stuff in PG using sqlutilpy\nsqlutilpy.upload('tab',{'id':np.arange(100),'y':np.arange(100)**.4},conn=conn)\n# Run arbitrary queries against it\nID,avgy=sqlutilpy.get(''' select id, avg(y) from tab group by id''',conn=conn)\n# stop the server if needed\nS.stop()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegasai%2Fpginpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsegasai%2Fpginpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegasai%2Fpginpy/lists"}