simplify functions from other libraries functions in 1-2 lines
Project description
py_topping, a topping on some already great libraries
I create this library to simplify and standardize my friends' projects
This library focus on "simplify" (& lazy) not performance
PyPi Project Page : (https://pypi.org/project/py-topping)
To Install a Stable Version
pip install py-topping
To Install a Newest Version
pip install git+https://github.com/chanon-kr/Shared_Function.git
This library will *NOT auto install dependencies for you but you could see the list of dependencies below
You could see samples of how to use this library inside the samples folder in github
(https://github.com/chanon-kr/Shared_Function)
database
- Original to Work with SQL Server, MySQL, PostGreSQL and SQLite
- Since 0.3.5, It can work with GCP's BigQuery, still need more test on Cloud
- To read view, table or store procedure as pandas dataframe
- To insert pandas dataframe into SQL with option for existing row :
- Replace same key(s) with new from dataframe with option to use ">" or "<" condition
- Add Only row with non-existing key(s)
- Replace whole table
- Can parallel insert by using dask's delayed (not recommend)
- Can't read Store Procedure in PostGreSQL will solve this in later version
- Will working with Oracle Database in later version
- Dependencies for this library as listed ;
sqlalchemy
pandas
dask
toolz
- Additional dependencies for GCP's BigQuery as listed ;
pybigquery
pandas-gbq
google-cloud-bigquery
google-cloud-bigquery-storage
pyarrow
- Sample of use => https://github.com/chanon-kr/Shared_Function/blob/main/samples/database.ipynb
sharepoint
- to download file from SP365 or SP on prim
- to read csv/excel from SP365 as pandas dataframe
- to download List as csv or pandas dataframe from SP365
- upload file to SP365 or SP on prim
- Dependencies for this library as listed ;
Office365-REST-Python-Client (recommend 2.2.1)
- Sample of use => https://github.com/chanon-kr/Shared_Function/blob/main/samples/sharepoint.ipynb
gcp
- to download file from GCP's bucket Storage
- upload file from GCP's bucket Storage
- Dependencies for this library as listed ;
google-cloud-storage
...
- Sample of use => https://github.com/chanon-kr/Shared_Function/blob/main/samples/gcp.ipynb
data_preparation
- Encode categorical column
- Create lagging parameter
- Simple Deep Learning Model for Regression
- Dependencies for this library as listed ;
pandas
sklearn
tensorflow>=2
- Sample of use
general_use
- To send email with python
- To logging in csv file
- To check port status
- To send LINE message, sticker or picture with line notify
- To Create diff hour of (Desired UTC) - (Environment UTC)
- To Check health of your machine
- Sample of use
run_pipeline
- to run your python or notebook scripts
- with logging as a csv
- with logging into sql table
- with emailing the log when have/don't have errors
- Dependencies for this library as listed ;
papermill
- Sample of use => https://github.com/chanon-kr/Shared_Function/blob/main/samples/run_pipeline.ipynb
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
py_topping-0.3.12.tar.gz
(131.0 kB
view hashes)