Skip to main content

A simple script for automating your downloads of data from the Clever sftp site

Project description

CleverFetch

A simple script for automating your downloads of data from the Clever sftp site.

Author: David Marienburg
Version: 1.0
Last Update: 2020-12-03


Requirements


Usage

Using the script is simple, just import the get_files method, passing it a username and a password.

>>> from CleverFetch import get_files
>>> get_files(username="ThisisanSFTPUsername", password="ThisIsAnSFTPPassword")

The program will then automatically download any files that you don't already have into the scripts Data folder

CleverFetch will then return a list of the new files downloaded, as file paths, Data that can be used by any secondary scripts like a database loader.

Since storing passwords in plain text is unsafe, it would be best practice to run this script from a commandline using python's getpass library. This will prompt the user to enter their password when the script runs and the password they type will not be visible in the command line.

>>> from CleverFetch import get_files
>>> from getpass import getpass
>>> get_files(username="ThisIsanSFTPUsername", password=getpass("Password: "))

If you want the downloaded .csv files to be saved in a specific folder simply provide this files complete filepath to the save_path parameter. If you do not provide a path the files will be saved in the CleverFetch library's on folder structure.

>>> from CleverFetch import get_files
>>> from getpass import getpass
>>> get_files(username="ThisIsanSFTPUsername", password="ThisIsAnSFTPPassword", save_path=r"C:\\users\me\desktop")

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cleverfetch-pkg-dmarienburg-1.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cleverfetch_pkg_dmarienburg-1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file cleverfetch-pkg-dmarienburg-1.0.tar.gz.

File metadata

  • Download URL: cleverfetch-pkg-dmarienburg-1.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201202 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for cleverfetch-pkg-dmarienburg-1.0.tar.gz
Algorithm Hash digest
SHA256 48ad99d4406cb2b3019a9d0b79c48884688ebbcf8e1827f913552fdca407e3fe
MD5 469d46015a5258540a3f0dc8c2d91f31
BLAKE2b-256 40bcb3457c15d4aaf0264d9b002d45c1efaa874d73d489e7b908b6cabfd5203e

See more details on using hashes here.

File details

Details for the file cleverfetch_pkg_dmarienburg-1.0-py3-none-any.whl.

File metadata

  • Download URL: cleverfetch_pkg_dmarienburg-1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201202 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for cleverfetch_pkg_dmarienburg-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a21d90280dab49fc3bc3b8d1c848dcf6fb4c99cc6eb7685cf7b2736d99a46aa1
MD5 33220aa8d4adf0f6abb21df014c56f81
BLAKE2b-256 68438a7d1991f2a169cc2578537b52716fe9632d176c1695f2adb19466a77c00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page