Python bindings for Spatialite
C Shell Other
Latest commit e28e95b Jan 29, 2017 @lokkju committed on GitHub Merge pull request #26 from sebastic/setup-typo
Add missing comma in

Python interface to Spatialite

pyspatialite is an interface to the SQLite 3.x embedded relational database engine with spatialite extensions.

It is almost fully compliant with the Python database API version 2.0 and also exposes the unique features of SQLite and spatialite.


pip install pyspatialite

Pre-release Installation

In some cases, the most recent pypi release may be in a pre-release stage. In order to install pre-release packages, you must include the option '--pre' in your pip command:

pip install --pre pyspatialite


pyspatialite extends the sqlite3 interface, and so can be used in place of sqlite3 when modelling spatial information. The main interface is contained in the pyspatialite.dbapi2 package:

import pyspatialite.dbapi2 as db

con = db.connect(':memory:')

# Test that the spatialite extension has been loaded:
cursor = con.execute('SELECT sqlite_version(), spatialite_version()')
print cursor.fetchall()
# Output should be something like: [(u'3.7.9', u'3.0.1')]

For more information on simple pyspatialite usage, see

Bitdeli Badge