semvec/pypi-packages huggingface dataset:
synology-srm 0.2.3
Synology SRM API
License: MIT
Requires Python: >=3.8.1


# Synology SRM API

[![Build status](https://github.com/aerialls/synology-srm/workflows/Test/badge.svg)](https://github.com/aerialls/synology-srm/actions?query=workflow%3ATest)
[![PyPi version](https://img.shields.io/pypi/v/synology-srm.svg)](https://pypi.org/project/synology-srm/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/synology-srm.svg)](https://pypi.python.org/pypi/synology-srm/)

Python 3 library to use the Synology SRM (Synology Router Manager) API. This is **NOT** the same thing as Synology DSM (DiskStation Manager).

This library should work with the following devices.

* RT1900ac
* RT2600ac

> It's not possible to create another account in SRM with admin permissions. You'll need to use your `admin` account (or the one you renamed at creation).

## Usage

```python
import synology_srm

client = synology_srm.Client(
    host='192.168.1.254',
    port=8001,
    https=True,
    username='admin',
    password='admin',
)
```

You can now access all namespaces from the API. The following methods are availabe.

* Base
  * getinfo_encryption()
  * query_info()
* Core
  * list_ddns_extip()
  * list_ddns_record()
  * get_system_utilization()
  * get_network_nsm_device(filters=`{}`)
  * get_ngfw_traffic(interval=`live|day|week|month`)
  * list_certificate()
  * export_certificate(path=`certificate.zip`)
* Mesh
  * get_network_wanstatus()
  * get_network_wifidevice()
  * get_system_info()

For instance, to list all endpoints available in the API.

```python
endpoints = client.base.query_info()

for endpoint, config in endpoints.items():
    print("API endpoint {} (minVersion={}, maxVersion={})".format(
        endpoint,
        config['minVersion'],
        config['maxVersion'],
    ))
```

## Manual endpoints

It's possible to target endpoints not directly supported by this library by using the raw `http` client.

```python
response = client.http.call(
    endpoint='entry.cgi',
    api='SYNO.Core.System.Utilization',
    method='get',
    version=1,
)
```

## HTTPS auto-signed certificate

You can disable the HTTPS certificate verification if you are using a self-signed certificate.

```python
client.http.disable_https_verify()
```
bddcli 2.9.4
Test any command line interface in BDD manner.
License: MIT

# bddcli
Test any command line interface in BDD manner.

[![PyPI](http://img.shields.io/pypi/v/bddcli.svg)](https://pypi.python.org/pypi/bddcli)
[![Build](https://github.com/pylover/bddcli/workflows/Build/badge.svg?branch=master)](https://github.com/pylover/bddcli/actions)
[![Coverage Status](https://coveralls.io/repos/github/pylover/bddcli/badge.svg?branch=master)](https://coveralls.io/github/pylover/bddcli?branch=master)

### About

A framework to easily test your command line interface in another(isolated) 
process and gather `stdout`, `stderr` and `exit-status` of the process.

Thanks to https://github.com/cheremnov for the Windows support.

## Installation

Only `Python >= 3.6` is supported.

```bash
pip install bddcli
```

## Quickstart

### Arguments

```python
import sys

from bddcli import Given, when, stdout, status, stderr, Application, given


def foo():
    print(' '.join(sys.argv))
    return 0


app = Application('foo', 'mymodule:foo')


with Given(app, 'bar'):
    assert status == 0
    assert stdout == 'foo bar\n'

    # Without any argument
    when(given - 'bar')
    assert stdout == 'foo\n'

    # Pass multiple arguments
    when('bar baz')
    assert stdout == 'foo bar baz\n'

    # Pass multiple arguments, another method
    when(['bar', 'baz'])
    assert stdout == 'foo bar baz\n'

    # Add an argument
    when(given + 'baz')
    assert stdout == 'foo bar baz\n'

```


### Standard input

```python
with Given(app, stdin='foo'):
    assert ...

    # stdin is empty
    when(stdin='')
    assert ...

```


### Standard output and error

```python
from bddcli import stderr, stdout

assert stderr == ... 
assert stdout == ... 
```

### Environment variables

```python
import os

from bddcli import Given, stdout, Application, when, given


def foo():
    e = os.environ.copy()
    del e['PWD']
    print(' '.join(f'{k}: {v}' for k, v in e.items()))


app = Application('foo', 'mymodule:foo')
with Given(app, environ={'bar': 'baz'}):
    assert stdout == 'bar: baz\n'

    # Without any variable
    when(environ=given - 'bar')
    assert stdout == '\n'

    # Add another variables
    when(environ=given + {'qux': 'quux'})
    assert stdout == 'bar: baz qux: quux\n'
```


See tests for more examples.
pulsar-producer 0.1.0
CLI that help developers to publish messages into any pulsar topic in order to test features (usually, consumers) that relies on a pulsar consumer
License: MIT
Requires Python: >=3.8,<4.0
Keywords: apache-pulsar,producer,python

# Pulsar Producer

CLI that allows to send a message into a Apache Pulsar topic

#

Usually, implementing an Apache Pulsar Consumers, you will need to test it before release. Then, it's quite painful that you need to write or change some code in order to test it. Having that said, I have implemented this CLI that can help you with that.

Now, you can have a file with the message you want to send into a specific Apache Pulsar Topic and simply test your Apache Pulsar Consumer easily.

# How to use it

First, you should install the CLI on your machine

`pip install pulsar-producer` or `pip install --user pulsar-producer` if you want make it available only for your user.

> **_NOTE:_**  This package still *not* publish on pypi, only on [testing environment](https://test.pypi.org/project/pulsar-producer/0.1.0/#description)

> **_NOTE:_** pip install -i https://test.pypi.org/simple/ pulsar-producer==0.1.0

Then, you need to have an file with your Apache Pulsar server address. This file SHOULD follow a JSON format.

Example:

[_my-apache-pulsar-configuration.json_](./examples/pulsar-connection.json)

```json
{
        "host": "localhost",
        "port": "6650",
        "topic": "my-topic-name"
}

```

Then, you need to have another file with contains the message you want to publish in your Apache Pulsar topic in order to test your Apache Pulsar Consumer.
This file can contains ANYTHING you want. In this example, let's say you want to publish a JSON structure message.

[_my-message-file-example.json_](./examples/message-file)

```json
{
    "KEY": "THIS IS MY MESSAGE WHICH COULD BE ONLY PURE TEXT (NOT JSON)"
}

```

Now, you just need to run:

`pulsar-producer --pulsar-connection-file ./path-of-your-my-apache-pulsar-configuration-example-json --message-file ./path-or-your-message-file`

# License
MIT