semvec/pypi-packages huggingface dataset:
cmply 0.1.8
A simple tool to validate if a repository adhears to specified rules.
License: MIT
Requires Python: >=3.7,<4

# cmply

[![PyPI version](https://img.shields.io/pypi/v/cmply.svg?logo=pypi&logoColor=FFE873)](https://pypi.org/project/cmply)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/cmply.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/cmply)
[![PyPI downloads](https://img.shields.io/pypi/dm/cmply.svg)](https://pypistats.org/packages/cmply)
[![Licence](https://img.shields.io/github/license/pselibas/cmply.svg)](LICENSE.txt)


## Installation

```bash
python3 -m pip install --upgrade cmply
```

## Introduction

Cmply is a tool used to run a set of rules against a repository.
The output will show the result of what rules fail or pass.
There is provision for different levels of failures. These levels are `info, warning, fail and security`.
The target can be a local folder or a git repository. 
If a git repository is specified, the local git is used with any configure authentication relative to the local system.

## Usage
```bash
usage: cmply run [-h] [-r RULES] [-v] [-f] [--no-error] [-t TAGS] [-e ENV] [--output {json}] [-b BRANCH] target

positional arguments:
  target                the target folder or git repo to run the compliance check on

options:
  -h, --help            show this help message and exit
  -r RULES, --rules RULES
                        glob of rule files
  -v, --verbose         increase output verbosity
  -f, --hide-fail       hide failure out information
  --no-error            dont exit 1 if security and fails are found
  -t TAGS, --tags TAGS  project tags
  -e ENV, --env ENV     environmental variables
  --output {json}       output type
  -b BRANCH, --branch BRANCH
                        the branch to use if target is a git repo
```

## Rule file

The rules files are YAML files with the following format:
```yaml
name: sonarcube-setup   # Name your rule here
description: |          # This is a verbose description
  All projects must be registered in sonarcube
image: node:16          # Your steps are executed in this docker container
type: fail              # The type of rule info, warning, fail or security
tags:                   # A list of tags. These then matched to the tags passed in from the command line for your execution.
  - all
steps:                  # A list of commands executed. When a command has a non 0 response- the test is considered failed
  - test -f sonar-project.properties
```

## Run using docker

To use the docker image of cmply it is important to pass through the hosts docker socket.

```bash
docker run \
    -v //var/run/docker.sock:/var/run/docker.sock
    -v ./rules:/opt/rules
    -v ./target:/opt/target
    -ti pselibas/cmply \
    run -r /opt/rules \
    /opt/target
```
bitmake 1.0.1
Official python3 BitMake exchange API
License: MIT
Keywords: bitmake,exchange-api,crypto-exchange,digital-currency,trading

# BitMake Python3 SDK 

This is BitMake Official Python3 SDK

## Installation

```
pip3 install bitmake
```

## Rest Example

```python
from bitmake.rest import BitMakeApiClient

api_client = BitMakeApiClient(api_key='TestApiKey', api_secret='TestSecret')
order_response = api_client.create_order('BTC_USD', 'client_order_123', '10000', '0.01', 'BUY', 'LIMIT', 'GTC')
print(order_response)
```

## Websocket Example
### Public Channels

```python
from bitmake.ws import BitMakeWebsocketApiClient, RespData, PushData

ws_client = BitMakeWebsocketApiClient()
await ws_client.connect()
await ws_client.subscribe('diffMergedDepth', {'symbol': 'BTC_USD'}) # subscribe `diffMergedDepth` topic
await ws_client.subscribe('trade', {'symbol': 'BTC_USD'}) # subscribe `trade` topic
while ws_client.connected:
    data = await ws_client.recv_data()
    assert isinstance(data, RespData) or isinstance(data, PushData)
    if isinstance(data, RespData):
        # received response data
        # for example: RespData{data_type: RespDataType.MARKET_DEPTH, data: {'co': 0, 'm': 'success'}}
        print("recv resp data type: {} data: {}".format(data.data_type, data.data))
    elif isinstance(data, PushData):
        # received push data
        # for example: PushData{data_type: PushDataType.MARKET_DEPTH, data: [{'s': 'BTC_USD', 't': 1667874854633, 'vs': 527579119, 've': 527579128, 'b': [['20636', '0.1336'], ['20634', '0.1402']], 'a': [['20649', '0.06'], ['20654', '0.0727']]}]}
        print("recv push data type: {} data: {}".format(data.data_type, data.data))
```

### Private Channels

```python
from bitmake.ws import BitMakeWebsocketApiClient, RespData, PushData

ws_client = BitMakeWebsocketApiClient(api_key='TestApiKey', api_secret='TestSecret')
await ws_client.connect()
# Optionally you can subscribe any public topic
# await ws_client.subscribe('diffMergedDepth', {'symbol': 'BTC_USD'}) # subscribe `diffMergedDepth` topic
# await ws_client.subscribe('trade', {'symbol': 'BTC_USD'}) # subscribe `trade` topic
while ws_client.connected:
    data = await ws_client.recv_data()
    assert isinstance(data, RespData) or isinstance(data, PushData)
    if isinstance(data, RespData):
        # received response data
        # for example: RespData{data_type: RespDataType.MARKET_DEPTH, data: {'co': 0, 'm': 'success'}}
        print("recv resp data type: {} data: {}".format(data.data_type, data.data))
    elif isinstance(data, PushData):
        # received push data
        # for example: PushData{data_type: PushDataType.ACCOUNT_BALANCE, data: [{'token': 'USDT', 'available': '40', 'total': '40'}]}
        print("recv push data type: {} data: {}".format(data.data_type, data.data))
```