-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,38 @@ | ||
# spatialite | ||
spatialite | ||
========== | ||
|
||
Wrapper for standard Python module `sqlite3` which adds SpatiaLite support. | ||
|
||
|
||
## Requirement: mod_spatialite | ||
Requirement: mod_spatialite | ||
--------------------------- | ||
|
||
This module will try to load SpatiaLite extension in SQLite and thus requires | ||
"mod_spatialite" being present. | ||
|
||
Ubuntu: | ||
Ubuntu:: | ||
|
||
$ apt-get install libsqlite3-mod-spatialite | ||
|
||
macOS: | ||
macOS:: | ||
|
||
$ brew install libspatialite | ||
|
||
|
||
## Install | ||
Install | ||
------- | ||
|
||
Using pip:: | ||
|
||
$ pip install spatialite | ||
|
||
Usage | ||
----- | ||
|
||
## Usage | ||
.. code-block:: python | ||
```python | ||
import spatialite | ||
import spatialite | ||
with spatialite.connect('sl_temp.db') as db: | ||
print(db.execute('SELECT spatialite_version()').fetchone()[0]) | ||
``` | ||
with spatialite.connect('sl_temp.db') as db: | ||
print(db.execute('SELECT spatialite_version()').fetchone()[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters