Toolbelt to export metadata from the Isogeo REST API into Microsoft Excel workbooks (.xlsx).
Project description
Isogeo - XLSX Exporter
Python package to export Isogeo metadata into Excel workshbook using the Python SDK and Openpyxl.
Usage in a nutshell
-
Install:
pip install isogeo-export-xl
-
Authenticate
# import from isogeo_pysdk import Isogeo # API client isogeo = Isogeo( auth_mode="group", client_id=ISOGEO_API_GROUP_CLIENT_ID, client_secret=ISOGEO_API_GROUP_CLIENT_SECRET, auto_refresh_url="{}/oauth/token".format(ISOGEO_ID_URL), platform=ISOGEO_PLATFORM, ) # getting a token isogeo.connect()
-
Make a search:
search = isogeo.search(include="all",) # close session isogeo.close()
-
Export:
# import from isogeotoxlsx import Isogeo2xlsx # instanciate the final workbook out_workbook = Isogeo2xlsx( lang=isogeo.lang, url_base_edit=isogeo.app_url, url_base_view=isogeo.oc_url ) # add needed worksheets out_workbook.set_worksheets(auto=search.tags.keys()) # parse search results for md in map(Metadata.clean_attributes, search.results): out_workbook.store_metadatas(md) # save file out_workbook.save("./isogeo_export_to_xlsx.xlsx")
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
isogeo-export-xl-1.3.2.tar.gz
(25.3 kB
view hashes)
Built Distribution
Close
Hashes for isogeo_export_xl-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87f48c1cf940734dd341997fdf176bb5db8ae2389e0044e9674669963fdc95f1 |
|
MD5 | a8d58b290ff281a4736bc06b949ccd16 |
|
BLAKE2b-256 | 32f775e50a0b65a6af5169e6284f65395da9c7454f735104db104aad3fa3fe40 |