semvec/pypi-packages huggingface dataset:
pytest-testinfra-winrm-transport 0.8.1
Test infrastructures
Requires Python: >=3.8

##################################
Testinfra test your infrastructure
##################################

Latest documentation: https://testinfra.readthedocs.io/en/latest

About
=====

With Testinfra you can write unit tests in Python to test *actual state* of
your servers configured by management tools like Salt_, Ansible_, Puppet_,
Chef_ and so on.

Testinfra aims to be a Serverspec_ equivalent in python and is written as
a plugin to the powerful Pytest_ test engine

License
=======

`Apache License 2.0 <https://github.com/pytest-dev/pytest-testinfra/blob/main/LICENSE>`_

The logo is licensed under the `Creative Commons NoDerivatives 4.0 License <https://creativecommons.org/licenses/by-nd/4.0/>`_
If you have some other use in mind, contact us.

Quick start
===========

Install testinfra using pip::

    $ pip install pytest-testinfra

    # or install the devel version
    $ pip install 'git+https://github.com/pytest-dev/pytest-testinfra@main#egg=pytest-testinfra'


Write your first tests file to `test_myinfra.py`:

.. code-block:: python

    def test_passwd_file(host):
        passwd = host.file("/etc/passwd")
        assert passwd.contains("root")
        assert passwd.user == "root"
        assert passwd.group == "root"
        assert passwd.mode == 0o644


    def test_nginx_is_installed(host):
        nginx = host.package("nginx")
        assert nginx.is_installed
        assert nginx.version.startswith("1.2")


    def test_nginx_running_and_enabled(host):
        nginx = host.service("nginx")
        assert nginx.is_running
        assert nginx.is_enabled


And run it::

    $ py.test -v test_myinfra.py


    ====================== test session starts ======================
    platform linux -- Python 2.7.3 -- py-1.4.26 -- pytest-2.6.4
    plugins: testinfra
    collected 3 items

    test_myinfra.py::test_passwd_file[local] PASSED
    test_myinfra.py::test_nginx_is_installed[local] PASSED
    test_myinfra.py::test_nginx_running_and_enabled[local] PASSED

    =================== 3 passed in 0.66 seconds ====================


.. _Salt: https://saltstack.com/
.. _Ansible: https://www.ansible.com/
.. _Puppet: https://puppetlabs.com/
.. _Chef: https://www.chef.io/
.. _Serverspec: https://serverspec.org/
.. _Pytest: https://pytest.org/
dtcc-wrangler 0.7.21
DTCC Wrangler
Requires Python: >=3.10

# DTCC Template

DTCC Template is a template for creating clean and simple
Python packages that include C++ code.

Highlights:

* Uses `pyproject.toml` and installable using `pip install`
* Uses `scikit_build_core` as build backend
* C++ extensions built via `CMake` and `CMakeLists.txt`

This project is part the
[Digital Twin Platform (DTCC Platform)](https://github.com/dtcc-platform/)
developed at the
[Digital Twin Cities Centre](https://dtcc.chalmers.se/)
supported by Sweden’s Innovation Agency Vinnova under Grant No. 2019-421 00041.

## Documentation

This project is documented as part of the
[DTCC Platform Documentation](https://platform.dtcc.chalmers.se/).

## Authors (in order of appearance)

* [Anders Logg](http://anders.logg.org)
* [Vasilis Naserentin](https://www.chalmers.se/en/Staff/Pages/vasnas.aspx)
* [Dag Wästerberg](https://chalmersindustriteknik.se/sv/medarbetare/dag-wastberg/)

## License

This project is licensed under the
[MIT license](https://opensource.org/licenses/MIT).

Copyright is held by the individual authors as listed at the top of
each source file.

## Community guidelines

Comments, contributions, and questions are welcome. Please engage with
us through Issues, Pull Requests, and Discussions on our GitHub page.
yourtools 0.6.0
Python helper tools
Requires Python: >=3.6

# Python tools

## Installation
```shell
pip3 uninstall yourtools
pip3 install yourtools
```

## Table of Contents

- WeChat
  - send_msg 发送应用消息
  - upload_media 上传临时素材文件到企微，并返回media_id
- MySQL
  - query 执行普通查询SQL
  - execute 执行DML SQL
- Hive
  - query 执行普通查询SQL
  - exec_ddl_sql 执行DML SQL

## Example

### 1、MySQL

```python
from yourtools import MySQL

def test_mysql():
    dbconfg = {
        'host': '172.0.0.1',
        'port': 3306,
        'username': 'root',
        'password': '123456',
        'db': 'test',
        'charset': 'utf8'
    }
    server = SSHTunnelForwarder(
        ('跳板机服务器IP', 45535),
        ssh_username='root',
        ssh_password='123456',
        remote_bind_address=('远程数据库IP', 3366),
        local_bind_address=('127.0.0.1', 3366)
    )
    # 不使用跳板机
    mysql = MySQL(dbconfg)
    # 使用跳板机，需要传递一个SSHTunnelForwarder对象
    mysql = MySQL(dbconfg,ssh_tunnel=server)
    
    # query data
    result = mysql.query("select * from users")
    print(result)
    # dml sql 
    result = mysql.execute("insert into users(name,birthday,ts) values('灭霸2','2022-11-01 16:00:00','2022-11-01 16:00:00') ")
```

### 2、Hive
```python
from yourtools import Hive

hive_connection = {
    'host': '127.0.0.1',
    'port': 10000,
    'db': 'ods',
    'username': '',
    'auth': 'NOSASL'
}
hive = Hive(hive_connection)
hive_sql="""
select * from ods.ods_user
"""
rows = hive.query(hive_sql)
print(rows)

```

### 3、WeChat
```python
from yourtools import WeChat

# WeChat(corpid，Secret，AgentId)
qw = WeChat("asdg234234", "OINFSokasdIOKflsafdaOOKFD", 1000000)
data = {
    "touser": "198297694527839423",
    "toparty": "",
    "totag": "",
    "msgtype": "text",
    "agentid": 1000000,
    "text": {
        "content": "你的快递已到，请携带工卡前往邮件中心领取。\n出发前可查看<a href=\"http://work.weixin.qq.com\">邮件中心视频实况</a>，聪明避开排队。"
    },
    "safe": 0,
    "enable_id_trans": 0,
    "enable_duplicate_check": 0,
    "duplicate_check_interval": 1800
}
send_statu = qw.send_msg(data)
print(send_statu)
```
leveldb-py 0.0.1b0
A Cython wrapper for Mojang's custom LevelDB.

# Py LevelDB

A Cython wrapper for Mojang's modified LevelDB library.


## Install
`pip install pyleveldb`

## Use
```py
from leveldb import LevelDB

db = LevelDB("path/to/db", create_if_missing = True)
db.put(b"greetings", b"Hello world")
print(db.get(b"greetings"))
# b"Hello world"
```

See the [source code](src/leveldb/_leveldb.pyx) for full documentation.
dtcc-io 0.7.21
DTCC IO
Requires Python: >=3.10

# DTCC IO

DTCC IO provides input/output (IO) for DTCC Platform.

This project is part the
[Digital Twin Platform (DTCC Platform)](https://github.com/dtcc-platform/)
developed at the
[Digital Twin Cities Centre](https://dtcc.chalmers.se/)
supported by Sweden’s Innovation Agency Vinnova under Grant No. 2019-421 00041.

## Documentation

This project is documented as part of the
[DTCC Platform Documentation](https://platform.dtcc.chalmers.se/).

## Authors (in order of appearance)

* [Dag Wästerberg](https://chalmersindustriteknik.se/sv/medarbetare/dag-wastberg/)
* [Anders Logg](http://anders.logg.org)
* [Vasilis Naserentin](https://www.chalmers.se/en/Staff/Pages/vasnas.aspx)

## License

This project is licensed under the
[MIT license](https://opensource.org/licenses/MIT).

Copyright is held by the individual authors as listed at the top of
each source file.

## Community guidelines

Comments, contributions, and questions are welcome. Please engage with
us through Issues, Pull Requests, and Discussions on our GitHub page.
dtcc-model 0.7.21
DTCC Model
Requires Python: >=3.10

# DTCC Model

DTCC Model defines the common data model and data formats for DTCC Platform.
Additionally, DTCC Model provides utilities for working with the data model
and data formats.

This project is part the
[Digital Twin Platform (DTCC Platform)](https://github.com/dtcc-platform/)
developed at the
[Digital Twin Cities Centre](https://dtcc.chalmers.se/)
supported by Sweden’s Innovation Agency Vinnova under Grant No. 2019-421 00041.

## Documentation

This project is documented as part of the
[DTCC Platform Documentation](https://platform.dtcc.chalmers.se/).

## Authors (in order of appearance)

* [Anders Logg](http://anders.logg.org)
* [Vasilis Naserentin](https://www.chalmers.se/en/Staff/Pages/vasnas.aspx)
* [Dag Wästerberg](https://chalmersindustriteknik.se/sv/medarbetare/dag-wastberg/)

## License

This project is licensed under the
[MIT license](https://opensource.org/licenses/MIT).

Copyright is held by the individual authors as listed at the top of
each source file.

## Community guidelines

Comments, contributions, and questions are welcome. Please engage with
us through Issues, Pull Requests, and Discussions on our GitHub page.