semvec/pypi-packages huggingface dataset:
pypony 1.0.0
A python utility for contract testing APIs

# PyPony

![PyPony Logo](PyPony.png)

PyPony is a 🪄magical🪄 Python CLI tool for contract testing OpenAPI specifications against the live APIs that they define.

[![Unit Tests](https://github.com/Bandwidth/pypony/actions/workflows/ci.yml/badge.svg)](https://github.com/Bandwidth/pypony/actions/workflows/ci.yml)

## Supported OAS Features

* JSON or YAML
* enums
* $ref
* oneOf

## Install Locally

```shell
make install-dependencies
make install-cli
```

## Remove Local Installation

```shell
make remove-cli
```

## Test

```shell
make test
```

### Generate Coverage Report
```shell
make test-coverage
```

## Run

```shell
pypony -st ./my_steps.yml -sp ./my_spec.yml  -v
```

### Arguments

|       Argument       | Description                                                          |
|:--------------------:|:---------------------------------------------------------------------|
|   '-st', '--step'    | Relative path to step file                                           |
|   '-sp', '--spec'    | Relative path to spec file                                           |
|  '-v', '--verbose'   | Boolean verbose output (default=`False`)                             |
| '-ff', '--fail-fast' | Option to fail fast if an exception is encountered (default=`False`) | # Coming soon!

## Step File

The `step` file is what is used to make API calls - its where you provide information like base url, auth, path, request body, etc. PyPony uses the information in the step file to check against the OpenAPI spec, ensuring it matches the definiution, and then sends it using the [requests](https://pypi.org/project/requests/) library.

Step files export expressions and environment variables, allowing it to be run in a CI/CD pipeline and making data from previous steps accessible.

### Required Step File Fields

* BaseURL
* Steps
  * name
  * operation_id
  * method
  * path
  * status_code

### Example Step File

```yml
---
base_url: https://voice.bandwidth.com/api/v2
auth:
    username: ${{ env.BW_USERNAME }}
    password: ${{ env.BW_PASSWORD }}
steps:
  - name: createCall
    operation_id: createCall
    method: POST
    path: /accounts/${{ env.BW_ACCOUNT_ID }}/calls
    headers:
      Content-Type: application/json
    body:
      to: ${{ env.USER_NUMBER }}
      from: ${{ env.BW_NUMBER }}
      applicationId: ${{ env.BW_VOICE_APPLICATION_ID }}
      answerUrl: ${{ env.BW_ANSWER_URL }}
    status_code: 201

  - name: Get Call Info
    operation_id: getCallState
    method: GET
    path: /accounts/${{ env.BW_ACCOUNT_ID }}/calls/${{ steps.createCall.response.data.callId }}
    auth:    # overrides global auth definition
        username: ${{ env.VOXBONE_USERNAME }}
        password: ${{ env.VOXBONE_PASSWORD }}
    status_code: 200

  - name: listConferences
    operation_id: listConferences
    method: GET
    path: /accounts/${{ env.BW_ACCOUNT_ID }}/conferences
    status_code: 200
```

The full step file schema can be found [here](https://github.com/Bandwidth/pypony/blob/main/src/steps_schema.yml).
ipv4ac 1.0.0b0
A simple module provides a function to check if an IPv4 address has correct format.
Requires Python: >=3.8
Keywords: check,ip,ipv4,mit,module,network,pattern,python


# IPv4AC

Internet Protocol Version 4 Address Check is a simple module provides a function to check if an IPv4 address has correct format.


## Installing

Install the module by [pip][1] (check [how to use pip][2]):

```
$ python3 -m pip install ipv4ac
```


## A simple example

```python
# Import the function from the module
from ipv4ac import ipv4_address_check

# Set an IPv4 address
ip_address = '192.168.100.1'

# Use the function to check the address
check_result = ipv4_address_check(ip_address)
```

[1]: https://pypi.org/ 
[2]: https://pip.pypa.io/en/stable/getting-started/