easierdata / ipfs-stac

Python client utilized for interfacing with the Easier STAC Server
MIT License
2 stars 1 forks source link

Enhancing Web3 Class #44

Open SethDocherty opened 1 month ago

SethDocherty commented 1 month ago

This issue is a WIP to capture enhancement ideas

When instantiating a Web3 object, I believe we should be doing a few more things:

  1. Creating a client instance which is a property of Web3.
    • This will significantly enhance the interaction with the STAC API, which could be extended to other methods within Web3.
      • See Issues #37 #38 #39
    • I'm unsure if inheriting the class properties would be the best approach.
    • Since we have to pass in a stac_endpoint URL, it makes sense that the web3 object that's created is tied to that specific endpoint.
  2. Creating an IPFS configuration property.
matthewnanas commented 3 weeks ago

(Commenting to keep organized), second point had been pushed with https://github.com/easierdata/ipfs-stac/commit/22a1e550ea401ee91aa25915e2296664053f2829 overwriting the current config was pushed in bd798ccf4de9cda099218c5ab5de65299cb49ad7

matthewnanas commented 2 weeks ago

It seems 37 has already been addressed but I have added a function that returns only catalogs as objects instead of IDs (we can scrap this if it's redundant). 38 Is now addressed with 7aa51f55f0ee8648933379c4c0bcb953cc4d4d55

Reference the following sample

from ipfs_stac.client import Web3

client = Web3(stac_endpoint="http://stac.easierdata.info/")

collections = client.get_collections()
tmp = collections[0]

assets = client.getAssetNames(tmp)
print(assets)
SethDocherty commented 2 weeks ago

(Commenting to keep organized), second point had been pushed with 22a1e55 overwriting the current config was pushed in bd798cc

This is a much cleaner approach. The approach here is that a user must run this method manually if they would like to update the default configuration?

Remind me again: Are the settings found in .ipfs/config used if the IPFS daemon is not already running?