Python package that allows interacting with VIP.
Project description
Summary
At the moment, the package is mainly just a wrapper around FTP and SFTP libraries. It's used to upload and download files from VIP's GDI/GDI2 system. But could be expanded on with SQL functionality or if VIP ever added a genuine API in the future.
Installation
pip install vipwrap
Usage
Contains two modules, gdi
and models
. gdi
covers the actual connection to VIP's GDI servers and the downloading/uploading of files. Largely just a wrapper arounf ftp libraries. Nothing VIP-specific happening in it. models
contains two pandera models that describe order or sales history data. Has not been fully built out. At the moment, can be used for dataframe validation.
Send File to GDI
Takes standard parameters expected of uploading an existing local file to a remote location via FTP or SFTP.
parameter | type | description |
---|---|---|
ftp_method | str | 'ftp' or 'sftp' |
host | str | the FTP server host |
port | int | the SFTP server port, not used with FTP |
user | str | username to authenticate with |
password | str | password to authenticate with |
folder | str | The base folder location to upload the file to, usually "/in/" or "/TO_GDI/" |
file | IO[str] | File stream being uploaded. Usually the output of an open() function |
Download Files from GDI
Takes standard paramers expected for connecting to a remote FTP/SFTP server as well as the file string to search for. This is being used to mass-download files that start with a given string.
parameter | type | description |
---|---|---|
ftp_method | str | 'ftp' or 'sftp' |
host | str | the FTP server host |
port | int | the FTP/SFTP server port |
user | str | username to authenticate with |
password | str | password to authenticate with |
folder | str | the folder to download the files from, usually "/out/" or "/FROM_VIP/" |
file_string | str | string in file name to search for |
delete_after_download | bool | whether to delete the files from the remote location once downloaded. |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vipwrap-0.1.2.tar.gz
.
File metadata
- Download URL: vipwrap-0.1.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec2cb8a37d4fc7f7e7d4b021ba616d38c82f4e57dde81ad1c54526d3d353385 |
|
MD5 | f6815acf83d75d006e1e62a7f53926eb |
|
BLAKE2b-256 | a925e4ecabbd6a7c876906f8dbf5e2a4b512ae35937e4bf96713c729e2ad313a |
File details
Details for the file vipwrap-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: vipwrap-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e801b612ff08096c4ae93e8b0c69ba9f7f3f47599a1043ebb0c0cd4b2b791fd |
|
MD5 | a9c24e7e2f5a5f7443d75945f31d8348 |
|
BLAKE2b-256 | 62d7a20b66f7bdf2cd803af106176522840a09c459338975f39379bca6dada9e |