Skip to main content
Ctrl+K

sda 0.1.dev1+ga25cba775 documentation

  • Installation
  • Examples
  • API Reference
  • Installation
  • Examples
  • API Reference

Section Navigation

  • SDA Database Report Analysis Script.
  • List all data files in a specific test folder.
  • Load 2021-2022 test data.
  • Load all test data.
  • Load tests with unified function.
  • Print all local data files.
  • SDA Dashboard Example.
  • Examples
  • Print all local data files.

Note

You can download below the full example code and run it online in Codespaces

https://github.com/codespaces/badge.svg

—

Print all local data files.#

This script prints all data files synchronized on this local machines. Files are not necessarily downloaded.

The script uses sda.api.load.list_all_files() which looks into all the Data Sharepoints synchronized on this machine either by having clicked the “Sync” (recommended) or “Add a Shortcut to my Drive” (not recommended, but works) buttons from the online Sharepoint / Documents page.

Data Sharepoints local links must be defined in the local “~/sda.json” configuration file.

First, we import the required libraries.#

from sda.api.load import list_all_files

# Retrieve all files.
file_paths = list_all_files(filter="*.xls*", max_recursion_level=2)

print(f"Found {len(file_paths)} files. Here are the paths:")
for i, path in enumerate(file_paths):
    print(f"{i:03}: {path}")

Download Jupyter notebook: print_all_datafiles.ipynb

Download Python source code: print_all_datafiles.py

Download zipped: print_all_datafiles.zip

previous

Load tests with unified function.

next

SDA Dashboard Example.

On this page
  • First, we import the required libraries.

This Page

  • Show Source

© Copyright 2024, Copyright (C) Spark Cleantech SAS (SIREN 909736068).

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.16.1.