CLI tool to upload data to Felt
Project description
felt-upload
What
Felt is "the best way to work with maps, together".
And this is a simple CLI application to upload your files to it from your console.
Why
The Felt API is pretty straightforward, but sometimes you just need a tool to upload a file from a command line and not deal with all the insides.
Install
pip install felt-upload
or you can use pipx:
pipx install felt-upload
API Token
To use it you need an API token from Felt. Get yours here.
You can either pass it directly as --token
option or provide as an env variable FELT_TOKEN
.
You can check token with the user
command, which will print out a user for the given token.
export FELT_TOKEN="felt_pat_Ul8HIuHJZuMyxJJ7ZHajj3gBM6KAs4mnnE6f7GiJIPC"
felt-upload user
felt-upload user --token "felt_pat_Ul8HIuHJZuMyxJJ7ZHajj3gBM6KAs4mnnE6f7GiJIPC"
All further examples assume you have token set in the env.
Usage
Create a map with a single layer and upload your files.
felt-upload map data.geojson
You can also specify a bunch of optional parameters.
felt-upload map --title "My new map" --layer-name "Great data" data.geojson
Keep in mind, felt-upload
is pretty straighforward and does not know much about different geo file formats, so if you use shapefiles, you need to specify all the files explicitly:
felt-upload map --title "My new map with shapefiles" shapefile.shx shapefile.shp shapefile.prj shapefile.dbf shapefile.cst
Or use a zip archive
felt-upload map --title "My new map with zipped shapefiles" shapefile_inside.zip
More use cases
Multiple layers
Create multiple layers on a single map
felt-upload map --title "Multilayer"
felt-upload layer <map-id> --layer-name "My point data" dataset.geojson
felt-upload layer <map-id> --layer-name "My other data" dataset-2.geojson
felt-upload layer-import <map-id> --layer-name "My layer from url" http://example.com/path-to-data
Existing map
Want to add layer to already existing map?
Grab map id
from the url as explained here, e.g. for https://felt.com/map/Untitled-Map-Cwc6EdieQdyXgyPMgDmYBC?loc=37.807,-122.271,14z you need a part after the map name and before the ?
: Cwc6EdieQdyXgyPMgDmYBC
.
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
File details
Details for the file felt_upload-0.1.1.tar.gz
.
File metadata
- Download URL: felt_upload-0.1.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9a757ce1684c6205c840e2b206d8f852e6802621c790ae45cd4af4b3b687c25 |
|
MD5 | 5a1a9d693dd13f2ff6058534df571f42 |
|
BLAKE2b-256 | d57500713c2657590fc70ff11895e253f911f1d50a2d7d921651f008a37dfca7 |
File details
Details for the file felt_upload-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: felt_upload-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4847430ca4b09f28d3fea4396de1656e0ca094669b5dd374266445d1cdb2ee80 |
|
MD5 | bdb416764725616ec3dde6fb033300ef |
|
BLAKE2b-256 | adc39f60397b5faaa0d9955244e3ac8ac22d8b2a55b239308461fcb883840804 |