{"repo":"segasai/sqlutilpy","free":true,"listed":false,"github":"https://github.com/segasai/sqlutilpy","clone":"git clone https://github.com/segasai/sqlutilpy.git","description":"Python module to efficiently query SQL databases and return numpy arrays","language":"Python","stars":11,"topics":["query","sql","database","python","numpy"],"license":"BSD-3-Clause","category":"databases-storage","readme_excerpt":"sqlutilpy Python module to query SQL databases and return numpy arrays, upload tables and run join queries involving local arrays and the tables in the DB. This module is optimized to deal efficiently with query results with millions of rows. The module works with PostgreSQL, SQLite and DuckDB databases. The full documentation is available here Author: Sergey Koposov (Uni of Cambridge/CMU/Uni of Edinburgh) Installation To install the package you just need to do pip install. Authentication Throughout this readme, I will assume that if you are using PostgreSQL, then the .pgpass file ( https://www.postgresql.org/docs/11/libpq-pgpass.html ) has been created with your login/password details for Postgresql. If that is not the case, many of the commands given below will also need user='....' and password='...' options. Connection information Most of the sqlutilpy commands require hostname, database name. If you don't want to always type it, you can use standard PostgreSQL environment variables like PGPORT, PGDATABASE, PGUSER, PGHOST for the port, database name, user name and hostname of the connection. Querying the database and retrieving the results This command will run the query and put the columns into variables ra,dec: By default sqlutilpy.get executes the query and returns the tuple with arrays. One array for each column in the query result. You can return the results as dictionary using asDict option. Uploading your arrays as column in a table You can use sqlutilpy.upload to ","default_branch":null,"files":null,"tree":[],"storefront":"/r/segasai","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/segasai/sqlutilpy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}