A package for interacting with the API of Felt.com
Project description
FeltPy
feltpy is a lightweight Python package to interact with the public API of Felt.com.
Installation
This package is available in PyPI, and can be installed like so:
pip install feltpy
Once installed, import the package with
import feltpy
This package only requires a few packages, most of which come with a default installation of Python, namely:
I've only tested this on Python 3.10, but it will presumably work with older version of Python 3!
Set-Up
All functions in this package are only set up, currently, to work with Felt's Personal Access Tokens, which must be acquired ahead of time. More information on doing so can be found on Felt's API documentation.
Features
As of 2023-07-28, this package can use the API to:
- Create a new map
- Upload data as a layer to a map, either from a file, a URL, or a Geopandas GeoDataFrame
- Query the current layers, elements, and comments on a map
- Update layer descriptions
- Delete layers and maps
This package works through a collection of functions and classes.
- functions, with names such as getLayers() and deleteMap(), perform actions, such as those listed above
- classes can be thought of as objects, each one representing something that currently exists on Felt, such as a Map, a Layer, a Layer Collection (i.e. all the layers on a map), and Datasets (i.e. what data "powers" a layer - not so useful at the moment)
- Map and Layer also have methods within them that allow for easier calling of functions - for example, a layer could be deleted by either calling the function deleteLayer(), or by calling Layer.deleteLayer()
Future Work
As of 2023-07-28, this package does not interact with any API functions that deal with the Felt Style Language. This is out of practicality: the API documentation states that these endpoints might change in the future, and I would rather wait for it to be finalized before devoting time to figuring it out
This package could also be extended to be more "helpful" - for instance, confirming that a layer or map is deleted, or enabling more complex functinos, such as creating a new map and loading data to it
Finally, this package is only set up to work with Felt's Personal Access Tokens - I hope at some point to also integrate with OAuth
Contribution
I welcome comments and pull requests! This is my first Python package, so it is definitely not consistent or pretty or easy to understand - if you have capital-O Opinions on how you'd like to see this change, feel free to let me know here in Github.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.