fiona-settings
Lightweight wrapper for fiona settings & schemas to make it a little easier to manipulate.
Fiona includes a lot of "magic strings" representings GDAL drivers, CRS values, data types, and more.
While it's all quite intuitive and relatively simple, I have always wished there
was a neater way to manage them all, and so I wrote this.
install
Requires Python3.6+.
with pip:
pip install fiona-settings
from source:
git clone git@github.com:tomplex/fiona_settings.git
pip install fiona_settings/
examples
import fiona
from fiona_settings import Settings, Type, Driver, CRS
src = fiona.open('my_file.shp')
# from_collection copies the following settings from an already opened collection:
# - driver
# - schema
# - crs
# - encoding
settings = Settings.from_collection(src)
# add a string column with width 25
settings += ('my_column', Type.str(width=25))
settings += ('my_other_column', 'float') # don't need to use Enum types
# Remove a column by name
settings -= 'column_i_dont_want'
# unpack the settings directly into the fiona.open() function
sink = fiona.open('my_output_file.shp', 'w', **settings)
# Override any option which would be copied with a kwarg. Either
# string or enum values will work.
new_settings = Settings.from_collection(src, driver=Driver.GeoJSON)
sink = fiona.open('my_file.geojson', 'w', **new_settings)
Metadata
Release files for fiona-settings 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fiona_settings-0.1.0.tar.gz | 5.4 kB | Without provenance | Details for fiona_settings-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fiona_settings-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for fiona_settings-0.1.0-py2.py3-none-any.whl |
Total release size: 15.4 kB
Release files / fiona_settings-0.1.0.tar.gz
| Download URL | fiona_settings-0.1.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95ad66473b3e1c028a51b920881e6f1ccc7b23b249b14ed93bc4cd6ab87ca46e
|
|
BLAKE2b-256 checksum How to use checksums |
65206f8535a844ff0fffe25fb4b7beb13b1e662b38b6c025442db486d106398e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / fiona_settings-0.1.0-py2.py3-none-any.whl
| Download URL | fiona_settings-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9efe23c63e2838c778a2a057495b2af533f9f8aaf6be7b6d5d6a313a6321d069
|
|
BLAKE2b-256 checksum How to use checksums |
8e3422685d437295bc56e43ecd8881db9229ebdc69471d9c9e18c2e1073fa7a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Security for fiona-settings 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.