Package for Postgis query using python
Project description
Postgis Assist
The postgis-assist library is build on top of psycopg2. It will be really helpful for running the basic postgresql and postgis query in python.
Checkout the official documentation of this library here: postgis-assist.readthedocs.io/
Installation
For installation of postgis-assist, you need to run following command
pip install postgis-assist
Examples using this library
Please check the official documentation here: https://postgis-assist.readthedocs.io/.
#Library import
from postgis.pgis import pgis
# Initialization of library
db = pgis(dbname='pgtest', user='postgres', password='admin', host='localhost', port='5432')
# Run any query
db.run_query('SELECT * FROM pg_catalog.pg_tables')
# Create schema
db.create_schema(schema_name='schema_name')
# Delete schema
db.delete_schema(schema_name='schema_name')
# Create Table
db.create_table(table_name='table_name', schema_name='schema_name', columns='id serial PRIMARY KEY, name varchar(50)')
# Get geometry as geojson
db.vector_geojson(schema_name='schema_name', table_name='table_name')
# Upload vector file to database
db.load_vector(vector_path, schema_name="public", table_name="vector")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file postgis-assist-0.0.3.tar.gz.
File metadata
- Download URL: postgis-assist-0.0.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/2.0.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9eed011edf77f75b468234a06867f321de7a3042cd87c60147bc9b364c19ea91
|
|
| MD5 |
89da99cf4d181cbb99b78362503f99a5
|
|
| BLAKE2b-256 |
52b0e155ff425948d3ec33c7a0937cf266831e780cfaad2e0d061374a4944bc4
|
File details
Details for the file postgis_assist-0.0.3-py3-none-any.whl.
File metadata
- Download URL: postgis_assist-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/2.0.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcc3d7dcae0c76b4c88fafeb1a90d269e4811ac065e9aacc07ee9e6a381b7af1
|
|
| MD5 |
6c4ac2216c9389694ec1659f571e7cfa
|
|
| BLAKE2b-256 |
155a09261260886ac4b56e5605a169766d546826098752be65a5e2a6749c4d92
|