semvec/pypi-packages huggingface dataset:
spark-jdbc-profiler 1.0.4
Awesome spark_jdbc_profiler created by hgbink

# Spark JDBC Profiler

[![codecov](https://codecov.io/gh/hgbink/spark-jdbc-profiler/branch/main/graph/badge.svg?token=spark-jdbc-profiler_token_here)](https://codecov.io/gh/hgbink/spark-jdbc-profiler)
[![CI](https://github.com/hgbink/spark-jdbc-profiler/actions/workflows/main.yml/badge.svg)](https://github.com/hgbink/spark-jdbc-profiler/actions/workflows/main.yml)

Spark JDBC Profiler is a collection of utils functions for profiling source databases with spark jdbc connections. 


## Install it from PyPI

```bash
pip install spark_jdbc_profiler
```

## Usage

```py
from spark_jdbc_profiler.whole_db_profiler.mysql_db_profiler import *
from spark_jdbc_profiler.segmentation_profiler.segmentation_gen import *

jdbcUsername = "test_user"
jdbcPassword = "test_pass"
jdbcHostname = "mariadb"
jdbcPort = "3306"
jdbcDatabase = "test"

jdbcUrl = f"jdbc:mysql://{jdbcHostname}:{jdbcPort}/{jdbcDatabase}?zeroDateTimeBehavior=ROUND"
connectionProperties = {"user": jdbcUsername, "password": jdbcPassword}

df = profile_whole_db(spark, jdbcUrl, connectionProperties)
df.show(n=20)

```


## Development

Read the [CONTRIBUTING.md](CONTRIBUTING.md) file.
google-console 0.0.5
A set of Python modules for Google Cloud Console.
Requires Python: >=3.7

.. -*- mode: rst -*-

|PythonVersion|_ |PyPi|_

.. |PythonVersion| image:: https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue?style=flat-square&logo=Python
.. _PythonVersion: https://python.org/downloads/

.. |PyPi| image:: https://img.shields.io/pypi/v/google-console?style=flat-square&label=pypi%20package&logo=PyPI
.. _PyPi: https://pypi.org/


**Documentation**

There is no official documents about **google-console** but you can use **Google** official reference documents. The official documents will release in a sort period of time.


|Gmail|_ |Photos|_ |Drive|_ |YouTube|_

.. |Gmail| image:: https://shields.io/badge/-Gmail-blue?style=flat-square&logo=Gmail&labelColor=gray
.. _Gmail: https://developers.google.com/gmail/api/reference/rest

.. |Photos| image:: https://shields.io/badge/-Photos-blue?style=flat-square&logo=Google%20Photos&labelColor=gray
.. _Photos: https://developers.google.com/photos/library/reference/rest

.. |Drive| image:: https://shields.io/badge/-Drive-blue?style=flat-square&logo=Google%20Drive&labelColor=gray
.. _Drive: https://developers.google.com/drive/api/v3/reference

.. |YouTube| image:: https://shields.io/badge/-YouTube-blue?style=flat-square&logo=YouTube&labelColor=gray
.. _YouTube: https://developers.google.com/youtube/v3/docs


~~~~~~~~~~~~~~~~~

**google-console** is a Python module for Google Cloud Console.


User installation
~~~~~~~~~~~~~~~~~

The easiest way to install google-console is using ``pip``::

    pip install -U google-console
meutils-w 0.0.1
A test package
Requires Python: >=3.6

# pypi包发布

## 目录结构

```python
meutils-w
----src
--------meutils-w
------------__init__.py
------------test.py
----LICENSE
----pyproject.toml
----README.md
----setup.py
```

## 文件内容

`__init__.py`

```python
if name="__init__":
    f()
```

`test.py`

```python
def f():
    print('just a test')
```
`pyproject.toml`

```python
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"
```
`setup.py`
```python
from time import time
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
     long_description = fh.read()
setuptools.setup(
     name="meutils-w",
     version="0.0.0",
     author="wangdexiang",
     author_email="k7856499@163.com",
     description="A test package",
     long_description=long_description,
long_description_content_type="text/markdown",
     url="https://github.com/pypa/sampleproject",
     project_urls={
         "Bug Tracker": "https://github.com/pypa/sampleproject/issues",
     },
     classifiers=[
         "Programming Language :: Python :: 3",
         "License :: OSI Approved :: MIT License",
         "Operating System :: OS Independent",
     ],
     package_dir={"": "src"},
     packages=setuptools.find_packages(where="src"),
     python_requires=">=3.6",
)
```

## 安装依赖

```sh
pip install build twine
```

## 构建测试包

```sh
python -m build
```

## 上传测试包

```sh
python -m twine upload dist/*
```

## 更新测试包

```sh 
python -m twine upload dist/* --skip-existing
#只更新已存在的包
```
pyscs 3.8.4
python lib for scs, scs version <= 3.8
Requires Python: >=3.10

# Python3 lib for scs

> python version > = 3.10


```python
from pyscs.scs import SCS

scs = SCS()
# set script can be stop right now
msg, code = scs.can_stop()
if code == 200:
    print("success")
elif code == 201:
    print("warning: " + msg)
else:
    print(msg)

# set script can not be stop except exec scs.can_stop()
msg, code = scs.can_not_stop()
if code == 200:
    print("success")
elif code == 201:
    print("warning: " + msg)
else:
    print(msg)


from pyscs import Script
# add script or server
s = Script("test", "python test.py")
# When dir is not empty and is not exist and get is not empty, It will command get first
s.dir = "/home/test"
s.get = "cd /home && git clone xxxx"
msg, code = scs.add_script(s)
if code == 200:
    print("success")
elif code == 201:
    print("warning: " + msg)
else:
    print(msg)

# del script or server on scsd
# test is pname
msg, code = scs.del_script("test")
if code == 200:
    print("success")
elif code == 201:
    print("warning: " + msg)
else:
    print(msg)



# set alert like add script

a = Alert()
# When dir is not empty and is not exist and get is not empty, It will command get first
a.pname = "alert"
a.name = "test"
a.title = "some thing broken"
a.broken = True
a.reason = "error"
msg, code = scs.set_alert(a)
if code == 200:
    print("success")
elif code == 201:
    print("warning: " + msg)
else:
    print(msg)
```